Text formatting

This commit is contained in:
poka 2021-11-21 02:52:01 +01:00
parent eceb2e3253
commit b24211e43d
3 changed files with 77 additions and 67 deletions

View File

@ -380,27 +380,30 @@ class HistoryScreen extends StatelessWidget with ChangeNotifier {
),
),
Padding(
padding: const EdgeInsets.only(top: 15),
child: OutlinedButton(
style: OutlinedButton.styleFrom(
side: BorderSide(width: 2, color: orangeC)),
onPressed: () {
// if (_formKey.currentState.validate()) {
// _formKey.currentState.save();
// }
// _historyProvider.pay(payAmount.text, payComment.text);
Navigator.push(context,
MaterialPageRoute(builder: (context) {
return UnlockingWallet(
wallet: defaultWallet, action: "pay");
}));
},
child: Padding(
padding: const EdgeInsets.all(12),
child: Text("PAYER",
style: TextStyle(
fontSize: 25, color: Colors.grey[850]))),
))
padding: const EdgeInsets.only(top: 15),
child: OutlinedButton(
style: OutlinedButton.styleFrom(
side: BorderSide(width: 2, color: orangeC)),
onPressed: () {
// if (_formKey.currentState.validate()) {
// _formKey.currentState.save();
// }
// _historyProvider.pay(payAmount.text, payComment.text);
Navigator.push(context,
MaterialPageRoute(builder: (context) {
return UnlockingWallet(
wallet: defaultWallet, action: "pay");
}));
},
child: Padding(
padding: const EdgeInsets.all(12),
child: Text(
"PAYER",
style: TextStyle(fontSize: 25, color: Colors.grey[850]),
),
),
),
)
],
),
),

View File

@ -36,7 +36,6 @@ class UnlockingWallet extends StatelessWidget {
Provider.of<WalletOptionsProvider>(context);
int _pinLenght;
ChestData currentChest = chestBox.get(configBox.get('currentChest'));
if (currentChest.isCesium) {
@ -53,7 +52,7 @@ class UnlockingWallet extends StatelessWidget {
child: Column(children: <Widget>[
Expanded(
child: Column(children: <Widget>[
SizedBox(height: isTall ? 80 : 20),
SizedBox(height: isTall ? 100 : 20),
Row(mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[
currentChest.imageFile == null
? Image.asset(

View File

@ -133,55 +133,63 @@ Widget sentanceArray(BuildContext context) {
builder: (context, formatedArray) {
// print(formatedArray.data);
return Container(
padding: const EdgeInsets.symmetric(horizontal: 12),
child: Container(
decoration: BoxDecoration(
border: Border.all(color: Colors.black),
color: Colors.grey[300],
borderRadius: const BorderRadius.all(
Radius.circular(10),
)),
// color: Colors.grey[300],
padding: const EdgeInsets.all(20),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Row(children: <Widget>[
arrayCell(formatedArray.data[0]),
arrayCell(formatedArray.data[1]),
arrayCell(formatedArray.data[2]),
arrayCell(formatedArray.data[3]),
]),
const SizedBox(height: 15),
Row(children: <Widget>[
arrayCell(formatedArray.data[4]),
arrayCell(formatedArray.data[5]),
arrayCell(formatedArray.data[6]),
arrayCell(formatedArray.data[7]),
]),
const SizedBox(height: 15),
Row(children: <Widget>[
arrayCell(formatedArray.data[8]),
arrayCell(formatedArray.data[9]),
arrayCell(formatedArray.data[10]),
arrayCell(formatedArray.data[11]),
]),
])));
padding: const EdgeInsets.symmetric(horizontal: 12),
child: Container(
decoration: BoxDecoration(
border: Border.all(color: Colors.black),
color: Colors.grey[300],
borderRadius: const BorderRadius.all(
Radius.circular(10),
)),
// color: Colors.grey[300],
padding: const EdgeInsets.all(20),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Row(children: <Widget>[
arrayCell(formatedArray.data[0]),
arrayCell(formatedArray.data[1]),
arrayCell(formatedArray.data[2]),
arrayCell(formatedArray.data[3]),
]),
const SizedBox(height: 15),
Row(children: <Widget>[
arrayCell(formatedArray.data[4]),
arrayCell(formatedArray.data[5]),
arrayCell(formatedArray.data[6]),
arrayCell(formatedArray.data[7]),
]),
const SizedBox(height: 15),
Row(children: <Widget>[
arrayCell(formatedArray.data[8]),
arrayCell(formatedArray.data[9]),
arrayCell(formatedArray.data[10]),
arrayCell(formatedArray.data[11]),
]),
]),
),
);
});
}
Widget arrayCell(dataWord) {
return SizedBox(
width: 102,
child: Column(children: <Widget>[
Text(dataWord.split(':')[0], style: const TextStyle(fontSize: 14)),
const SizedBox(height: 2),
Text(dataWord.split(':')[1],
key: Key('word${dataWord.split(':')[0]}'),
style: const TextStyle(fontSize: 19, color: Colors.black)),
]));
width: 102,
child: Column(children: <Widget>[
Text(
dataWord.split(':')[0],
style: const TextStyle(fontSize: 14),
),
const SizedBox(height: 2),
Text(
dataWord.split(':')[1],
key: Key('word${dataWord.split(':')[0]}'),
style: const TextStyle(fontSize: 19, color: Colors.black),
),
]),
);
}
// ignore: must_be_immutable