CWA-205 | applied new design to seed_language_page

This commit is contained in:
Oleksandr Sobol 2020-05-01 21:36:48 +03:00
parent 3180ab65e1
commit 4215ac2425
30 changed files with 419 additions and 127 deletions

BIN
assets/images/china.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 582 B

BIN
assets/images/germany.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 576 B

BIN
assets/images/holland.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 596 B

BIN
assets/images/india.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 683 B

BIN
assets/images/japan.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 570 B

BIN
assets/images/poland.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 538 B

BIN
assets/images/portugal.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 773 B

BIN
assets/images/russia.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 557 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 290 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 680 B

BIN
assets/images/spain.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 518 B

BIN
assets/images/usa.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 838 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

View file

@ -148,8 +148,9 @@ class S implements WidgetsLocalizations {
String get restore_wallet_restore_description => "Wallet restore description"; String get restore_wallet_restore_description => "Wallet restore description";
String get save => "Save"; String get save => "Save";
String get saved_the_trade_id => "I've saved the trade ID"; String get saved_the_trade_id => "I've saved the trade ID";
String get seed_choose => "Choose seed language";
String get seed_language_chinese => "Chinese"; String get seed_language_chinese => "Chinese";
String get seed_language_choose => "Please choose seed language"; String get seed_language_choose => "Please choose seed language:";
String get seed_language_dutch => "Dutch"; String get seed_language_dutch => "Dutch";
String get seed_language_english => "English"; String get seed_language_english => "English";
String get seed_language_german => "German"; String get seed_language_german => "German";
@ -398,7 +399,7 @@ class $de extends S {
@override @override
String get restore_title_from_keys => "Wiederherstellen von Schlüsseln"; String get restore_title_from_keys => "Wiederherstellen von Schlüsseln";
@override @override
String get seed_language_choose => "Bitte wählen Sie die Ausgangssprache"; String get seed_language_choose => "Bitte wählen Sie die Ausgangssprache:";
@override @override
String get wallet_keys => "Wallet schlüssel"; String get wallet_keys => "Wallet schlüssel";
@override @override
@ -648,6 +649,8 @@ class $de extends S {
@override @override
String get change_currency => "Währung ändern"; String get change_currency => "Währung ändern";
@override @override
String get seed_choose => "Wählen Sie die Ausgangssprache";
@override
String get transaction_details_amount => "Menge"; String get transaction_details_amount => "Menge";
@override @override
String get widgets_address => "Adresse"; String get widgets_address => "Adresse";
@ -974,7 +977,7 @@ class $hi extends S {
@override @override
String get restore_title_from_keys => "कुंजी से पुनर्स्थापित करें"; String get restore_title_from_keys => "कुंजी से पुनर्स्थापित करें";
@override @override
String get seed_language_choose => "कृपया बीज भाषा चुनें"; String get seed_language_choose => "कृपया बीज भाषा चुनें:";
@override @override
String get wallet_keys => "बटुआ की"; String get wallet_keys => "बटुआ की";
@override @override
@ -1224,6 +1227,8 @@ class $hi extends S {
@override @override
String get change_currency => "मुद्रा परिवर्तन करें"; String get change_currency => "मुद्रा परिवर्तन करें";
@override @override
String get seed_choose => "बीज भाषा चुनें";
@override
String get transaction_details_amount => "रकम"; String get transaction_details_amount => "रकम";
@override @override
String get widgets_address => "पता"; String get widgets_address => "पता";
@ -1550,7 +1555,7 @@ class $ru extends S {
@override @override
String get restore_title_from_keys => "Восстановить с помощью ключей"; String get restore_title_from_keys => "Восстановить с помощью ключей";
@override @override
String get seed_language_choose => "Пожалуйста, выберите язык мнемонической фразы"; String get seed_language_choose => "Пожалуйста, выберите язык мнемонической фразы:";
@override @override
String get wallet_keys => "Ключи кошелька"; String get wallet_keys => "Ключи кошелька";
@override @override
@ -1800,6 +1805,8 @@ class $ru extends S {
@override @override
String get change_currency => "Изменить валюту"; String get change_currency => "Изменить валюту";
@override @override
String get seed_choose => "Выберите язык мнемонической фразы";
@override
String get transaction_details_amount => "Сумма"; String get transaction_details_amount => "Сумма";
@override @override
String get widgets_address => "Адрес"; String get widgets_address => "Адрес";
@ -2126,7 +2133,7 @@ class $ko extends S {
@override @override
String get restore_title_from_keys => "키에서 복원"; String get restore_title_from_keys => "키에서 복원";
@override @override
String get seed_language_choose => "종자 언어를 선택하십시오"; String get seed_language_choose => "종자 언어를 선택하십시오:";
@override @override
String get wallet_keys => "지갑 키"; String get wallet_keys => "지갑 키";
@override @override
@ -2376,6 +2383,8 @@ class $ko extends S {
@override @override
String get change_currency => "통화 변경"; String get change_currency => "통화 변경";
@override @override
String get seed_choose => "시드 언어를 선택하십시오";
@override
String get transaction_details_amount => ""; String get transaction_details_amount => "";
@override @override
String get widgets_address => "주소"; String get widgets_address => "주소";
@ -2702,7 +2711,7 @@ class $pt extends S {
@override @override
String get restore_title_from_keys => "Restaurar a partir de chaves"; String get restore_title_from_keys => "Restaurar a partir de chaves";
@override @override
String get seed_language_choose => "Por favor, escolha o idioma da semente"; String get seed_language_choose => "Por favor, escolha o idioma da semente:";
@override @override
String get wallet_keys => "Chaves da carteira"; String get wallet_keys => "Chaves da carteira";
@override @override
@ -2952,6 +2961,8 @@ class $pt extends S {
@override @override
String get change_currency => "Alterar moeda"; String get change_currency => "Alterar moeda";
@override @override
String get seed_choose => "Escolha o idioma da semente";
@override
String get transaction_details_amount => "Quantia"; String get transaction_details_amount => "Quantia";
@override @override
String get widgets_address => "Endereço"; String get widgets_address => "Endereço";
@ -3278,7 +3289,7 @@ class $uk extends S {
@override @override
String get restore_title_from_keys => "Відновити за допомогою ключів"; String get restore_title_from_keys => "Відновити за допомогою ключів";
@override @override
String get seed_language_choose => "Будь ласка, виберіть мову мнемонічної фрази"; String get seed_language_choose => "Будь ласка, виберіть мову мнемонічної фрази:";
@override @override
String get wallet_keys => "Ключі гаманця"; String get wallet_keys => "Ключі гаманця";
@override @override
@ -3528,6 +3539,8 @@ class $uk extends S {
@override @override
String get change_currency => "Змінити валюту"; String get change_currency => "Змінити валюту";
@override @override
String get seed_choose => "Виберіть мову мнемонічної фрази";
@override
String get transaction_details_amount => "Сума"; String get transaction_details_amount => "Сума";
@override @override
String get widgets_address => "Адреса"; String get widgets_address => "Адреса";
@ -3854,7 +3867,7 @@ class $ja extends S {
@override @override
String get restore_title_from_keys => "キーから復元する"; String get restore_title_from_keys => "キーから復元する";
@override @override
String get seed_language_choose => "シード言語を選択してください"; String get seed_language_choose => "シード言語を選択してください:";
@override @override
String get wallet_keys => "ウォレットキー"; String get wallet_keys => "ウォレットキー";
@override @override
@ -4104,6 +4117,8 @@ class $ja extends S {
@override @override
String get change_currency => "通貨を変更する"; String get change_currency => "通貨を変更する";
@override @override
String get seed_choose => "シード言語を選択してください";
@override
String get transaction_details_amount => ""; String get transaction_details_amount => "";
@override @override
String get widgets_address => "住所"; String get widgets_address => "住所";
@ -4434,7 +4449,7 @@ class $pl extends S {
@override @override
String get restore_title_from_keys => "Przywróć z kluczy"; String get restore_title_from_keys => "Przywróć z kluczy";
@override @override
String get seed_language_choose => "Proszę wybrać język początkowy"; String get seed_language_choose => "Proszę wybrać język początkowy:";
@override @override
String get wallet_keys => "Klucze portfela"; String get wallet_keys => "Klucze portfela";
@override @override
@ -4684,6 +4699,8 @@ class $pl extends S {
@override @override
String get change_currency => "Change Currency"; String get change_currency => "Change Currency";
@override @override
String get seed_choose => "Wybierz język początkowy";
@override
String get transaction_details_amount => "Ilość"; String get transaction_details_amount => "Ilość";
@override @override
String get widgets_address => "Adres"; String get widgets_address => "Adres";
@ -5010,7 +5027,7 @@ class $es extends S {
@override @override
String get restore_title_from_keys => "De las claves"; String get restore_title_from_keys => "De las claves";
@override @override
String get seed_language_choose => "Por favor elija el idioma semilla"; String get seed_language_choose => "Por favor elija el idioma semilla:";
@override @override
String get wallet_keys => "Billetera clave"; String get wallet_keys => "Billetera clave";
@override @override
@ -5260,6 +5277,8 @@ class $es extends S {
@override @override
String get change_currency => "Cambiar moneda"; String get change_currency => "Cambiar moneda";
@override @override
String get seed_choose => "Elige el idioma semilla";
@override
String get transaction_details_amount => "Cantidad"; String get transaction_details_amount => "Cantidad";
@override @override
String get widgets_address => "Dirección"; String get widgets_address => "Dirección";
@ -5586,7 +5605,7 @@ class $nl extends S {
@override @override
String get restore_title_from_keys => "Herstel van sleutels"; String get restore_title_from_keys => "Herstel van sleutels";
@override @override
String get seed_language_choose => "Kies een starttaal"; String get seed_language_choose => "Kies een starttaal:";
@override @override
String get wallet_keys => "Portemonnee sleutels"; String get wallet_keys => "Portemonnee sleutels";
@override @override
@ -5836,6 +5855,8 @@ class $nl extends S {
@override @override
String get change_currency => "Verander valuta"; String get change_currency => "Verander valuta";
@override @override
String get seed_choose => "Kies een starttaal";
@override
String get transaction_details_amount => "Bedrag"; String get transaction_details_amount => "Bedrag";
@override @override
String get widgets_address => "Adres"; String get widgets_address => "Adres";
@ -6162,7 +6183,7 @@ class $zh extends S {
@override @override
String get restore_title_from_keys => "从密钥还原"; String get restore_title_from_keys => "从密钥还原";
@override @override
String get seed_language_choose => "請選擇種子語言"; String get seed_language_choose => "請選擇種子語言:";
@override @override
String get wallet_keys => "钱包钥匙"; String get wallet_keys => "钱包钥匙";
@override @override
@ -6412,6 +6433,8 @@ class $zh extends S {
@override @override
String get change_currency => "更改币种"; String get change_currency => "更改币种";
@override @override
String get seed_choose => "選擇種子語言";
@override
String get transaction_details_amount => ""; String get transaction_details_amount => "";
@override @override
String get widgets_address => "地址"; String get widgets_address => "地址";

View file

@ -0,0 +1,66 @@
import 'package:flutter/material.dart';
class SelectButton extends StatelessWidget {
SelectButton({
@required this.image,
@required this.text,
@required this.color,
@required this.textColor,
@required this.onTap,
});
final Image image;
final String text;
final Color color;
final Color textColor;
final VoidCallback onTap;
final selectArrowImage = Image.asset('assets/images/select_arrow.png');
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: onTap,
child: Container(
width: double.infinity,
height: 60,
padding: EdgeInsets.only(left: 30, right: 30),
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(30)),
color: color
),
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
image != null
? image
: Offstage(),
Padding(
padding: image != null
? EdgeInsets.only(left: 15)
: EdgeInsets.only(left: 0),
child: Text(
text,
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.w600,
color: textColor
),
),
)
],
),
selectArrowImage
],
),
),
);
}
}

View file

@ -56,40 +56,5 @@ class RestoreWalletOptionsPage extends BasePage {
), ),
) )
); );
/*BaseRestoreWidget(
firstRestoreButton: RestoreButton(
onPressed: () {
seedLanguageStore.setCurrentRoute(Routes.restoreWalletFromSeed);
Navigator.pushNamed(context, Routes.seedLanguage);
},
imageWidget: ImageWidget(
image: _imageSeed,
aspectRatioImage: _aspectRatioImage,
isLargeScreen: isLargeScreen),
titleColor: Palette.lightViolet,
color: Palette.lightViolet,
title: S.of(context).restore_title_from_seed,
description: S.of(context).restore_description_from_seed,
textButton: S.of(context).restore_next,
),
secondRestoreButton: RestoreButton(
onPressed: () {
seedLanguageStore.setCurrentRoute(Routes.restoreWalletFromKeys);
Navigator.pushNamed(context, Routes.seedLanguage);
},
imageWidget: ImageWidget(
image: _imageKeys,
aspectRatioImage: _aspectRatioImage,
isLargeScreen: isLargeScreen),
titleColor: Palette.cakeGreen,
color: Palette.cakeGreen,
title: S.of(context).restore_title_from_keys,
description: S.of(context).restore_description_from_keys,
textButton: S.of(context).restore_next,
),
isLargeScreen: isLargeScreen,
);*/
} }
} }

View file

@ -1,52 +1,99 @@
import 'package:provider/provider.dart';
import 'package:flutter_mobx/flutter_mobx.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/generated/i18n.dart';
import 'package:cake_wallet/src/widgets/primary_button.dart';
import 'package:cake_wallet/src/screens/base_page.dart'; import 'package:cake_wallet/src/screens/base_page.dart';
import 'package:cake_wallet/src/screens/seed_language/widgets/seed_language_picker.dart'; import 'package:cake_wallet/src/widgets/primary_button.dart';
import 'package:provider/provider.dart'; import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart';
import 'package:cake_wallet/palette.dart';
import 'package:cake_wallet/src/stores/seed_language/seed_language_store.dart'; import 'package:cake_wallet/src/stores/seed_language/seed_language_store.dart';
import 'package:cake_wallet/src/screens/new_wallet/widgets/select_button.dart';
import 'package:cake_wallet/src/screens/seed_language/widgets/seed_language_picker.dart';
class SeedLanguage extends BasePage { class SeedLanguage extends BasePage {
final imageSeed = Image.asset('assets/images/seedIco.png'); @override
Color get backgroundColor => PaletteDark.historyPanel;
@override @override
Widget body(BuildContext context) { Widget body(BuildContext context) => SeedLanguageForm();
}
class SeedLanguageForm extends StatefulWidget {
@override
SeedLanguageFormState createState() => SeedLanguageFormState();
}
class SeedLanguageFormState extends State<SeedLanguageForm> {
static const aspectRatioImage = 1.22;
final walletNameImage = Image.asset('assets/images/wallet_name.png');
@override
Widget build(BuildContext context) {
final seedLanguageStore = Provider.of<SeedLanguageStore>(context); final seedLanguageStore = Provider.of<SeedLanguageStore>(context);
final List<String> seedLocales = [
S.current.seed_language_english,
S.current.seed_language_chinese,
S.current.seed_language_dutch,
S.current.seed_language_german,
S.current.seed_language_japanese,
S.current.seed_language_portuguese,
S.current.seed_language_russian,
S.current.seed_language_spanish
];
return Container( return Container(
padding: EdgeInsets.all(20.0), color: PaletteDark.historyPanel,
child: Column( padding: EdgeInsets.only(top: 24),
children: <Widget>[ child: ScrollableWithBottomSection(
Expanded( contentPadding: EdgeInsets.only(left: 24, right: 24, bottom: 24),
child: Center( content: Column(
child: Column( crossAxisAlignment: CrossAxisAlignment.center,
mainAxisSize: MainAxisSize.min, children: [
children: <Widget>[ Padding(
imageSeed, padding: EdgeInsets.only(left: 12, right: 12),
Text( child: AspectRatio(
aspectRatio: aspectRatioImage,
child: FittedBox(child: walletNameImage, fit: BoxFit.fill)),
),
Padding(padding: EdgeInsets.only(top: 40),
child: Text(
S.of(context).seed_language_choose, S.of(context).seed_language_choose,
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle(fontSize: 16.0), style: TextStyle(
), fontSize: 16.0,
SizedBox( fontWeight: FontWeight.w600,
height: 20.0, color: Colors.white
),
SeedLanguagePicker(),
],
), ),
), ),
), ),
PrimaryButton( Padding(padding: EdgeInsets.only(top: 24),
child: Observer(
builder: (_) => SelectButton(
image: null,
text: seedLocales[seedLanguages.indexOf(seedLanguageStore.selectedSeedLanguage)],
color: PaletteDark.menuList,
textColor: Colors.white,
onTap: () async => await showDialog(
context: context,
builder: (BuildContext context) => SeedLanguagePicker()
)
)
),
)
]),
bottomSectionPadding: EdgeInsets.only(left: 24, right: 24, bottom: 24),
bottomSection: Observer(
builder: (context) {
return PrimaryButton(
onPressed: () => onPressed: () =>
Navigator.of(context).popAndPushNamed(seedLanguageStore.currentRoute), Navigator.of(context).popAndPushNamed(seedLanguageStore.currentRoute),
text: S.of(context).seed_language_next, text: S.of(context).seed_language_next,
color: color: Colors.green,
Theme.of(context).primaryTextTheme.button.backgroundColor, textColor: Colors.white);
textColor: },
Theme.of(context).primaryTextTheme.button.color), )),
],
),
); );
} }
} }

View file

@ -1,55 +1,234 @@
import 'dart:ui';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:cake_wallet/palette.dart'; import 'package:cake_wallet/palette.dart';
import 'package:flutter_mobx/flutter_mobx.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:cake_wallet/src/stores/seed_language/seed_language_store.dart'; import 'package:cake_wallet/src/stores/seed_language/seed_language_store.dart';
import 'package:cake_wallet/src/widgets/present_picker.dart';
import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/generated/i18n.dart';
class SeedLanguagePicker extends StatelessWidget { List<Image> flagImages = [
List<String> seedLocales = [ Image.asset('assets/images/usa.png'),
S.current.seed_language_english, Image.asset('assets/images/china.png'),
S.current.seed_language_chinese, Image.asset('assets/images/holland.png'),
S.current.seed_language_dutch, Image.asset('assets/images/germany.png'),
S.current.seed_language_german, Image.asset('assets/images/japan.png'),
S.current.seed_language_japanese, Image.asset('assets/images/portugal.png'),
S.current.seed_language_portuguese, Image.asset('assets/images/russia.png'),
S.current.seed_language_russian, Image.asset('assets/images/spain.png'),
S.current.seed_language_spanish
]; ];
List<String> languageCodes = [
'Eng',
'Chi',
'Ned',
'Ger',
'Jap',
'Por',
'Rus',
'Esp',
];
enum Places {topLeft, topRight, bottomLeft, bottomRight, inside}
class SeedLanguagePicker extends StatefulWidget {
@override
SeedLanguagePickerState createState() => SeedLanguagePickerState();
}
class SeedLanguagePickerState extends State<SeedLanguagePicker> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final seedLanguageStore = Provider.of<SeedLanguageStore>(context); final seedLanguageStore = Provider.of<SeedLanguageStore>(context);
return Observer( return GestureDetector(
builder: (_) => InkWell( onTap: () => Navigator.of(context).pop(),
onTap: () => _setSeedLanguage(context),
child: Container( child: Container(
padding: EdgeInsets.all(8.0), color: Colors.transparent,
//width: double.infinity, child: BackdropFilter(
decoration: BoxDecoration( filter: ImageFilter.blur(sigmaX: 3.0, sigmaY: 3.0),
border: Border.all( child: Container(
color: Theme.of(context).dividerTheme.color decoration: BoxDecoration(color: PaletteDark.historyPanel.withOpacity(0.75)),
), child: Center(
borderRadius: BorderRadius.circular(8.0) child: Column(
), mainAxisSize: MainAxisSize.min,
child: Text(seedLocales[seedLanguages.indexOf(seedLanguageStore.selectedSeedLanguage)], children: <Widget>[
Container(
padding: EdgeInsets.only(left: 24, right: 24),
child: Text(
S.of(context).seed_choose,
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle(fontSize: 16.0, color: Palette.lightBlue), style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.bold,
decoration: TextDecoration.none,
color: Colors.white
), ),
), ),
)); ),
Padding(
padding: EdgeInsets.only(top: 24),
child: GestureDetector(
onTap: () => null,
child: Container(
height: 300,
width: 300,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(14)),
color: PaletteDark.walletCardSubAddressField
),
child: GridView.count(
shrinkWrap: true,
crossAxisCount: 3,
childAspectRatio: 1,
physics: const NeverScrollableScrollPhysics(),
crossAxisSpacing: 1,
mainAxisSpacing: 1,
children: List.generate(9, (index) {
if (index == 8) {
return gridTile(
isCurrent: false,
place: Places.bottomRight,
image: null,
text: '',
onTap: null);
} else {
final code = languageCodes[index];
final flag = flagImages[index];
final isCurrent = index == seedLanguages.indexOf(seedLanguageStore.selectedSeedLanguage);
if (index == 0) {
return gridTile(
isCurrent: isCurrent,
place: Places.topLeft,
image: flag,
text: code,
onTap: () {
seedLanguageStore.setSelectedSeedLanguage(seedLanguages[index]);
Navigator.of(context).pop();
}
);
} }
Future<void> _setSeedLanguage(BuildContext context) async { if (index == 2) {
final seedLanguageStore = Provider.of<SeedLanguageStore>(context); return gridTile(
String selectedSeedLanguage = isCurrent: isCurrent,
await presentPicker(context, seedLocales); place: Places.topRight,
image: flag,
text: code,
onTap: () {
seedLanguageStore.setSelectedSeedLanguage(seedLanguages[index]);
Navigator.of(context).pop();
}
);
}
if (selectedSeedLanguage != null) { if (index == 6) {
selectedSeedLanguage = seedLanguages[seedLocales.indexOf(selectedSeedLanguage)]; return gridTile(
seedLanguageStore.setSelectedSeedLanguage(selectedSeedLanguage); isCurrent: isCurrent,
} place: Places.bottomLeft,
image: flag,
text: code,
onTap: () {
seedLanguageStore.setSelectedSeedLanguage(seedLanguages[index]);
Navigator.of(context).pop();
}
);
}
return gridTile(
isCurrent: isCurrent,
place: Places.inside,
image: flag,
text: code,
onTap: () {
seedLanguageStore.setSelectedSeedLanguage(seedLanguages[index]);
Navigator.of(context).pop();
}
);
}
}),
),
),
),
)
],
),
),
),
),
),
);
}
Widget gridTile({
@required bool isCurrent,
@required Places place,
@required Image image,
@required String text,
@required VoidCallback onTap}) {
BorderRadius borderRadius;
final color = isCurrent ? PaletteDark.historyPanel : PaletteDark.menuList;
final textColor = isCurrent ? Colors.blue : Colors.white;
switch (place) {
case Places.topLeft:
borderRadius = BorderRadius.only(topLeft: Radius.circular(14));
break;
case Places.topRight:
borderRadius = BorderRadius.only(topRight: Radius.circular(14));
break;
case Places.bottomLeft:
borderRadius = BorderRadius.only(bottomLeft: Radius.circular(14));
break;
case Places.bottomRight:
borderRadius = BorderRadius.only(bottomRight: Radius.circular(14));
break;
case Places.inside:
borderRadius = BorderRadius.all(Radius.circular(0));
break;
}
return GestureDetector(
onTap: onTap,
child: Container(
padding: EdgeInsets.all(10),
decoration: BoxDecoration(
borderRadius: borderRadius,
color: color
),
child: Center(
child: Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
image != null
? image
: Offstage(),
Padding(
padding: image != null
? EdgeInsets.only(left: 10)
: EdgeInsets.only(left: 0),
child: Text(
text,
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.bold,
decoration: TextDecoration.none,
color: textColor
),
),
)
],
),
),
)
);
} }
} }

View file

@ -159,7 +159,8 @@
"copy" : "Kopieren", "copy" : "Kopieren",
"seed_language_choose" : "Bitte wählen Sie die Ausgangssprache", "seed_language_choose" : "Bitte wählen Sie die Ausgangssprache:",
"seed_choose" : "Wählen Sie die Ausgangssprache",
"seed_language_next" : "Nächster", "seed_language_next" : "Nächster",
"seed_language_english" : "Englisch", "seed_language_english" : "Englisch",
"seed_language_chinese" : "Chinesisch", "seed_language_chinese" : "Chinesisch",

View file

@ -159,7 +159,8 @@
"copy" : "Copy", "copy" : "Copy",
"seed_language_choose" : "Please choose seed language", "seed_language_choose" : "Please choose seed language:",
"seed_choose" : "Choose seed language",
"seed_language_next" : "Next", "seed_language_next" : "Next",
"seed_language_english" : "English", "seed_language_english" : "English",
"seed_language_chinese" : "Chinese", "seed_language_chinese" : "Chinese",

View file

@ -159,7 +159,8 @@
"copy" : "Dupdo", "copy" : "Dupdo",
"seed_language_choose" : "Por favor elija el idioma semilla", "seed_language_choose" : "Por favor elija el idioma semilla:",
"seed_choose" : "Elige el idioma semilla",
"seed_language_next" : "Próximo", "seed_language_next" : "Próximo",
"seed_language_english" : "Inglés", "seed_language_english" : "Inglés",
"seed_language_chinese" : "Chino", "seed_language_chinese" : "Chino",

View file

@ -159,7 +159,8 @@
"copy" : "प्रतिलिपि", "copy" : "प्रतिलिपि",
"seed_language_choose" : "कृपया बीज भाषा चुनें", "seed_language_choose" : "कृपया बीज भाषा चुनें:",
"seed_choose" : "बीज भाषा चुनें",
"seed_language_next" : "आगामी", "seed_language_next" : "आगामी",
"seed_language_english" : "अंग्रेज़ी", "seed_language_english" : "अंग्रेज़ी",
"seed_language_chinese" : "चीनी", "seed_language_chinese" : "चीनी",

View file

@ -159,7 +159,8 @@
"copy" : "コピー", "copy" : "コピー",
"seed_language_choose" : "シード言語を選択してください", "seed_language_choose" : "シード言語を選択してください:",
"seed_choose" : "シード言語を選択してください",
"seed_language_next" : "次", "seed_language_next" : "次",
"seed_language_english" : "英語", "seed_language_english" : "英語",
"seed_language_chinese" : "中国語", "seed_language_chinese" : "中国語",

View file

@ -159,7 +159,8 @@
"copy" : "부", "copy" : "부",
"seed_language_choose" : "종자 언어를 선택하십시오", "seed_language_choose" : "종자 언어를 선택하십시오:",
"seed_choose" : "시드 언어를 선택하십시오",
"seed_language_next" : "다음 것", "seed_language_next" : "다음 것",
"seed_language_english" : "영어", "seed_language_english" : "영어",
"seed_language_chinese" : "중국말", "seed_language_chinese" : "중국말",

View file

@ -159,7 +159,8 @@
"copy" : "Kopiëren", "copy" : "Kopiëren",
"seed_language_choose" : "Kies een starttaal", "seed_language_choose" : "Kies een starttaal:",
"seed_choose" : "Kies een starttaal",
"seed_language_next" : "Volgende", "seed_language_next" : "Volgende",
"seed_language_english" : "Engels", "seed_language_english" : "Engels",
"seed_language_chinese" : "Chinese", "seed_language_chinese" : "Chinese",

View file

@ -159,7 +159,8 @@
"copy" : "Kopiuj", "copy" : "Kopiuj",
"seed_language_choose" : "Proszę wybrać język początkowy", "seed_language_choose" : "Proszę wybrać język początkowy:",
"seed_choose" : "Wybierz język początkowy",
"seed_language_next" : "Kolejny", "seed_language_next" : "Kolejny",
"seed_language_english" : "Angielski", "seed_language_english" : "Angielski",
"seed_language_chinese" : "Chiński", "seed_language_chinese" : "Chiński",

View file

@ -159,7 +159,8 @@
"copy" : "Copiar", "copy" : "Copiar",
"seed_language_choose" : "Por favor, escolha o idioma da semente", "seed_language_choose" : "Por favor, escolha o idioma da semente:",
"seed_choose" : "Escolha o idioma da semente",
"seed_language_next" : "Próximo", "seed_language_next" : "Próximo",
"seed_language_english" : "Inglesa", "seed_language_english" : "Inglesa",
"seed_language_chinese" : "Chinesa", "seed_language_chinese" : "Chinesa",

View file

@ -159,7 +159,8 @@
"copy" : "Скопировать", "copy" : "Скопировать",
"seed_language_choose" : "Пожалуйста, выберите язык мнемонической фразы", "seed_language_choose" : "Пожалуйста, выберите язык мнемонической фразы:",
"seed_choose" : "Выберите язык мнемонической фразы",
"seed_language_next" : "Продолжить", "seed_language_next" : "Продолжить",
"seed_language_english" : "Английский", "seed_language_english" : "Английский",
"seed_language_chinese" : "Китайский", "seed_language_chinese" : "Китайский",

View file

@ -159,7 +159,8 @@
"copy" : "Скопіювати", "copy" : "Скопіювати",
"seed_language_choose" : "Будь ласка, виберіть мову мнемонічної фрази", "seed_language_choose" : "Будь ласка, виберіть мову мнемонічної фрази:",
"seed_choose" : "Виберіть мову мнемонічної фрази",
"seed_language_next" : "Продовжити", "seed_language_next" : "Продовжити",
"seed_language_english" : "Англійська", "seed_language_english" : "Англійська",
"seed_language_chinese" : "Китайська", "seed_language_chinese" : "Китайська",

View file

@ -159,7 +159,8 @@
"copy" : "复制", "copy" : "复制",
"seed_language_choose" : "請選擇種子語言", "seed_language_choose" : "請選擇種子語言:",
"seed_choose" : "選擇種子語言",
"seed_language_next" : "下一个", "seed_language_next" : "下一个",
"seed_language_english" : "英語", "seed_language_english" : "英語",
"seed_language_chinese" : "中文", "seed_language_chinese" : "中文",