slightly nicer login page (no icon although it can be easily added back)

This commit is contained in:
Felix 2019-07-09 12:44:05 +01:00
parent c389e2e005
commit 2d0b6230ae
4 changed files with 34 additions and 16 deletions

View file

@ -6,13 +6,13 @@ PODS:
- Flutter
DEPENDENCIES:
- Flutter (from `.symlinks/flutter/ios`)
- Flutter (from `.symlinks/flutter/ios-profile`)
- shared_preferences (from `.symlinks/plugins/shared_preferences/ios`)
- url_launcher (from `.symlinks/plugins/url_launcher/ios`)
EXTERNAL SOURCES:
Flutter:
:path: ".symlinks/flutter/ios"
:path: ".symlinks/flutter/ios-profile"
shared_preferences:
:path: ".symlinks/plugins/shared_preferences/ios"
url_launcher:

View file

@ -281,7 +281,7 @@
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
"${PODS_ROOT}/../.symlinks/flutter/ios/Flutter.framework",
"${PODS_ROOT}/../.symlinks/flutter/ios-profile/Flutter.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (

View file

@ -6,7 +6,7 @@ class LabeledCheckboxWithIcon extends StatelessWidget {
this.label,
this.textStyle,
this.icon,
// this.iconSize,
this.iconSize,
this.iconColor,
this.padding,
this.value,
@ -16,7 +16,7 @@ class LabeledCheckboxWithIcon extends StatelessWidget {
final String label;
final TextStyle textStyle;
final IconData icon;
// final double iconSize;
final double iconSize;
final Color iconColor;
final EdgeInsets padding;
final bool value;
@ -34,11 +34,13 @@ class LabeledCheckboxWithIcon extends StatelessWidget {
padding: padding,
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
// crossAxisAlignment: CrossAxisAlignment.center, //doesn't do anything
children: <Widget>[
Padding(
padding: EdgeInsets.fromLTRB(0, 0, 0, 0),
Container(
padding: EdgeInsets.all(0),
width: iconSize,
child : Icon(
icon,
// size: iconSize,
@ -92,8 +94,11 @@ class LabeledCheckbox extends StatelessWidget {
children: <Widget>[
Expanded(child: Text(label, style: textStyle)),
Checkbox(
CustomCheckbox(
//custom checkbox removes padding so the form looks nice
value: value,
useTapTarget: false,
onChanged: (bool newValue) {
onChanged(newValue);
},

View file

@ -86,7 +86,7 @@ class LoginPageState extends State<LoginPage> {
body: Container(
decoration: BoxDecoration(color: Colors.white),
child: Container(
margin: EdgeInsets.fromLTRB(60,0,60,0),
margin: EdgeInsets.fromLTRB(60,30,60,0),
child: Column(
children: <Widget>[
Expanded(
@ -165,7 +165,7 @@ class LoginPageState extends State<LoginPage> {
// ),
// ),
Padding(
padding: EdgeInsets.fromLTRB(0.0, 25.0, 0.0, 15.0),
padding: EdgeInsets.fromLTRB(0.0, 40.0, 0.0, 30.0),
child : Material(
child : InkWell(
@ -191,12 +191,9 @@ class LoginPageState extends State<LoginPage> {
Padding(
padding: EdgeInsets.fromLTRB(0, 10, 0, 50),
child: LabeledCheckboxWithIcon(
child: LabeledCheckbox(
label : "SAVE LOGIN",
textStyle: TextStyle(fontSize: 18, color: Colors.black54, fontWeight: FontWeight.bold),
icon: Icons.account_box,
// iconSize: 18,
iconColor: Colors.black54,
padding: const EdgeInsets.fromLTRB(0,0,0,0),
value : _saveLoginDetails,
@ -206,6 +203,22 @@ class LoginPageState extends State<LoginPage> {
});
},
),
/*child: LabeledCheckboxWithIcon(
label : "SAVE LOGIN",
textStyle: TextStyle(fontSize: 18, color: Colors.black54, fontWeight: FontWeight.bold),
icon: Icons.account_box, // need to remove icon padding!!
iconSize: 18,
iconColor: Colors.black54,
padding: const EdgeInsets.fromLTRB(0,0,0,0),
value : _saveLoginDetails,
onChanged: (bool newValue) {
setState(() {
_saveLoginDetails = newValue;
});
},
),*/
),
],
),