CWA-201 | applied new design to primary button and seed page; added base alert dialog and reconnect alert dialog

This commit is contained in:
Oleksandr Sobol
2020-04-24 20:34:32 +03:00
parent 6a799df7da
commit df64e7b5e1
19 changed files with 403 additions and 177 deletions
+8 -7
View File
@@ -7,14 +7,14 @@ class PrimaryButton extends StatelessWidget {
{@required this.onPressed,
@required this.text,
@required this.color,
@required this.borderColor,
@required this.textColor,
this.isDisabled = false,
this.onDisabledPressed});
final VoidCallback onPressed;
final VoidCallback onDisabledPressed;
final Color color;
final Color borderColor;
final Color textColor;
final String text;
final bool isDisabled;
@@ -22,21 +22,21 @@ class PrimaryButton extends StatelessWidget {
Widget build(BuildContext context) {
return ButtonTheme(
minWidth: double.infinity,
height: 56.0,
height: 52.0,
child: FlatButton(
onPressed: isDisabled
? (onDisabledPressed != null ? onDisabledPressed : null)
: onPressed,
color: isDisabled ? Colors.transparent : color,
shape: RoundedRectangleBorder(
side: BorderSide(color: borderColor),
borderRadius: BorderRadius.circular(10.0)),
borderRadius: BorderRadius.circular(26.0)),
child: Text(text,
style: TextStyle(
fontSize: 16.0,
fontSize: 15.0,
fontWeight: FontWeight.w600,
color: isDisabled
? Palette.darkGrey
: Theme.of(context).primaryTextTheme.button.color)),
: textColor)),
));
}
}
@@ -172,6 +172,7 @@ class PrimaryImageButton extends StatelessWidget {
text,
style: TextStyle(
fontSize: 15,
fontWeight: FontWeight.w600,
color: textColor
),
)