# Conflicts: # lib/src/screens/exchange/exchange_page.dart # lib/src/screens/new_wallet/new_wallet_page.dart # lib/src/screens/new_wallet/widgets/select_button.dart # lib/src/screens/rescan/rescan_page.dart # lib/src/screens/restore/restore_wallet_from_keys_page.dart # lib/src/screens/restore/restore_wallet_from_seed_details.dart # lib/src/screens/seed_language/widgets/seed_language_picker.dart # lib/src/widgets/primary_button.dartwownero
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1017 B |
After Width: | Height: | Size: 186 B |
After Width: | Height: | Size: 1001 B |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 959 B |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 954 B |
After Width: | Height: | Size: 385 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 944 B |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 146 KiB |
After Width: | Height: | Size: 145 KiB |
After Width: | Height: | Size: 388 KiB |
After Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 231 B |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 497 B |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 286 KiB |
After Width: | Height: | Size: 282 KiB |
After Width: | Height: | Size: 791 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 153 B |
After Width: | Height: | Size: 49 KiB |
After Width: | Height: | Size: 116 KiB |
@ -0,0 +1,146 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:cake_wallet/generated/i18n.dart';
|
||||
import 'package:cake_wallet/src/screens/base_page.dart';
|
||||
import 'package:cake_wallet/src/widgets/primary_button.dart';
|
||||
import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart';
|
||||
import 'package:cake_wallet/palette.dart';
|
||||
import 'package:cake_wallet/src/screens/new_wallet/widgets/select_button.dart';
|
||||
import 'package:cake_wallet/routes.dart';
|
||||
|
||||
class NewWalletTypePage extends BasePage {
|
||||
@override
|
||||
String get title => S.current.new_wallet;
|
||||
|
||||
@override
|
||||
Color get backgroundColor => PaletteDark.historyPanel;
|
||||
|
||||
@override
|
||||
Widget body(BuildContext context) => WalletTypeForm();
|
||||
}
|
||||
|
||||
class WalletTypeForm extends StatefulWidget {
|
||||
@override
|
||||
WalletTypeFormState createState() => WalletTypeFormState();
|
||||
}
|
||||
|
||||
class WalletTypeFormState extends State<WalletTypeForm> {
|
||||
static const aspectRatioImage = 1.22;
|
||||
|
||||
final moneroIcon = Image.asset('assets/images/monero.png', height: 24, width: 24);
|
||||
final bitcoinIcon = Image.asset('assets/images/bitcoin.png', height: 24, width: 24);
|
||||
final walletTypeImage = Image.asset('assets/images/wallet_type.png');
|
||||
|
||||
bool isDisabledButton;
|
||||
bool isMoneroSelected;
|
||||
bool isBitcoinSelected;
|
||||
|
||||
Color moneroBackgroundColor;
|
||||
Color moneroTextColor;
|
||||
Color bitcoinBackgroundColor;
|
||||
Color bitcoinTextColor;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
isDisabledButton = true;
|
||||
isMoneroSelected = false;
|
||||
isBitcoinSelected = false;
|
||||
|
||||
moneroBackgroundColor = PaletteDark.menuList;
|
||||
moneroTextColor = Colors.white;
|
||||
bitcoinBackgroundColor = PaletteDark.menuList;
|
||||
bitcoinTextColor = Colors.white;
|
||||
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
color: PaletteDark.historyPanel,
|
||||
padding: EdgeInsets.only(top: 24),
|
||||
child: ScrollableWithBottomSection(
|
||||
contentPadding: EdgeInsets.only(left: 24, right: 24, bottom: 24),
|
||||
content: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 12, right: 12),
|
||||
child: AspectRatio(
|
||||
aspectRatio: aspectRatioImage,
|
||||
child: FittedBox(child: walletTypeImage, fit: BoxFit.fill)),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(top: 48),
|
||||
child: Text(
|
||||
S.of(context).choose_wallet_currency,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Colors.white
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(top: 24),
|
||||
child: SelectButton(
|
||||
image: bitcoinIcon,
|
||||
text: 'Bitcoin',
|
||||
color: bitcoinBackgroundColor,
|
||||
textColor: bitcoinTextColor,
|
||||
onTap: () {}),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(top: 20),
|
||||
child: SelectButton(
|
||||
image: moneroIcon,
|
||||
text: 'Monero',
|
||||
color: moneroBackgroundColor,
|
||||
textColor: moneroTextColor,
|
||||
onTap: () => onSelectMoneroButton()),
|
||||
)
|
||||
],
|
||||
),
|
||||
bottomSectionPadding: EdgeInsets.only(
|
||||
left: 24,
|
||||
right: 24,
|
||||
bottom: 24
|
||||
),
|
||||
bottomSection: PrimaryButton(
|
||||
onPressed: () => Navigator.of(context).pushNamed(Routes.newWallet),
|
||||
text: S.of(context).seed_language_next,
|
||||
color: Colors.green,
|
||||
textColor: Colors.white,
|
||||
isDisabled: isDisabledButton,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
void onSelectMoneroButton() {
|
||||
isMoneroSelected = true;
|
||||
isBitcoinSelected = false;
|
||||
isDisabledButton = false;
|
||||
|
||||
moneroBackgroundColor = Colors.white;
|
||||
moneroTextColor = PaletteDark.selectButtonText;
|
||||
bitcoinBackgroundColor = PaletteDark.menuList;
|
||||
bitcoinTextColor = Colors.white;
|
||||
|
||||
setState(() {});
|
||||
}
|
||||
|
||||
void onSelectBitcoinButton() {
|
||||
isMoneroSelected = false;
|
||||
isBitcoinSelected = true;
|
||||
isDisabledButton = false;
|
||||
|
||||
moneroBackgroundColor = PaletteDark.menuList;
|
||||
moneroTextColor = Colors.white;
|
||||
bitcoinBackgroundColor = Colors.white;
|
||||
bitcoinTextColor = PaletteDark.selectButtonText;
|
||||
|
||||
setState(() {});
|
||||
}
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:cake_wallet/src/widgets/base_alert_dialog.dart';
|
||||
|
||||
class WalletCreationDialog extends BaseAlertDialog {
|
||||
WalletCreationDialog({
|
||||
@required this.dialogTitle,
|
||||
@required this.dialogContent,
|
||||
@required this.dialogButtonText,
|
||||
@required this.dialogButtonAction,
|
||||
});
|
||||
|
||||
final String dialogTitle;
|
||||
final String dialogContent;
|
||||
final String dialogButtonText;
|
||||
final VoidCallback dialogButtonAction;
|
||||
|
||||
@override
|
||||
String get titleText => dialogTitle;
|
||||
|
||||
@override
|
||||
String get contentText => dialogContent;
|
||||
|
||||
@override
|
||||
Widget actionButtons(BuildContext context) {
|
||||
return Container(
|
||||
width: 300,
|
||||
height: 52,
|
||||
padding: EdgeInsets.only(left: 12, right: 12),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.only(
|
||||
bottomLeft: Radius.circular(24),
|
||||
bottomRight: Radius.circular(24)
|
||||
),
|
||||
color: Colors.white
|
||||
),
|
||||
child: ButtonTheme(
|
||||
minWidth: double.infinity,
|
||||
child: FlatButton(
|
||||
onPressed: dialogButtonAction,
|
||||
highlightColor: Colors.transparent,
|
||||
splashColor: Colors.transparent,
|
||||
child: Text(
|
||||
dialogButtonText,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 15,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Colors.blue,
|
||||
decoration: TextDecoration.none,
|
||||
),
|
||||
)),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
}
|