more design changes

master
ibal 2022-11-09 08:55:45 +01:00
parent f325e27f8b
commit 41de20703a
1 changed files with 89 additions and 84 deletions

View File

@ -54,7 +54,9 @@ class MyCustomFormState extends StatelessWidget with InputValidationMixin {
appBar: AppBar( appBar: AppBar(
title: Text(title), title: Text(title),
), ),
body: Form( body: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16.0),
child: Form(
key: formGlobalKey, key: formGlobalKey,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -114,32 +116,35 @@ class MyCustomFormState extends StatelessWidget with InputValidationMixin {
} }
}, },
), ),
FittedBox( Padding(
padding: const EdgeInsets.symmetric(horizontal: 225.0),
child: FittedBox(
child: Text( child: Text(
'$_joule Joule \n' '$_joule Joule \n'
'$_energyWater Liter Wasser können damit erhitzt werden \n' '$_energyWater Liter Wasser können damit erhitzt werden \n'
'$_energyIron kg Eisen können damit zu glühen gebracht werden', '$_energyIron kg Eisen können damit zu glühen gebracht werden',
style: new TextStyle( style: const TextStyle(
fontSize: 20.0, fontSize: 20.0,
color: Colors.black, ),
textAlign: TextAlign.center,
))), ))),
Padding( Padding(
padding: const EdgeInsets.symmetric(vertical: 16.0), padding: const EdgeInsets.symmetric(horizontal: 425.0),
child: ElevatedButton( child: ElevatedButton(
onPressed: () => { onPressed: () => {
if (formGlobalKey.currentState!.validate()) if (formGlobalKey.currentState!.validate())
{formGlobalKey.currentState!.save()}, {formGlobalKey.currentState!.save()},
_changeJoule(context), _changeJoule(context),
}, },
child: Text('Submit', child: const Text('Submit',
style: new TextStyle( style: TextStyle(
fontSize: 20.0, fontSize: 20.0,
)), )),
), ),
), ),
], ],
), ),
)); )));
} }
} }