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 - Flutter
DEPENDENCIES: DEPENDENCIES:
- Flutter (from `.symlinks/flutter/ios`) - Flutter (from `.symlinks/flutter/ios-profile`)
- shared_preferences (from `.symlinks/plugins/shared_preferences/ios`) - shared_preferences (from `.symlinks/plugins/shared_preferences/ios`)
- url_launcher (from `.symlinks/plugins/url_launcher/ios`) - url_launcher (from `.symlinks/plugins/url_launcher/ios`)
EXTERNAL SOURCES: EXTERNAL SOURCES:
Flutter: Flutter:
:path: ".symlinks/flutter/ios" :path: ".symlinks/flutter/ios-profile"
shared_preferences: shared_preferences:
:path: ".symlinks/plugins/shared_preferences/ios" :path: ".symlinks/plugins/shared_preferences/ios"
url_launcher: url_launcher:

View file

@ -281,7 +281,7 @@
); );
inputPaths = ( inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh", "${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"; name = "[CP] Embed Pods Frameworks";
outputPaths = ( outputPaths = (

View file

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

View file

@ -86,7 +86,7 @@ class LoginPageState extends State<LoginPage> {
body: Container( body: Container(
decoration: BoxDecoration(color: Colors.white), decoration: BoxDecoration(color: Colors.white),
child: Container( child: Container(
margin: EdgeInsets.fromLTRB(60,0,60,0), margin: EdgeInsets.fromLTRB(60,30,60,0),
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
@ -165,7 +165,7 @@ class LoginPageState extends State<LoginPage> {
// ), // ),
// ), // ),
Padding( 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 : Material(
child : InkWell( child : InkWell(
@ -191,12 +191,9 @@ class LoginPageState extends State<LoginPage> {
Padding( Padding(
padding: EdgeInsets.fromLTRB(0, 10, 0, 50), padding: EdgeInsets.fromLTRB(0, 10, 0, 50),
child: LabeledCheckboxWithIcon( child: LabeledCheckbox(
label : "SAVE LOGIN", label : "SAVE LOGIN",
textStyle: TextStyle(fontSize: 18, color: Colors.black54, fontWeight: FontWeight.bold), 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), padding: const EdgeInsets.fromLTRB(0,0,0,0),
value : _saveLoginDetails, 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;
});
},
),*/
), ),
], ],
), ),