mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-20 06:08:34 +02:00
Merge pull request #53 from cake-tech/CWA-204-rework-new-wallet-creation
Cwa 204 rework new wallet creation
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:cake_wallet/palette.dart';
|
||||
|
||||
class PrimaryButton extends StatelessWidget {
|
||||
const PrimaryButton(
|
||||
@@ -27,7 +26,8 @@ class PrimaryButton extends StatelessWidget {
|
||||
onPressed: isDisabled
|
||||
? (onDisabledPressed != null ? onDisabledPressed : null)
|
||||
: onPressed,
|
||||
color: isDisabled ? Colors.transparent : color,
|
||||
color: color,
|
||||
disabledColor: color.withOpacity(0.5),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(26.0)),
|
||||
child: Text(text,
|
||||
@@ -35,8 +35,9 @@ class PrimaryButton extends StatelessWidget {
|
||||
fontSize: 15.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: isDisabled
|
||||
? Palette.darkGrey
|
||||
: textColor)),
|
||||
? Colors.grey.withOpacity(0.5)
|
||||
: textColor
|
||||
)),
|
||||
));
|
||||
}
|
||||
}
|
||||
@@ -46,13 +47,13 @@ class LoadingPrimaryButton extends StatelessWidget {
|
||||
{@required this.onPressed,
|
||||
@required this.text,
|
||||
@required this.color,
|
||||
@required this.borderColor,
|
||||
@required this.textColor,
|
||||
this.isDisabled = false,
|
||||
this.isLoading = false});
|
||||
|
||||
final VoidCallback onPressed;
|
||||
final Color color;
|
||||
final Color borderColor;
|
||||
final Color textColor;
|
||||
final bool isLoading;
|
||||
final bool isDisabled;
|
||||
final String text;
|
||||
@@ -61,19 +62,23 @@ class LoadingPrimaryButton extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return ButtonTheme(
|
||||
minWidth: double.infinity,
|
||||
height: 56.0,
|
||||
height: 52.0,
|
||||
child: FlatButton(
|
||||
onPressed: (isLoading || isDisabled) ? null : onPressed,
|
||||
color: color,
|
||||
disabledColor: color.withOpacity(0.5),
|
||||
shape: RoundedRectangleBorder(
|
||||
side: BorderSide(color: borderColor),
|
||||
borderRadius: BorderRadius.circular(10.0)),
|
||||
borderRadius: BorderRadius.circular(26.0)),
|
||||
child: isLoading
|
||||
? CupertinoActivityIndicator(animating: true)
|
||||
: Text(text,
|
||||
style: TextStyle(
|
||||
fontSize: 16.0,
|
||||
color: Theme.of(context).primaryTextTheme.button.color)),
|
||||
style: TextStyle(
|
||||
fontSize: 15.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: isDisabled
|
||||
? Colors.grey.withOpacity(0.5)
|
||||
: textColor
|
||||
)),
|
||||
));
|
||||
}
|
||||
}
|
||||
@@ -179,34 +184,6 @@ class PrimaryImageButton extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
)
|
||||
/*Row(
|
||||
children: <Widget>[
|
||||
Container(
|
||||
width: 28.0,
|
||||
height: 56.0,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle, color: Colors.transparent),
|
||||
child: image,
|
||||
),
|
||||
Expanded(
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
Container(
|
||||
height: 56.0,
|
||||
child: Center(
|
||||
child: Text(text,
|
||||
style: TextStyle(
|
||||
fontSize: 18.0,
|
||||
color: Theme.of(context)
|
||||
.primaryTextTheme
|
||||
.button
|
||||
.color)),
|
||||
),
|
||||
)
|
||||
]))
|
||||
],
|
||||
),*/
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user