(wip) UI: upgrade responsive_framework with breaking sizes
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 16 KiB |
|
@ -159,8 +159,8 @@
|
|||
"days": "{} days",
|
||||
"months": "{} months",
|
||||
"certify": "Certify this\nidentity",
|
||||
"from": "From:",
|
||||
"to": "To:",
|
||||
"from": "From:{}",
|
||||
"to": "To:{}",
|
||||
"amount": "Amount:",
|
||||
"choiceOfSourceWallet": "Choose a source wallet",
|
||||
"extrinsicInProgress": "{} in progress",
|
||||
|
@ -171,7 +171,7 @@
|
|||
"cancel": "Cancel",
|
||||
"inBlockchainResult": "In {} blockchain",
|
||||
"search": "Search an identity\nor an address",
|
||||
"currencyNode": "{} node :",
|
||||
"currencyNode": "node",
|
||||
"contactsManagementWithNbr": "My contacts ({})",
|
||||
"contactsManagement": "My contacts",
|
||||
"noContacts": "You don't have any contact",
|
||||
|
@ -182,7 +182,7 @@
|
|||
"importDerivationsInProgress": "Import address {}/{}",
|
||||
"youAreOffline": "You are offline...",
|
||||
"importG1v1": "Import old G1v1 account",
|
||||
"selectDestWallet": "Select a target wallet:",
|
||||
"migrateToThisWallet": "Migrate to this wallet:",
|
||||
"youMustWaitBeforeCashoutThisAccount": "You have to wait a few moment before migrate this account",
|
||||
"thisAccountIsEmpty": "This account is empty",
|
||||
"youCannotMigrateIdentityToExistingIdentity": "You cannot migrate an identity\nto an account that already has an identity",
|
||||
|
|
|
@ -160,8 +160,8 @@
|
|||
"days": "{} dias",
|
||||
"months": "{} meses",
|
||||
"certify": "Certificar esta\nidentidad",
|
||||
"from": "De:",
|
||||
"to": "A:",
|
||||
"from": "De:{}",
|
||||
"to": "A:{}",
|
||||
"amount": "Importe:",
|
||||
"choiceOfSourceWallet": "Elige un monedero de origen",
|
||||
"extrinsicInProgress": "{} en progreso",
|
||||
|
@ -172,7 +172,7 @@
|
|||
"cancel": "Cancelar",
|
||||
"inBlockchainResult": "En la blockchain {}",
|
||||
"search": "Buscar una identidad\no una dirección",
|
||||
"currencyNode": "Nodo {} :",
|
||||
"currencyNode": "Nodo",
|
||||
"contactsManagementWithNbr": "Mis contactos ({})",
|
||||
"contactsManagement": "Mis contactos",
|
||||
"noContacts": "No tienes ningún contacto",
|
||||
|
@ -183,7 +183,7 @@
|
|||
"importDerivationsInProgress": "Import address {}/{}",
|
||||
"youAreOffline": "Estás desconectado...",
|
||||
"importG1v1": "Importar la cuenta antigua de G1v1",
|
||||
"selectDestWallet": "Selecciona un monedero destino:",
|
||||
"migrateToThisWallet": "Migrate to this wallet:",
|
||||
"youMustWaitBeforeCashoutThisAccount": "Tienes que esperar unos minutos antes de migrar esta cuenta",
|
||||
"thisAccountIsEmpty": "Esta cuenta está vacía",
|
||||
"youCannotMigrateIdentityToExistingIdentity": "No se puede migrar una identidad\na una cuenta que ya tiene una identidad",
|
||||
|
|
|
@ -159,8 +159,8 @@
|
|||
"days": "{} jours",
|
||||
"months": "{} mois",
|
||||
"certify": "Certifier cette\nidentité",
|
||||
"from": "Depuis:",
|
||||
"to": "Vers:",
|
||||
"from": "Depuis:{}",
|
||||
"to": "Vers:{}",
|
||||
"amount": "Montant:",
|
||||
"choiceOfSourceWallet": "Choix du portefeuille source",
|
||||
"extrinsicInProgress": "{} en cours",
|
||||
|
@ -171,7 +171,7 @@
|
|||
"cancel": "Annuler",
|
||||
"inBlockchainResult": "Dans la blockchain {}",
|
||||
"search": "Rechercher une identité\nou une adresse",
|
||||
"currencyNode": "Noeud {} :",
|
||||
"currencyNode": "Noeud",
|
||||
"contactsManagementWithNbr": "Mes contacts ({})",
|
||||
"contactsManagement": "Mes contacts",
|
||||
"noContacts": "Vous n'avez aucun contact",
|
||||
|
@ -182,7 +182,7 @@
|
|||
"importDerivationsInProgress": "Importation de l'adresse {}/{}",
|
||||
"youAreOffline": "Vous êtes hors ligne...",
|
||||
"importG1v1": "Importer un ancien compte G1v1",
|
||||
"selectDestWallet": "Sélectionnez un portefeuille cible:",
|
||||
"migrateToThisWallet": "Migrer vers ce portefeuille:",
|
||||
"youMustWaitBeforeCashoutThisAccount": "Vous devez attendre quelques minutes\navant de pouvoir migrer ce compte",
|
||||
"thisAccountIsEmpty": "Ce compte est vide",
|
||||
"youCannotMigrateIdentityToExistingIdentity": "Vous ne pouvez pas migrer une identité\nvers un compte disposant déjà d'une identité",
|
||||
|
|
|
@ -172,7 +172,7 @@
|
|||
"cancel": "Annulla",
|
||||
"inBlockchainResult": "Nella blockchain {}",
|
||||
"search": "Cerca una identitá\no un indirizzo",
|
||||
"currencyNode": "Nodo {} :",
|
||||
"currencyNode": "Nodo",
|
||||
"contactsManagementWithNbr": "I miei contatti ({})",
|
||||
"contactsManagement": "I miei contatti",
|
||||
"noContacts": "Non ci sono contatti salvati",
|
||||
|
@ -181,7 +181,7 @@
|
|||
"derivationsScanProgress": "Scannerizzando l'indirizzo {}/{}",
|
||||
"youAreOffline": "Disconnesso...",
|
||||
"importG1v1": "Importa il conto antico da G1v1, versione precedente",
|
||||
"selectDestWallet": "Seleziona un portafoglio di destinazione:",
|
||||
"migrateToThisWallet": "Seleziona un portafoglio di destinazione:",
|
||||
"youMustWaitBeforeCashoutThisAccount": "Devi aspettare qualche minuto prima di migrare questo conto",
|
||||
"thisAccountIsEmpty": "Questo conto é vuoto",
|
||||
"youCannotMigrateIdentityToExistingIdentity": "Non si puó migrare un'identitá\na un conto che ne ha giá una",
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
extensions:
|
|
@ -27,10 +27,6 @@ String cesiumPod = "https://g1.data.le-sou.org";
|
|||
// String cesiumPod = "https://g1.data.presles.fr";
|
||||
// String cesiumPod = "https://g1.data.e-is.pro";
|
||||
|
||||
// Responsive ratios
|
||||
late bool isTall;
|
||||
late double ratio;
|
||||
|
||||
// Contexts
|
||||
late BuildContext homeContext;
|
||||
|
||||
|
|
|
@ -139,17 +139,14 @@ class Gecko extends StatelessWidget {
|
|||
localizationsDelegates: context.localizationDelegates,
|
||||
supportedLocales: context.supportedLocales,
|
||||
locale: context.locale,
|
||||
builder: (context, widget) => ResponsiveWrapper.builder(
|
||||
BouncingScrollWrapper.builder(context, widget!),
|
||||
maxWidth: 1200,
|
||||
minWidth: 480,
|
||||
defaultScale: true,
|
||||
breakpoints: [
|
||||
const ResponsiveBreakpoint.resize(480, name: MOBILE),
|
||||
const ResponsiveBreakpoint.autoScale(800, name: TABLET),
|
||||
const ResponsiveBreakpoint.resize(1000, name: DESKTOP),
|
||||
],
|
||||
background: Container(color: backgroundColor)),
|
||||
builder: (context, child) => ResponsiveBreakpoints.builder(
|
||||
child: child!,
|
||||
breakpoints: [
|
||||
const Breakpoint(start: 0, end: 450, name: MOBILE),
|
||||
const Breakpoint(start: 451, end: 800, name: TABLET),
|
||||
const Breakpoint(start: 801, end: double.infinity, name: DESKTOP),
|
||||
],
|
||||
),
|
||||
title: 'Ğecko',
|
||||
theme: ThemeData(
|
||||
appBarTheme: const AppBarTheme(
|
||||
|
|
|
@ -28,6 +28,7 @@ final keyDragAndDrop = GlobalKey(debugLabel: 'keyDragAndDrop');
|
|||
|
||||
// Wallet options
|
||||
const keyCopyAddress = Key('keyCopyAddress');
|
||||
const keyCopyPubkey = Key('keyCopyPubkey');
|
||||
const keyOpenActivity = Key('keyOpenActivity');
|
||||
const keyManageMembership = Key('keyManageMembership');
|
||||
const keySetDefaultWallet = Key('keySetDefaultWallet');
|
||||
|
|
|
@ -471,7 +471,6 @@ class SubstrateSdk with ChangeNotifier {
|
|||
wrapPromise: false,
|
||||
) ??
|
||||
[];
|
||||
// log.d('genesisHash: $genesisHash');
|
||||
// log.d('genesisHash: ${HEX.decode(genesisHash.substring(2))}');
|
||||
return genesisHash;
|
||||
}
|
||||
|
|
|
@ -12,8 +12,7 @@ import 'package:gecko/widgets/history_query.dart';
|
|||
import 'package:provider/provider.dart';
|
||||
|
||||
class ActivityScreen extends StatefulWidget {
|
||||
const ActivityScreen(
|
||||
{required this.address, this.username})
|
||||
const ActivityScreen({required this.address, this.username})
|
||||
: super(key: keyActivityScreen);
|
||||
final String address;
|
||||
final String? username;
|
||||
|
@ -42,11 +41,8 @@ class _ActivityScreenState extends State<ActivityScreen> {
|
|||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
elevation: 0,
|
||||
toolbarHeight: 60 * ratio,
|
||||
title: SizedBox(
|
||||
height: 22,
|
||||
child: Text('accountActivity'.tr()),
|
||||
),
|
||||
toolbarHeight: 60,
|
||||
title: Text('accountActivity'.tr()),
|
||||
),
|
||||
bottomNavigationBar: const GeckoBottomAppBar(),
|
||||
body: Column(children: <Widget>[
|
||||
|
|
|
@ -2,9 +2,8 @@ import 'package:accordion/controllers.dart';
|
|||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:gecko/globals.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gecko/widgets/certs_received.dart';
|
||||
import 'package:gecko/widgets/certs_list.dart';
|
||||
import 'package:gecko/widgets/certs_counter.dart';
|
||||
import 'package:gecko/widgets/certs_sent.dart';
|
||||
import 'package:accordion/accordion.dart';
|
||||
|
||||
class CertificationsScreen extends StatelessWidget {
|
||||
|
@ -20,11 +19,8 @@ class CertificationsScreen extends StatelessWidget {
|
|||
backgroundColor: backgroundColor,
|
||||
appBar: AppBar(
|
||||
elevation: 0,
|
||||
toolbarHeight: 60 * ratio,
|
||||
title: SizedBox(
|
||||
height: 22,
|
||||
child: Text('certificationsOf'.tr(args: [username])),
|
||||
)),
|
||||
toolbarHeight: 60,
|
||||
title: Text('certificationsOf'.tr(args: [username]))),
|
||||
body: SafeArea(
|
||||
child: Accordion(
|
||||
paddingListTop: 10,
|
||||
|
@ -52,7 +48,8 @@ class CertificationsScreen extends StatelessWidget {
|
|||
const SizedBox(width: 5),
|
||||
CertsCounter(address: address)
|
||||
]),
|
||||
content: CertsReceived(address: address),
|
||||
content: CertsList(
|
||||
address: address, direction: CertDirection.sent),
|
||||
contentHorizontalPadding: 0,
|
||||
contentBorderWidth: 1,
|
||||
),
|
||||
|
@ -70,8 +67,11 @@ class CertificationsScreen extends StatelessWidget {
|
|||
const SizedBox(width: 5),
|
||||
CertsCounter(address: address, isSent: true)
|
||||
]),
|
||||
content: CertsSent(address: address),
|
||||
contentHorizontalPadding: 20,
|
||||
content: CertsList(
|
||||
address: address,
|
||||
direction: CertDirection.sent,
|
||||
),
|
||||
contentHorizontalPadding: 0,
|
||||
contentBorderWidth: 1,
|
||||
// onOpenSection: () => print('onOpenSection ...'),
|
||||
// onCloseSection: () => print('onCloseSection ...'),
|
||||
|
|
|
@ -13,12 +13,7 @@ class DebugScreen extends StatelessWidget {
|
|||
|
||||
return Scaffold(
|
||||
backgroundColor: backgroundColor,
|
||||
appBar: AppBar(
|
||||
toolbarHeight: 60 * ratio,
|
||||
title: const SizedBox(
|
||||
height: 22,
|
||||
child: Text('Debug screen'),
|
||||
)),
|
||||
appBar: AppBar(toolbarHeight: 60, title: const Text('Debug screen')),
|
||||
body: SafeArea(
|
||||
child: Column(children: <Widget>[
|
||||
const SizedBox(height: 40),
|
||||
|
|
|
@ -116,17 +116,10 @@ class _HomeScreenState extends State<HomeScreen> {
|
|||
Provider.of<ChestProvider>(context);
|
||||
final bool isWalletsExists = myWalletProvider.checkIfWalletExist();
|
||||
|
||||
isTall = false;
|
||||
ratio = 1;
|
||||
if (MediaQuery.of(context).size.height >= 930) {
|
||||
isTall = true;
|
||||
ratio = 1.125;
|
||||
}
|
||||
|
||||
return Scaffold(
|
||||
resizeToAvoidBottomInset: false,
|
||||
drawer: MainDrawer(isWalletsExists: isWalletsExists),
|
||||
backgroundColor: const Color(0xffF9F9F1),
|
||||
backgroundColor: yellowC,
|
||||
body: isWalletsExists ? geckHome(context) : welcomeHome(context));
|
||||
}
|
||||
}
|
||||
|
@ -153,7 +146,7 @@ Widget geckHome(context) {
|
|||
key: keyDrawerMenu,
|
||||
icon: const Icon(
|
||||
Icons.menu,
|
||||
color: Colors.white,
|
||||
color: Colors.black,
|
||||
size: 35,
|
||||
),
|
||||
onPressed: () => Scaffold.of(context).openDrawer(),
|
||||
|
@ -162,18 +155,18 @@ Widget geckHome(context) {
|
|||
),
|
||||
const Align(
|
||||
child:
|
||||
Image(image: AssetImage('assets/home/header.png'), height: 210),
|
||||
Image(image: AssetImage('assets/home/header.png'), height: 170),
|
||||
),
|
||||
]),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(top: 15 * ratio),
|
||||
padding: const EdgeInsets.only(top: 15),
|
||||
child:
|
||||
Row(mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[
|
||||
DefaultTextStyle(
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 24,
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.w700,
|
||||
shadows: <Shadow>[
|
||||
Shadow(
|
||||
|
@ -249,11 +242,11 @@ Widget welcomeHome(context) {
|
|||
),
|
||||
const Align(
|
||||
child:
|
||||
Image(image: AssetImage('assets/home/header.png'), height: 210),
|
||||
Image(image: AssetImage('assets/home/header.png'), height: 170),
|
||||
),
|
||||
]),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(top: 1 * ratio),
|
||||
padding: const EdgeInsets.only(top: 1),
|
||||
child:
|
||||
Row(mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[
|
||||
Text(
|
||||
|
@ -261,7 +254,7 @@ Widget welcomeHome(context) {
|
|||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 24,
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.w700,
|
||||
shadows: <Shadow>[
|
||||
Shadow(
|
||||
|
@ -296,7 +289,7 @@ Widget welcomeHome(context) {
|
|||
child: ConstrainedBox(
|
||||
constraints: const BoxConstraints(maxWidth: 480),
|
||||
child: Column(children: <Widget>[
|
||||
const Spacer(),
|
||||
const Spacer(flex: 4),
|
||||
Row(children: <Widget>[
|
||||
Expanded(
|
||||
child: Stack(children: <Widget>[
|
||||
|
@ -304,16 +297,17 @@ Widget welcomeHome(context) {
|
|||
padding: EdgeInsets.only(top: 55),
|
||||
child: Image(
|
||||
image: AssetImage('assets/home/gecko-bienvenue.png'),
|
||||
height: 220,
|
||||
height: 180,
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
left: 180,
|
||||
left: 160,
|
||||
top: 10,
|
||||
child: BubbleSpeak(text: "noLizard".tr()),
|
||||
),
|
||||
const Positioned(
|
||||
left: 200,
|
||||
top: 60,
|
||||
left: 180,
|
||||
top: 70,
|
||||
child: Image(
|
||||
image: AssetImage('assets/home/bout_de_bulle.png'),
|
||||
),
|
||||
|
@ -322,8 +316,8 @@ Widget welcomeHome(context) {
|
|||
),
|
||||
]),
|
||||
SizedBox(
|
||||
width: 410,
|
||||
height: 70,
|
||||
width: 335,
|
||||
height: 60,
|
||||
child: ElevatedButton(
|
||||
key: keyOnboardingNewChest,
|
||||
style: ElevatedButton.styleFrom(
|
||||
|
@ -343,14 +337,14 @@ Widget welcomeHome(context) {
|
|||
child: Text(
|
||||
'createWallet'.tr(),
|
||||
style: const TextStyle(
|
||||
fontSize: 24, fontWeight: FontWeight.w600),
|
||||
fontSize: 21, fontWeight: FontWeight.w600),
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 25 * ratio),
|
||||
const SizedBox(height: 25),
|
||||
SizedBox(
|
||||
width: 410,
|
||||
height: 70,
|
||||
width: 335,
|
||||
height: 60,
|
||||
child: OutlinedButton(
|
||||
key: keyRestoreChest,
|
||||
style: OutlinedButton.styleFrom(
|
||||
|
@ -368,13 +362,14 @@ Widget welcomeHome(context) {
|
|||
child: Text(
|
||||
"restoreWallet".tr(),
|
||||
style: const TextStyle(
|
||||
fontSize: 24,
|
||||
fontSize: 21,
|
||||
color: orangeC,
|
||||
fontWeight: FontWeight.w600),
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: isTall ? 100 : 50)
|
||||
// const SizedBox(height: 80)
|
||||
const Spacer(flex: 3),
|
||||
]),
|
||||
),
|
||||
),
|
||||
|
|
|
@ -48,11 +48,8 @@ class _ChangePinScreenState extends State<ChangePinScreen> {
|
|||
resizeToAvoidBottomInset: false,
|
||||
appBar: AppBar(
|
||||
elevation: 1,
|
||||
toolbarHeight: 60 * ratio,
|
||||
title: SizedBox(
|
||||
height: 22,
|
||||
child: Text(widget.walletName!),
|
||||
),
|
||||
toolbarHeight: 60,
|
||||
title: Text(widget.walletName!),
|
||||
),
|
||||
body: Center(
|
||||
child: SafeArea(
|
||||
|
|
|
@ -33,7 +33,7 @@ class ChestOptions extends StatelessWidget {
|
|||
resizeToAvoidBottomInset: false,
|
||||
appBar: AppBar(
|
||||
elevation: 1,
|
||||
toolbarHeight: 60 * ratio,
|
||||
toolbarHeight: 60,
|
||||
// leading: IconButton(
|
||||
// icon: const Icon(Icons.arrow_back, color: Colors.black),
|
||||
// onPressed: () {
|
||||
|
@ -43,16 +43,13 @@ class ChestOptions extends StatelessWidget {
|
|||
// // );
|
||||
// Navigator.pop(context);
|
||||
// }),
|
||||
title: SizedBox(
|
||||
height: 22,
|
||||
child: Text(currentChest.name!),
|
||||
)),
|
||||
title: Text(currentChest.name!)),
|
||||
bottomNavigationBar: const GeckoBottomAppBar(),
|
||||
body: Stack(children: [
|
||||
Builder(
|
||||
builder: (ctx) => SafeArea(
|
||||
child: Column(children: <Widget>[
|
||||
SizedBox(height: 30 * ratio),
|
||||
const SizedBox(height: 30),
|
||||
InkWell(
|
||||
key: keyShowSeed,
|
||||
onTap: () async {
|
||||
|
@ -83,7 +80,7 @@ class ChestOptions extends StatelessWidget {
|
|||
}
|
||||
},
|
||||
child: SizedBox(
|
||||
height: 50,
|
||||
height: 70,
|
||||
child: Row(children: <Widget>[
|
||||
const SizedBox(width: 20),
|
||||
Image.asset(
|
||||
|
@ -91,17 +88,20 @@ class ChestOptions extends StatelessWidget {
|
|||
width: 60,
|
||||
),
|
||||
const SizedBox(width: 15),
|
||||
Text(
|
||||
'displayMnemonic'.tr(),
|
||||
style: const TextStyle(
|
||||
fontSize: 20,
|
||||
color: orangeC,
|
||||
SizedBox(
|
||||
width: 270,
|
||||
child: Text(
|
||||
'displayMnemonic'.tr(),
|
||||
style: const TextStyle(
|
||||
fontSize: 20,
|
||||
color: orangeC,
|
||||
),
|
||||
),
|
||||
),
|
||||
]),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 10 * ratio),
|
||||
const SizedBox(height: 10),
|
||||
Consumer<SubstrateSdk>(builder: (context, sub, _) {
|
||||
return InkWell(
|
||||
key: keyChangePin,
|
||||
|
@ -127,7 +127,7 @@ class ChestOptions extends StatelessWidget {
|
|||
// }
|
||||
// : null,
|
||||
child: SizedBox(
|
||||
height: 50,
|
||||
height: 70,
|
||||
child: Row(children: <Widget>[
|
||||
const SizedBox(width: 26),
|
||||
Image.asset(
|
||||
|
@ -146,7 +146,7 @@ class ChestOptions extends StatelessWidget {
|
|||
])),
|
||||
);
|
||||
}),
|
||||
SizedBox(height: 10 * ratio),
|
||||
const SizedBox(height: 10),
|
||||
Consumer<SubstrateSdk>(builder: (context, sub, _) {
|
||||
return InkWell(
|
||||
key: keycreateRootDerivation,
|
||||
|
@ -163,7 +163,7 @@ class ChestOptions extends StatelessWidget {
|
|||
}
|
||||
: null,
|
||||
child: SizedBox(
|
||||
height: 50,
|
||||
height: 70,
|
||||
child: Row(children: <Widget>[
|
||||
const SizedBox(width: 35),
|
||||
const Icon(
|
||||
|
@ -183,14 +183,14 @@ class ChestOptions extends StatelessWidget {
|
|||
),
|
||||
);
|
||||
}),
|
||||
SizedBox(height: 10 * ratio),
|
||||
const SizedBox(height: 10),
|
||||
InkWell(
|
||||
key: keyDeleteChest,
|
||||
onTap: () async {
|
||||
await chestProvider.deleteChest(context, currentChest);
|
||||
},
|
||||
child: SizedBox(
|
||||
height: 50,
|
||||
height: 70,
|
||||
child: Row(children: <Widget>[
|
||||
const SizedBox(width: 28),
|
||||
Image.asset(
|
||||
|
|
|
@ -33,15 +33,10 @@ class _ChooseChestState extends State<ChooseChest> {
|
|||
|
||||
return Scaffold(
|
||||
backgroundColor: backgroundColor,
|
||||
appBar: AppBar(
|
||||
toolbarHeight: 60 * ratio,
|
||||
title: SizedBox(
|
||||
height: 22,
|
||||
child: Text('selectMyChest'.tr()),
|
||||
)),
|
||||
appBar: AppBar(toolbarHeight: 60, title: Text('selectMyChest'.tr())),
|
||||
body: SafeArea(
|
||||
child: Column(children: <Widget>[
|
||||
SizedBox(height: 160 * ratio),
|
||||
const SizedBox(height: 160),
|
||||
CarouselSlider(
|
||||
carouselController: buttonCarouselController,
|
||||
options: CarouselOptions(
|
||||
|
@ -102,7 +97,7 @@ class _ChooseChestState extends State<ChooseChest> {
|
|||
);
|
||||
}).toList(),
|
||||
),
|
||||
SizedBox(height: 80 * ratio),
|
||||
const SizedBox(height: 80),
|
||||
SizedBox(
|
||||
width: 400,
|
||||
height: 70,
|
||||
|
|
|
@ -48,12 +48,8 @@ class _CustomDerivationState extends State<CustomDerivation> {
|
|||
|
||||
return Scaffold(
|
||||
backgroundColor: backgroundColor,
|
||||
appBar: AppBar(
|
||||
toolbarHeight: 60 * ratio,
|
||||
title: SizedBox(
|
||||
height: 22,
|
||||
child: Text('createCustomDerivation'.tr()),
|
||||
)),
|
||||
appBar:
|
||||
AppBar(toolbarHeight: 60, title: Text('createCustomDerivation'.tr())),
|
||||
body: Center(
|
||||
child: SafeArea(
|
||||
child: Column(children: <Widget>[
|
||||
|
@ -100,8 +96,8 @@ class _CustomDerivationState extends State<CustomDerivation> {
|
|||
),
|
||||
const Spacer(flex: 1),
|
||||
SizedBox(
|
||||
width: 410,
|
||||
height: 70,
|
||||
width: 300,
|
||||
height: 60,
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
foregroundColor: Colors.white, elevation: 4,
|
||||
|
@ -142,7 +138,7 @@ class _CustomDerivationState extends State<CustomDerivation> {
|
|||
child: Text(
|
||||
'validate'.tr(),
|
||||
style: const TextStyle(
|
||||
fontSize: 24, fontWeight: FontWeight.w600),
|
||||
fontSize: 22, fontWeight: FontWeight.w600),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
@ -40,12 +40,7 @@ class ImportG1v1 extends StatelessWidget {
|
|||
},
|
||||
child: Scaffold(
|
||||
backgroundColor: backgroundColor,
|
||||
appBar: AppBar(
|
||||
toolbarHeight: 60 * ratio,
|
||||
title: SizedBox(
|
||||
height: 22,
|
||||
child: Text('importOldAccount'.tr()),
|
||||
)),
|
||||
appBar: AppBar(toolbarHeight: 60, title: Text('importOldAccount'.tr())),
|
||||
body: SafeArea(
|
||||
child: Consumer<SubstrateSdk>(builder: (context, sub, _) {
|
||||
return FutureBuilder(
|
||||
|
@ -106,7 +101,7 @@ class ImportG1v1 extends StatelessWidget {
|
|||
final unit = isUdUnit ? 'ud'.tr(args: ['']) : currencyName;
|
||||
|
||||
return Column(children: <Widget>[
|
||||
const SizedBox(height: 20),
|
||||
const SizedBox(height: 10),
|
||||
TextFormField(
|
||||
key: keyCesiumId,
|
||||
autofocus: true,
|
||||
|
@ -117,9 +112,12 @@ class ImportG1v1 extends StatelessWidget {
|
|||
}
|
||||
debounce = Timer(
|
||||
const Duration(milliseconds: debouneTime), () {
|
||||
sub.reload();
|
||||
sub.csToV2Address(
|
||||
sub.csSalt.text, sub.csPassword.text);
|
||||
if (sub.csSalt.text != '' &&
|
||||
sub.csPassword.text != '') {
|
||||
sub.reload();
|
||||
sub.csToV2Address(
|
||||
sub.csSalt.text, sub.csPassword.text);
|
||||
}
|
||||
});
|
||||
},
|
||||
keyboardType: TextInputType.text,
|
||||
|
@ -154,9 +152,12 @@ class ImportG1v1 extends StatelessWidget {
|
|||
debounce = Timer(
|
||||
const Duration(milliseconds: debouneTime), () {
|
||||
sub.g1V1NewAddress = '';
|
||||
sub.reload();
|
||||
sub.csToV2Address(
|
||||
sub.csSalt.text, sub.csPassword.text);
|
||||
if (sub.csSalt.text != '' &&
|
||||
sub.csPassword.text != '') {
|
||||
sub.reload();
|
||||
sub.csToV2Address(
|
||||
sub.csSalt.text, sub.csPassword.text);
|
||||
}
|
||||
});
|
||||
},
|
||||
keyboardType: TextInputType.text,
|
||||
|
@ -179,39 +180,67 @@ class ImportG1v1 extends StatelessWidget {
|
|||
),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
GestureDetector(
|
||||
key: keyCopyAddress,
|
||||
onTap: () {
|
||||
Clipboard.setData(
|
||||
ClipboardData(text: sub.g1V1OldPubkey));
|
||||
snackCopyKey(context);
|
||||
},
|
||||
child: Text(
|
||||
sub.g1V1OldPubkey,
|
||||
style: const TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
Visibility(
|
||||
visible: sub.g1V1OldPubkey != '',
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Column(
|
||||
children: [
|
||||
GestureDetector(
|
||||
key: keyCopyPubkey,
|
||||
onTap: () {
|
||||
Clipboard.setData(
|
||||
ClipboardData(text: sub.g1V1OldPubkey));
|
||||
snackCopyKey(context);
|
||||
},
|
||||
child: Text(
|
||||
'v1: ${getShortPubkey(sub.g1V1OldPubkey)}',
|
||||
style: const TextStyle(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.w600,
|
||||
fontFamily: 'Monospace'),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 5),
|
||||
GestureDetector(
|
||||
key: keyCopyAddress,
|
||||
onTap: () {
|
||||
Clipboard.setData(
|
||||
ClipboardData(text: sub.g1V1OldPubkey));
|
||||
snackCopyKey(context);
|
||||
},
|
||||
child: Text(
|
||||
'v2: ${getShortPubkey(sub.g1V1NewAddress)}',
|
||||
style: const TextStyle(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.w600,
|
||||
fontFamily: 'Monospace'),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(width: 30),
|
||||
Column(
|
||||
children: [
|
||||
Text(
|
||||
'${balance['transferableBalance']} $unit',
|
||||
style: const TextStyle(fontSize: 17),
|
||||
),
|
||||
IdentityStatus(
|
||||
address: sub.g1V1NewAddress,
|
||||
isOwner: false,
|
||||
color: Colors.black),
|
||||
const SizedBox(width: 10),
|
||||
Certifications(
|
||||
address: sub.g1V1NewAddress, size: 14)
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
Text(
|
||||
'${balance['transferableBalance']} $unit',
|
||||
style: const TextStyle(fontSize: 17),
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
IdentityStatus(
|
||||
address: sub.g1V1NewAddress,
|
||||
isOwner: false,
|
||||
color: Colors.black),
|
||||
const SizedBox(width: 10),
|
||||
Certifications(address: sub.g1V1NewAddress, size: 14)
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 30),
|
||||
Text('selectDestWallet'.tr()),
|
||||
Text('migrateToThisWallet'.tr()),
|
||||
const SizedBox(height: 5),
|
||||
DropdownButtonHideUnderline(
|
||||
key: keySelectWallet,
|
||||
|
@ -235,10 +264,10 @@ class ImportG1v1 extends StatelessWidget {
|
|||
},
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 30),
|
||||
const SizedBox(height: 10),
|
||||
SizedBox(
|
||||
width: 380 * ratio,
|
||||
height: 60 * ratio,
|
||||
width: 350,
|
||||
height: 50,
|
||||
child: ElevatedButton(
|
||||
key: keyConfirm,
|
||||
style: ElevatedButton.styleFrom(
|
||||
|
@ -270,7 +299,7 @@ class ImportG1v1 extends StatelessWidget {
|
|||
balance: balance,
|
||||
idtyStatus: idtyStatus);
|
||||
Navigator.pop(context);
|
||||
Navigator.push(
|
||||
await Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) {
|
||||
return TransactionInProgress(
|
||||
|
@ -286,9 +315,8 @@ class ImportG1v1 extends StatelessWidget {
|
|||
: null,
|
||||
child: Text(
|
||||
'migrateAccount'.tr(),
|
||||
style: TextStyle(
|
||||
fontSize: 23 * ratio,
|
||||
fontWeight: FontWeight.w600),
|
||||
style: const TextStyle(
|
||||
fontSize: 23, fontWeight: FontWeight.w600),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -312,5 +340,6 @@ class ImportG1v1 extends StatelessWidget {
|
|||
sub.csSalt.text = '';
|
||||
sub.csPassword.text = '';
|
||||
sub.g1V1NewAddress = '';
|
||||
sub.g1V1OldPubkey = '';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,11 +32,7 @@ class ManageMembership extends StatelessWidget {
|
|||
return Scaffold(
|
||||
backgroundColor: backgroundColor,
|
||||
appBar: AppBar(
|
||||
toolbarHeight: 60 * ratio,
|
||||
title: SizedBox(
|
||||
height: 22,
|
||||
child: const Text('manageMembership').tr(),
|
||||
)),
|
||||
toolbarHeight: 60, title: const Text('manageMembership').tr()),
|
||||
body: SafeArea(
|
||||
child: Column(children: <Widget>[
|
||||
const SizedBox(height: 20),
|
||||
|
|
|
@ -65,12 +65,7 @@ class MigrateIdentityScreen extends StatelessWidget {
|
|||
|
||||
return Scaffold(
|
||||
backgroundColor: backgroundColor,
|
||||
appBar: AppBar(
|
||||
toolbarHeight: 60 * ratio,
|
||||
title: SizedBox(
|
||||
height: 22,
|
||||
child: Text('importOldAccount'.tr()),
|
||||
)),
|
||||
appBar: AppBar(toolbarHeight: 60, title: Text('importOldAccount'.tr())),
|
||||
body: SafeArea(
|
||||
child: Consumer<SubstrateSdk>(builder: (context, sub, _) {
|
||||
return FutureBuilder(
|
||||
|
@ -166,7 +161,7 @@ class MigrateIdentityScreen extends StatelessWidget {
|
|||
fontFamily: 'Monospace'),
|
||||
),
|
||||
const SizedBox(height: 30),
|
||||
Text('selectDestWallet'.tr()),
|
||||
Text('migrateToThisWallet'.tr()),
|
||||
const SizedBox(height: 5),
|
||||
DropdownButtonHideUnderline(
|
||||
key: keySelectWallet,
|
||||
|
@ -192,8 +187,8 @@ class MigrateIdentityScreen extends StatelessWidget {
|
|||
),
|
||||
const SizedBox(height: 30),
|
||||
SizedBox(
|
||||
width: 380 * ratio,
|
||||
height: 60 * ratio,
|
||||
width: 370,
|
||||
height: 60,
|
||||
child: ElevatedButton(
|
||||
key: keyConfirm,
|
||||
style: ElevatedButton.styleFrom(
|
||||
|
@ -240,8 +235,8 @@ class MigrateIdentityScreen extends StatelessWidget {
|
|||
: null,
|
||||
child: Text(
|
||||
'migrateIdentity'.tr(),
|
||||
style: TextStyle(
|
||||
fontSize: 23 * ratio, fontWeight: FontWeight.w600),
|
||||
style: const TextStyle(
|
||||
fontSize: 23, fontWeight: FontWeight.w600),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
@ -36,18 +36,13 @@ class RestoreChest extends StatelessWidget {
|
|||
},
|
||||
child: Scaffold(
|
||||
backgroundColor: backgroundColor,
|
||||
appBar: AppBar(
|
||||
toolbarHeight: 60 * ratio,
|
||||
title: SizedBox(
|
||||
height: 22,
|
||||
child: Text('restoreAChest'.tr()),
|
||||
)),
|
||||
appBar: AppBar(toolbarHeight: 60, title: Text('restoreAChest'.tr())),
|
||||
body: SafeArea(
|
||||
child: Stack(children: [
|
||||
Column(children: <Widget>[
|
||||
SizedBox(height: isTall ? 30 : 15),
|
||||
const SizedBox(height: 25),
|
||||
bubbleSpeak('toRestoreEnterMnemonic'.tr()),
|
||||
SizedBox(height: isTall ? 30 : 15),
|
||||
const SizedBox(height: 25),
|
||||
Column(children: <Widget>[
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
|
@ -82,7 +77,7 @@ class RestoreChest extends StatelessWidget {
|
|||
child: Align(
|
||||
alignment: Alignment.center,
|
||||
child: SizedBox(
|
||||
width: 410,
|
||||
width: 370,
|
||||
height: 70,
|
||||
child: ElevatedButton(
|
||||
key: keyGoNext,
|
||||
|
@ -121,7 +116,7 @@ class RestoreChest extends StatelessWidget {
|
|||
Column(children: [
|
||||
const SizedBox(height: 20),
|
||||
SizedBox(
|
||||
width: 190,
|
||||
width: 220,
|
||||
height: 60,
|
||||
child: ElevatedButton(
|
||||
key: keyPastMnemonic,
|
||||
|
@ -137,14 +132,14 @@ class RestoreChest extends StatelessWidget {
|
|||
children: [
|
||||
const Icon(
|
||||
Icons.content_paste_go,
|
||||
size: 27,
|
||||
size: 30,
|
||||
),
|
||||
// const SizedBox(width: 10),
|
||||
Text(
|
||||
'pasteFromClipboard'.tr(),
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(
|
||||
fontSize: 17, fontWeight: FontWeight.w400),
|
||||
fontSize: 18, fontWeight: FontWeight.w400),
|
||||
),
|
||||
],
|
||||
)),
|
||||
|
@ -161,7 +156,7 @@ class RestoreChest extends StatelessWidget {
|
|||
Widget bubbleSpeak(String text) {
|
||||
return Bubble(
|
||||
margin: const BubbleEdges.symmetric(horizontal: 20),
|
||||
padding: BubbleEdges.all(isTall ? 25 : 15),
|
||||
padding: const BubbleEdges.all(20),
|
||||
borderWidth: 1,
|
||||
borderColor: Colors.black,
|
||||
radius: Radius.zero,
|
||||
|
@ -171,7 +166,7 @@ class RestoreChest extends StatelessWidget {
|
|||
key: keyBubbleSpeak,
|
||||
textAlign: TextAlign.justify,
|
||||
style: const TextStyle(
|
||||
color: Colors.black, fontSize: 19, fontWeight: FontWeight.w400),
|
||||
color: Colors.black, fontSize: 18, fontWeight: FontWeight.w400),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
@ -181,8 +176,8 @@ class RestoreChest extends StatelessWidget {
|
|||
Provider.of<GenerateWalletsProvider>(context);
|
||||
|
||||
return Container(
|
||||
width: 102,
|
||||
height: 40 * ratio,
|
||||
width: 90,
|
||||
height: 40,
|
||||
// ),
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(color: Colors.grey),
|
||||
|
@ -213,7 +208,7 @@ class RestoreChest extends StatelessWidget {
|
|||
}
|
||||
},
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(fontSize: 20),
|
||||
style: const TextStyle(fontSize: 18),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -33,12 +33,7 @@ class ShowSeed extends StatelessWidget {
|
|||
|
||||
return Scaffold(
|
||||
backgroundColor: backgroundColor,
|
||||
appBar: AppBar(
|
||||
toolbarHeight: 60 * ratio,
|
||||
title: SizedBox(
|
||||
height: 22,
|
||||
child: Text('myMnemonic'.tr()),
|
||||
)),
|
||||
appBar: AppBar(toolbarHeight: 60, title: Text('myMnemonic'.tr())),
|
||||
body: SafeArea(
|
||||
child: Column(children: <Widget>[
|
||||
const Spacer(flex: 1),
|
||||
|
@ -64,62 +59,67 @@ class ShowSeed extends StatelessWidget {
|
|||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Column(children: [
|
||||
BuildText(text: 'keepYourMnemonicSecret'.tr()),
|
||||
SizedBox(height: 35 * ratio),
|
||||
BuildText(
|
||||
text: 'keepYourMnemonicSecret'.tr(), size: 17),
|
||||
const SizedBox(height: 35),
|
||||
sentanceArray(context, seed.data!.split(' ')),
|
||||
const SizedBox(height: 20),
|
||||
SizedBox(
|
||||
height: 40,
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
foregroundColor: Colors.black,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
Row(
|
||||
children: [
|
||||
SizedBox(
|
||||
height: 40,
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
foregroundColor: Colors.black,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
backgroundColor: orangeC,
|
||||
elevation: 1, // foreground
|
||||
),
|
||||
onPressed: () {
|
||||
Clipboard.setData(
|
||||
ClipboardData(text: seed.data!));
|
||||
snackCopySeed(context);
|
||||
},
|
||||
child: Row(children: <Widget>[
|
||||
Image.asset(
|
||||
'assets/walletOptions/copy-white.png',
|
||||
height: 25,
|
||||
),
|
||||
const SizedBox(width: 7),
|
||||
Text(
|
||||
'copy'.tr(),
|
||||
style: TextStyle(
|
||||
fontSize: 15, color: Colors.grey[50]),
|
||||
)
|
||||
]),
|
||||
),
|
||||
backgroundColor: orangeC,
|
||||
elevation: 1, // foreground
|
||||
),
|
||||
onPressed: () {
|
||||
Clipboard.setData(
|
||||
ClipboardData(text: seed.data!));
|
||||
snackCopySeed(context);
|
||||
},
|
||||
child: Row(children: <Widget>[
|
||||
Image.asset(
|
||||
'assets/walletOptions/copy-white.png',
|
||||
height: 25,
|
||||
const SizedBox(width: 50),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) {
|
||||
return PrintWallet(seed.data);
|
||||
}),
|
||||
);
|
||||
},
|
||||
child: Image.asset(
|
||||
'assets/printer.png',
|
||||
height: 42,
|
||||
),
|
||||
const SizedBox(width: 7),
|
||||
Text(
|
||||
'copy'.tr(),
|
||||
style: TextStyle(
|
||||
fontSize: 15, color: Colors.grey[50]),
|
||||
)
|
||||
]),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 30),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) {
|
||||
return PrintWallet(seed.data);
|
||||
}),
|
||||
);
|
||||
},
|
||||
child: Image.asset(
|
||||
'assets/printer.png',
|
||||
height: 42 * ratio,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
]),
|
||||
]);
|
||||
}),
|
||||
const Spacer(flex: 2),
|
||||
const Spacer(flex: 3),
|
||||
SizedBox(
|
||||
width: 380 * ratio,
|
||||
height: 60 * ratio,
|
||||
width: 370,
|
||||
height: 60,
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
foregroundColor: Colors.white, elevation: 4,
|
||||
|
@ -130,8 +130,8 @@ class ShowSeed extends StatelessWidget {
|
|||
},
|
||||
child: Text(
|
||||
'close'.tr(),
|
||||
style: TextStyle(
|
||||
fontSize: 23 * ratio, fontWeight: FontWeight.w600),
|
||||
style: const TextStyle(
|
||||
fontSize: 23, fontWeight: FontWeight.w600),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -141,61 +141,57 @@ class ShowSeed extends StatelessWidget {
|
|||
}
|
||||
|
||||
Widget sentanceArray(BuildContext context, List mnemonic) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 3),
|
||||
child: Container(
|
||||
constraints: const BoxConstraints(maxWidth: 450),
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(color: Colors.black),
|
||||
color: const Color(0xffeeeedd),
|
||||
borderRadius: const BorderRadius.all(
|
||||
Radius.circular(10),
|
||||
)),
|
||||
padding: const EdgeInsets.all(20),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
Row(children: <Widget>[
|
||||
arrayCell(mnemonic[0], 1),
|
||||
arrayCell(mnemonic[1], 2),
|
||||
arrayCell(mnemonic[2], 3),
|
||||
arrayCell(mnemonic[3], 4),
|
||||
]),
|
||||
const SizedBox(height: 15),
|
||||
Row(children: <Widget>[
|
||||
arrayCell(mnemonic[4], 5),
|
||||
arrayCell(mnemonic[5], 6),
|
||||
arrayCell(mnemonic[6], 7),
|
||||
arrayCell(mnemonic[7], 8),
|
||||
]),
|
||||
const SizedBox(height: 15),
|
||||
Row(children: <Widget>[
|
||||
arrayCell(mnemonic[8], 9),
|
||||
arrayCell(mnemonic[9], 10),
|
||||
arrayCell(mnemonic[10], 11),
|
||||
arrayCell(mnemonic[11], 12),
|
||||
]),
|
||||
])),
|
||||
);
|
||||
return Container(
|
||||
constraints: const BoxConstraints(maxWidth: 375),
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(color: Colors.black),
|
||||
color: const Color(0xffeeeedd),
|
||||
borderRadius: const BorderRadius.all(
|
||||
Radius.circular(10),
|
||||
)),
|
||||
padding: const EdgeInsets.all(15),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
Row(children: <Widget>[
|
||||
arrayCell(mnemonic[0], 1),
|
||||
arrayCell(mnemonic[1], 2),
|
||||
arrayCell(mnemonic[2], 3),
|
||||
arrayCell(mnemonic[3], 4),
|
||||
]),
|
||||
const SizedBox(height: 15),
|
||||
Row(children: <Widget>[
|
||||
arrayCell(mnemonic[4], 5),
|
||||
arrayCell(mnemonic[5], 6),
|
||||
arrayCell(mnemonic[6], 7),
|
||||
arrayCell(mnemonic[7], 8),
|
||||
]),
|
||||
const SizedBox(height: 15),
|
||||
Row(children: <Widget>[
|
||||
arrayCell(mnemonic[8], 9),
|
||||
arrayCell(mnemonic[9], 10),
|
||||
arrayCell(mnemonic[10], 11),
|
||||
arrayCell(mnemonic[11], 12),
|
||||
]),
|
||||
]));
|
||||
}
|
||||
|
||||
Widget arrayCell(dataWord, int nbr) {
|
||||
log.d(nbr);
|
||||
|
||||
return SizedBox(
|
||||
width: 100,
|
||||
width: 85,
|
||||
child: Column(children: <Widget>[
|
||||
Text(
|
||||
nbr.toString(),
|
||||
style:
|
||||
TextStyle(fontSize: 13 * ratio, color: const Color(0xff6b6b52)),
|
||||
style: const TextStyle(fontSize: 13, color: Color(0xff6b6b52)),
|
||||
),
|
||||
Text(
|
||||
dataWord,
|
||||
key: keyMnemonicWord(dataWord),
|
||||
style: TextStyle(fontSize: 17 * ratio, color: Colors.black),
|
||||
style: const TextStyle(fontSize: 17, color: Colors.black),
|
||||
),
|
||||
]),
|
||||
);
|
||||
|
@ -219,13 +215,10 @@ class PrintWallet extends StatelessWidget {
|
|||
}),
|
||||
backgroundColor: yellowC,
|
||||
foregroundColor: Colors.black,
|
||||
toolbarHeight: 60 * ratio,
|
||||
title: SizedBox(
|
||||
height: 22,
|
||||
child: Text(
|
||||
'printMyMnemonic'.tr(),
|
||||
style: const TextStyle(fontWeight: FontWeight.w600),
|
||||
),
|
||||
toolbarHeight: 60,
|
||||
title: Text(
|
||||
'printMyMnemonic'.tr(),
|
||||
style: const TextStyle(fontWeight: FontWeight.w600),
|
||||
),
|
||||
),
|
||||
body: PdfPreview(
|
||||
|
|
|
@ -77,18 +77,18 @@ class UnlockingWallet extends StatelessWidget {
|
|||
),
|
||||
),
|
||||
Column(children: <Widget>[
|
||||
SizedBox(height: isTall ? 100 : 20),
|
||||
const SizedBox(height: 80),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
currentChest.imageFile == null
|
||||
? Image.asset(
|
||||
'assets/chests/${currentChest.imageName}',
|
||||
width: isTall ? 130 : 100,
|
||||
width: 100,
|
||||
)
|
||||
: Image.file(
|
||||
currentChest.imageFile!,
|
||||
width: isTall ? 130 : 100,
|
||||
width: 130,
|
||||
),
|
||||
const SizedBox(width: 5),
|
||||
SizedBox(
|
||||
|
@ -102,17 +102,18 @@ class UnlockingWallet extends StatelessWidget {
|
|||
fontWeight: FontWeight.w700),
|
||||
)),
|
||||
]),
|
||||
SizedBox(height: 30 * ratio),
|
||||
const SizedBox(height: 30),
|
||||
SizedBox(
|
||||
width: 400,
|
||||
width: 350,
|
||||
child: Text(
|
||||
'toUnlockEnterPassword'.tr(),
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(
|
||||
fontSize: 19,
|
||||
color: Colors.black,
|
||||
fontWeight: FontWeight.w400),
|
||||
)),
|
||||
SizedBox(height: 30 * ratio),
|
||||
const SizedBox(height: 30),
|
||||
if (!myWalletProvider.isPinValid &&
|
||||
!myWalletProvider.isPinLoading)
|
||||
Text(
|
||||
|
@ -120,9 +121,9 @@ class UnlockingWallet extends StatelessWidget {
|
|||
style: const TextStyle(
|
||||
color: Colors.red, fontWeight: FontWeight.w500),
|
||||
),
|
||||
SizedBox(height: 10 * ratio),
|
||||
const SizedBox(height: 10),
|
||||
pinForm(context, pinLenght),
|
||||
SizedBox(height: 3 * ratio),
|
||||
const SizedBox(height: 10),
|
||||
if (canUnlock)
|
||||
Consumer<WalletOptionsProvider>(
|
||||
builder: (context, sub, _) {
|
||||
|
@ -150,31 +151,31 @@ class UnlockingWallet extends StatelessWidget {
|
|||
]),
|
||||
);
|
||||
}),
|
||||
const SizedBox(height: 10),
|
||||
// const SizedBox(height: 10),
|
||||
// if (canUnlock)
|
||||
InkWell(
|
||||
key: keyChangeChest,
|
||||
onTap: () {
|
||||
// Navigator.push(
|
||||
// context,
|
||||
// MaterialPageRoute(builder: (context) {
|
||||
// return const ChooseChest();
|
||||
// }),
|
||||
// );
|
||||
},
|
||||
child: SizedBox(
|
||||
width: 400,
|
||||
height: 50,
|
||||
child: Center(
|
||||
child: Text(
|
||||
'changeChest'.tr(),
|
||||
style: const TextStyle(
|
||||
fontSize: 22,
|
||||
color: Colors.grey, // orangeC
|
||||
fontWeight: FontWeight.w600),
|
||||
),
|
||||
),
|
||||
)),
|
||||
// InkWell(
|
||||
// key: keyChangeChest,
|
||||
// onTap: () {
|
||||
// // Navigator.push(
|
||||
// // context,
|
||||
// // MaterialPageRoute(builder: (context) {
|
||||
// // return const ChooseChest();
|
||||
// // }),
|
||||
// // );
|
||||
// },
|
||||
// child: SizedBox(
|
||||
// width: 400,
|
||||
// height: 50,
|
||||
// child: Center(
|
||||
// child: Text(
|
||||
// 'changeChest'.tr(),
|
||||
// style: const TextStyle(
|
||||
// fontSize: 22,
|
||||
// color: Colors.grey, // orangeC
|
||||
// fontWeight: FontWeight.w600),
|
||||
// ),
|
||||
// ),
|
||||
// )),
|
||||
]),
|
||||
]),
|
||||
]),
|
||||
|
@ -200,7 +201,7 @@ class UnlockingWallet extends StatelessWidget {
|
|||
|
||||
return Form(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 5 * ratio, horizontal: 30),
|
||||
padding: const EdgeInsets.symmetric(vertical: 5, horizontal: 30),
|
||||
child: PinCodeTextField(
|
||||
key: keyPinForm,
|
||||
textCapitalization: TextCapitalization.characters,
|
||||
|
@ -228,7 +229,7 @@ class UnlockingWallet extends StatelessWidget {
|
|||
borderWidth: 4,
|
||||
shape: PinCodeFieldShape.box,
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
fieldHeight: 50 * ratio,
|
||||
fieldHeight: 50,
|
||||
fieldWidth: 50,
|
||||
activeFillColor: Colors.black,
|
||||
),
|
||||
|
|
|
@ -61,18 +61,14 @@ class WalletOptions extends StatelessWidget {
|
|||
backgroundColor: backgroundColor,
|
||||
resizeToAvoidBottomInset: false,
|
||||
appBar: AppBar(
|
||||
toolbarHeight: 60 * ratio,
|
||||
toolbarHeight: 60,
|
||||
elevation: 0,
|
||||
title: SizedBox(
|
||||
height: 22,
|
||||
child: Consumer<WalletOptionsProvider>(
|
||||
builder: (context, walletProvider, _) {
|
||||
return Text(isWalletNameIndexed
|
||||
? duniterIndexer
|
||||
.walletNameIndexer[walletOptions.address.text]!
|
||||
: wallet.name!);
|
||||
}),
|
||||
),
|
||||
title: Consumer<WalletOptionsProvider>(
|
||||
builder: (context, walletProvider, _) {
|
||||
return Text(isWalletNameIndexed
|
||||
? duniterIndexer.walletNameIndexer[walletOptions.address.text]!
|
||||
: wallet.name!);
|
||||
}),
|
||||
actions: [
|
||||
InkWell(
|
||||
onTap: () {
|
||||
|
@ -88,7 +84,7 @@ class WalletOptions extends StatelessWidget {
|
|||
child: QrImageWidget(
|
||||
data: walletOptions.address.text,
|
||||
version: QrVersions.auto,
|
||||
size: 80,
|
||||
size: 70,
|
||||
),
|
||||
),
|
||||
],
|
||||
|
@ -99,7 +95,7 @@ class WalletOptions extends StatelessWidget {
|
|||
builder: (ctx) => SafeArea(
|
||||
child: Column(children: <Widget>[
|
||||
Container(
|
||||
height: isTall ? 5 : 0,
|
||||
height: 5,
|
||||
color: yellowC,
|
||||
),
|
||||
Consumer<WalletOptionsProvider>(
|
||||
|
@ -116,6 +112,7 @@ class WalletOptions extends StatelessWidget {
|
|||
)),
|
||||
child: Row(children: <Widget>[
|
||||
const Spacer(flex: 1),
|
||||
const SizedBox(width: 15),
|
||||
avatar(walletProvider),
|
||||
const Spacer(flex: 1),
|
||||
Column(
|
||||
|
@ -123,7 +120,7 @@ class WalletOptions extends StatelessWidget {
|
|||
children: <Widget>[
|
||||
Stack(children: [
|
||||
SizedBox(
|
||||
width: 250,
|
||||
width: 230,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
|
@ -167,7 +164,7 @@ class WalletOptions extends StatelessWidget {
|
|||
),
|
||||
),
|
||||
]),
|
||||
SizedBox(height: isTall ? 5 : 0),
|
||||
const SizedBox(height: 5),
|
||||
Balance(
|
||||
address: walletProvider.address.text, size: 24),
|
||||
const SizedBox(width: 30),
|
||||
|
@ -203,7 +200,7 @@ class WalletOptions extends StatelessWidget {
|
|||
size: 20)
|
||||
]),
|
||||
),
|
||||
SizedBox(height: 10 * ratio),
|
||||
const SizedBox(height: 10),
|
||||
]),
|
||||
const Spacer(flex: 2),
|
||||
]),
|
||||
|
@ -231,7 +228,7 @@ class WalletOptions extends StatelessWidget {
|
|||
// size: isTall ? 150 : 80,
|
||||
// ),
|
||||
// ),
|
||||
SizedBox(height: 30 * ratio),
|
||||
const SizedBox(height: 30),
|
||||
Consumer<WalletOptionsProvider>(
|
||||
builder: (context, walletProvider, _) {
|
||||
final defaultWallet =
|
||||
|
@ -242,17 +239,17 @@ class WalletOptions extends StatelessWidget {
|
|||
return Column(children: [
|
||||
confirmIdentityButton(walletProvider),
|
||||
pubkeyWidget(walletProvider, ctx),
|
||||
SizedBox(height: 10 * ratio),
|
||||
const SizedBox(height: 12),
|
||||
activityWidget(
|
||||
context, historyProvider, walletProvider),
|
||||
SizedBox(height: 12 * ratio),
|
||||
const SizedBox(height: 13),
|
||||
setDefaultWalletWidget(
|
||||
context,
|
||||
walletProvider,
|
||||
myWalletProvider,
|
||||
walletOptions,
|
||||
currentChest),
|
||||
SizedBox(height: 17 * ratio),
|
||||
const SizedBox(height: 18),
|
||||
Column(children: [
|
||||
if (!walletProvider.isDefaultWallet &&
|
||||
!wallet.isMembre())
|
||||
|
@ -294,11 +291,11 @@ class WalletOptions extends StatelessWidget {
|
|||
child: wallet.imageCustomPath == null || wallet.imageCustomPath == ''
|
||||
? Image.asset(
|
||||
'assets/avatars/${wallet.imageDefaultPath}',
|
||||
width: 110,
|
||||
width: 130,
|
||||
)
|
||||
: Container(
|
||||
width: 150,
|
||||
height: 150,
|
||||
width: 130,
|
||||
height: 130,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: Colors.transparent,
|
||||
|
@ -404,7 +401,7 @@ class WalletOptions extends StatelessWidget {
|
|||
fontWeight: FontWeight.w800,
|
||||
fontFamily: 'Monospace',
|
||||
color: Colors.black)),
|
||||
const SizedBox(width: 15),
|
||||
const Spacer(),
|
||||
SizedBox(
|
||||
height: 40,
|
||||
child: ElevatedButton(
|
||||
|
@ -426,14 +423,15 @@ class WalletOptions extends StatelessWidget {
|
|||
'assets/walletOptions/copy-white.png',
|
||||
height: 25,
|
||||
),
|
||||
const SizedBox(width: 7),
|
||||
Text(
|
||||
'copy'.tr(),
|
||||
style: TextStyle(fontSize: 15, color: Colors.grey[50]),
|
||||
)
|
||||
// const SizedBox(width: 7),
|
||||
// Text(
|
||||
// 'copy'.tr(),
|
||||
// style: TextStyle(fontSize: 15, color: Colors.grey[50]),
|
||||
// )
|
||||
]),
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
]),
|
||||
),
|
||||
);
|
||||
|
@ -488,7 +486,7 @@ class WalletOptions extends StatelessWidget {
|
|||
}
|
||||
: null,
|
||||
child: SizedBox(
|
||||
height: 50,
|
||||
height: 60,
|
||||
child: Row(children: <Widget>[
|
||||
const SizedBox(width: 31),
|
||||
CircleAvatar(
|
||||
|
@ -500,15 +498,18 @@ class WalletOptions extends StatelessWidget {
|
|||
),
|
||||
),
|
||||
const SizedBox(width: 22),
|
||||
Text(
|
||||
walletProvider.isDefaultWallet
|
||||
? 'thisWalletIsDefault'.tr()
|
||||
: 'defineWalletAsDefault'.tr(),
|
||||
style: TextStyle(
|
||||
fontSize: 20,
|
||||
color: walletProvider.isDefaultWallet
|
||||
? Colors.grey[500]
|
||||
: Colors.black)),
|
||||
SizedBox(
|
||||
width: 270,
|
||||
child: Text(
|
||||
walletProvider.isDefaultWallet
|
||||
? 'thisWalletIsDefault'.tr()
|
||||
: 'defineWalletAsDefault'.tr(),
|
||||
style: TextStyle(
|
||||
fontSize: 20,
|
||||
color: walletProvider.isDefaultWallet
|
||||
? Colors.grey[500]
|
||||
: Colors.black)),
|
||||
),
|
||||
]),
|
||||
),
|
||||
);
|
||||
|
|
|
@ -44,7 +44,7 @@ class _WalletsHomeState extends State<WalletsHome> {
|
|||
backgroundColor: backgroundColor,
|
||||
appBar: AppBar(
|
||||
elevation: 1,
|
||||
toolbarHeight: 60 * ratio,
|
||||
toolbarHeight: 60,
|
||||
title: Row(
|
||||
children: [
|
||||
Image.asset(
|
||||
|
@ -131,9 +131,9 @@ class _WalletsHomeState extends State<WalletsHome> {
|
|||
final screenWidth = MediaQuery.of(context).size.width;
|
||||
int nTule;
|
||||
|
||||
if (screenWidth >= 900) {
|
||||
if (screenWidth >= 700) {
|
||||
nTule = 4;
|
||||
} else if (screenWidth >= 650) {
|
||||
} else if (screenWidth >= 450) {
|
||||
nTule = 3;
|
||||
} else {
|
||||
nTule = 2;
|
||||
|
@ -148,7 +148,7 @@ class _WalletsHomeState extends State<WalletsHome> {
|
|||
TargetContent(
|
||||
child: Column(
|
||||
children: [
|
||||
Image.asset('assets/drag-and-drop.png', height: 140),
|
||||
Image.asset('assets/drag-and-drop.png', height: 120),
|
||||
const SizedBox(height: 15),
|
||||
Text(
|
||||
'explainDraggableWallet'.tr(),
|
||||
|
@ -179,7 +179,7 @@ class _WalletsHomeState extends State<WalletsHome> {
|
|||
}
|
||||
|
||||
return CustomScrollView(slivers: <Widget>[
|
||||
const SliverToBoxAdapter(child: SizedBox(height: 20)),
|
||||
const SliverToBoxAdapter(child: SizedBox(height: 15)),
|
||||
if (idtyWallet.address != '')
|
||||
SliverToBoxAdapter(
|
||||
child: DragTuleAction(
|
||||
|
|
|
@ -26,12 +26,9 @@ class ContactsScreen extends StatelessWidget {
|
|||
backgroundColor: backgroundColor,
|
||||
appBar: AppBar(
|
||||
elevation: 1,
|
||||
toolbarHeight: 60 * ratio,
|
||||
title: SizedBox(
|
||||
height: 22,
|
||||
child: Text(
|
||||
'contactsManagementWithNbr'.tr(args: ['${myContacts.length}'])),
|
||||
),
|
||||
toolbarHeight: 60,
|
||||
title: Text(
|
||||
'contactsManagementWithNbr'.tr(args: ['${myContacts.length}'])),
|
||||
),
|
||||
bottomNavigationBar: const GeckoBottomAppBar(),
|
||||
body: SafeArea(
|
||||
|
|
|
@ -15,13 +15,10 @@ class OnboardingStepOne extends StatelessWidget {
|
|||
return Scaffold(
|
||||
backgroundColor: backgroundColor,
|
||||
appBar: AppBar(
|
||||
toolbarHeight: 60 * ratio,
|
||||
title: SizedBox(
|
||||
height: 22,
|
||||
child: Text(
|
||||
'newWallet'.tr(),
|
||||
style: const TextStyle(fontWeight: FontWeight.w600),
|
||||
),
|
||||
toolbarHeight: 60,
|
||||
title: Text(
|
||||
'newWallet'.tr(),
|
||||
style: const TextStyle(fontWeight: FontWeight.w600),
|
||||
),
|
||||
),
|
||||
extendBodyBehindAppBar: true,
|
||||
|
|
|
@ -49,24 +49,21 @@ class OnboardingStepTen extends StatelessWidget {
|
|||
child: Scaffold(
|
||||
backgroundColor: backgroundColor,
|
||||
appBar: AppBar(
|
||||
toolbarHeight: 60 * ratio,
|
||||
title: SizedBox(
|
||||
height: 22,
|
||||
child: Text(
|
||||
'myPassword'.tr(),
|
||||
style: const TextStyle(fontWeight: FontWeight.w600),
|
||||
),
|
||||
toolbarHeight: 60,
|
||||
title: Text(
|
||||
'myPassword'.tr(),
|
||||
style: const TextStyle(fontWeight: FontWeight.w600),
|
||||
),
|
||||
),
|
||||
extendBodyBehindAppBar: true,
|
||||
body: SafeArea(
|
||||
child: Stack(children: [
|
||||
Column(children: <Widget>[
|
||||
SizedBox(height: isTall ? 40 : 20),
|
||||
const SizedBox(height: 25),
|
||||
const BuildProgressBar(pagePosition: 9),
|
||||
SizedBox(height: isTall ? 40 : 20),
|
||||
const SizedBox(height: 25),
|
||||
BuildText(text: "geckoWillCheckPassword".tr()),
|
||||
SizedBox(height: isTall ? 60 : 10),
|
||||
const SizedBox(height: 25),
|
||||
const ScanDerivationsInfo(),
|
||||
Consumer<MyWalletsProvider>(builder: (context, mw, _) {
|
||||
return Visibility(
|
||||
|
@ -79,7 +76,7 @@ class OnboardingStepTen extends StatelessWidget {
|
|||
),
|
||||
);
|
||||
}),
|
||||
SizedBox(height: isTall ? 20 : 10),
|
||||
const SizedBox(height: 20),
|
||||
Consumer<SubstrateSdk>(builder: (context, sub, _) {
|
||||
return sub.nodeConnected
|
||||
? pinForm(context, walletOptions, pinLenght, 1, 2)
|
||||
|
@ -173,7 +170,7 @@ class OnboardingStepTen extends StatelessWidget {
|
|||
borderWidth: 4,
|
||||
shape: PinCodeFieldShape.box,
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
fieldHeight: 50 * ratio,
|
||||
fieldHeight: 50,
|
||||
fieldWidth: 50,
|
||||
activeFillColor: Colors.black,
|
||||
),
|
||||
|
|
|
@ -21,27 +21,24 @@ class OnboardingStepEleven extends StatelessWidget {
|
|||
child: Scaffold(
|
||||
backgroundColor: backgroundColor,
|
||||
appBar: AppBar(
|
||||
toolbarHeight: 60 * ratio,
|
||||
toolbarHeight: 60,
|
||||
leading: const Icon(Icons.check),
|
||||
title: SizedBox(
|
||||
height: 22,
|
||||
child: Text(
|
||||
'allGood'.tr(),
|
||||
style: const TextStyle(fontWeight: FontWeight.w600),
|
||||
),
|
||||
title: Text(
|
||||
'allGood'.tr(),
|
||||
style: const TextStyle(fontWeight: FontWeight.w600),
|
||||
),
|
||||
),
|
||||
extendBodyBehindAppBar: true,
|
||||
body: SafeArea(
|
||||
child: Stack(children: [
|
||||
Column(children: <Widget>[
|
||||
const SizedBox(height: 40),
|
||||
const SizedBox(height: 30),
|
||||
BuildText(
|
||||
text: "yourChestAndWalletWereCreatedSuccessfully".tr()),
|
||||
SizedBox(height: isTall ? 20 : 10),
|
||||
const SizedBox(height: 15),
|
||||
Image.asset(
|
||||
'assets/onBoarding/gecko-clin.gif',
|
||||
height: isTall ? 400 : 300,
|
||||
height: 350,
|
||||
),
|
||||
Expanded(
|
||||
child: Align(
|
||||
|
@ -84,8 +81,8 @@ class OnboardingStepEleven extends StatelessWidget {
|
|||
|
||||
Widget finishButton(BuildContext context) {
|
||||
return SizedBox(
|
||||
width: 380 * ratio,
|
||||
height: 60 * ratio,
|
||||
width: 370,
|
||||
height: 60,
|
||||
child: ElevatedButton(
|
||||
key: keyGoWalletsHome,
|
||||
style: ElevatedButton.styleFrom(
|
||||
|
@ -99,7 +96,7 @@ Widget finishButton(BuildContext context) {
|
|||
},
|
||||
child: Text(
|
||||
"accessMyChest".tr(),
|
||||
style: TextStyle(fontSize: 22 * ratio, fontWeight: FontWeight.w600),
|
||||
style: const TextStyle(fontSize: 22, fontWeight: FontWeight.w600),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
|
|
@ -16,13 +16,10 @@ class OnboardingStepTwo extends StatelessWidget {
|
|||
return Scaffold(
|
||||
backgroundColor: backgroundColor,
|
||||
appBar: AppBar(
|
||||
toolbarHeight: 60 * ratio,
|
||||
title: SizedBox(
|
||||
height: 22,
|
||||
child: Text(
|
||||
'yourMnemonic'.tr(),
|
||||
style: const TextStyle(fontWeight: FontWeight.w600),
|
||||
),
|
||||
toolbarHeight: 60,
|
||||
title: Text(
|
||||
'yourMnemonic'.tr(),
|
||||
style: const TextStyle(fontWeight: FontWeight.w600),
|
||||
),
|
||||
),
|
||||
extendBodyBehindAppBar: true,
|
||||
|
|
|
@ -16,13 +16,10 @@ class OnboardingStepThree extends StatelessWidget {
|
|||
return Scaffold(
|
||||
backgroundColor: backgroundColor,
|
||||
appBar: AppBar(
|
||||
toolbarHeight: 60 * ratio,
|
||||
title: SizedBox(
|
||||
height: 22,
|
||||
child: Text(
|
||||
'yourMnemonic'.tr(),
|
||||
style: const TextStyle(fontWeight: FontWeight.w600),
|
||||
),
|
||||
toolbarHeight: 60,
|
||||
title: Text(
|
||||
'yourMnemonic'.tr(),
|
||||
style: const TextStyle(fontWeight: FontWeight.w600),
|
||||
),
|
||||
),
|
||||
extendBodyBehindAppBar: true,
|
||||
|
|
|
@ -16,13 +16,10 @@ class OnboardingStepFor extends StatelessWidget {
|
|||
return Scaffold(
|
||||
backgroundColor: backgroundColor,
|
||||
appBar: AppBar(
|
||||
toolbarHeight: 60 * ratio,
|
||||
title: SizedBox(
|
||||
height: 22,
|
||||
child: Text(
|
||||
'yourMnemonic'.tr(),
|
||||
style: const TextStyle(fontWeight: FontWeight.w600),
|
||||
),
|
||||
toolbarHeight: 60,
|
||||
title: Text(
|
||||
'yourMnemonic'.tr(),
|
||||
style: const TextStyle(fontWeight: FontWeight.w600),
|
||||
),
|
||||
),
|
||||
extendBodyBehindAppBar: true,
|
||||
|
|
|
@ -40,47 +40,30 @@ class _ChooseChestState extends State<OnboardingStepFive> {
|
|||
return Scaffold(
|
||||
backgroundColor: backgroundColor,
|
||||
appBar: AppBar(
|
||||
toolbarHeight: 60 * ratio,
|
||||
title: SizedBox(
|
||||
height: 22,
|
||||
child: Text(
|
||||
'yourMnemonic'.tr(),
|
||||
style: const TextStyle(fontWeight: FontWeight.w600),
|
||||
),
|
||||
toolbarHeight: 60,
|
||||
title: Text(
|
||||
'yourMnemonic'.tr(),
|
||||
style: const TextStyle(fontWeight: FontWeight.w600),
|
||||
),
|
||||
),
|
||||
extendBodyBehindAppBar: true,
|
||||
body: SafeArea(
|
||||
child: Stack(children: [
|
||||
Column(children: [
|
||||
SizedBox(height: isTall ? 40 : 20),
|
||||
const SizedBox(height: 25),
|
||||
const BuildProgressBar(pagePosition: 4),
|
||||
SizedBox(height: isTall ? 40 : 20),
|
||||
BuildText(text: 'geckoGeneratedYourMnemonicKeepItSecret'.tr()),
|
||||
SizedBox(height: 35 * ratio),
|
||||
const SizedBox(height: 25),
|
||||
BuildText(
|
||||
text: 'geckoGeneratedYourMnemonicKeepItSecret'.tr(), size: 18),
|
||||
const SizedBox(height: 15),
|
||||
sentanceArray(context),
|
||||
SizedBox(height: 17 * ratio),
|
||||
const SizedBox(height: 17),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) {
|
||||
return PrintWallet(
|
||||
generateWalletProvider.generatedMnemonic!);
|
||||
}),
|
||||
);
|
||||
},
|
||||
child: Image.asset(
|
||||
'assets/printer.png',
|
||||
height: 42 * ratio,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 40,
|
||||
width: 120,
|
||||
width: 130,
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
foregroundColor: Colors.black,
|
||||
|
@ -108,15 +91,31 @@ class _ChooseChestState extends State<OnboardingStepFive> {
|
|||
]),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 70),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) {
|
||||
return PrintWallet(
|
||||
generateWalletProvider.generatedMnemonic!);
|
||||
}),
|
||||
);
|
||||
},
|
||||
child: Image.asset(
|
||||
'assets/printer.png',
|
||||
height: 42,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 40),
|
||||
const SizedBox(height: 17),
|
||||
Expanded(
|
||||
child: Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: SizedBox(
|
||||
width: 380 * ratio,
|
||||
height: 60 * ratio,
|
||||
width: 370,
|
||||
height: 60,
|
||||
child: ElevatedButton(
|
||||
key: keyGenerateMnemonic,
|
||||
style: ElevatedButton.styleFrom(
|
||||
|
@ -129,17 +128,16 @@ class _ChooseChestState extends State<OnboardingStepFive> {
|
|||
},
|
||||
child: Text("chooseAnotherMnemonic".tr(),
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 22 * ratio,
|
||||
fontWeight: FontWeight.w600))),
|
||||
style: const TextStyle(
|
||||
fontSize: 22, fontWeight: FontWeight.w600))),
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 22 * ratio),
|
||||
const SizedBox(height: 22),
|
||||
nextButton(
|
||||
context, "iNotedMyMnemonic".tr(), false, widget.skipIntro),
|
||||
const Spacer(),
|
||||
// SizedBox(height: 35 * ratio),
|
||||
// SizedBox(height: 35),
|
||||
]),
|
||||
const OfflineInfo(),
|
||||
]),
|
||||
|
@ -152,68 +150,65 @@ Widget sentanceArray(BuildContext context) {
|
|||
final generateWalletProvider =
|
||||
Provider.of<GenerateWalletsProvider>(context, listen: false);
|
||||
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 3),
|
||||
child: Container(
|
||||
constraints: const BoxConstraints(maxWidth: 450),
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(color: Colors.black),
|
||||
color: const Color(0xffeeeedd),
|
||||
borderRadius: const BorderRadius.all(
|
||||
Radius.circular(10),
|
||||
)),
|
||||
padding: const EdgeInsets.all(20),
|
||||
child: FutureBuilder(
|
||||
future: generateWalletProvider.generateWordList(context),
|
||||
builder: (BuildContext context, AsyncSnapshot<List> data) {
|
||||
if (!data.hasData) {
|
||||
return const Text('');
|
||||
} else {
|
||||
mnemoList = data;
|
||||
return Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
Row(children: <Widget>[
|
||||
arrayCell(data.data![0]),
|
||||
arrayCell(data.data![1]),
|
||||
arrayCell(data.data![2]),
|
||||
arrayCell(data.data![3]),
|
||||
]),
|
||||
const SizedBox(height: 15),
|
||||
Row(children: <Widget>[
|
||||
arrayCell(data.data![4]),
|
||||
arrayCell(data.data![5]),
|
||||
arrayCell(data.data![6]),
|
||||
arrayCell(data.data![7]),
|
||||
]),
|
||||
const SizedBox(height: 15),
|
||||
Row(children: <Widget>[
|
||||
arrayCell(data.data![8]),
|
||||
arrayCell(data.data![9]),
|
||||
arrayCell(data.data![10]),
|
||||
arrayCell(data.data![11]),
|
||||
]),
|
||||
]);
|
||||
}
|
||||
}),
|
||||
),
|
||||
return Container(
|
||||
constraints: const BoxConstraints(maxWidth: 375),
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(color: Colors.black),
|
||||
color: const Color(0xffeeeedd),
|
||||
borderRadius: const BorderRadius.all(
|
||||
Radius.circular(10),
|
||||
)),
|
||||
padding: const EdgeInsets.all(15),
|
||||
child: FutureBuilder(
|
||||
future: generateWalletProvider.generateWordList(context),
|
||||
builder: (BuildContext context, AsyncSnapshot<List> data) {
|
||||
if (!data.hasData) {
|
||||
return const Text('');
|
||||
} else {
|
||||
mnemoList = data;
|
||||
return Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
Row(children: <Widget>[
|
||||
arrayCell(data.data![0]),
|
||||
arrayCell(data.data![1]),
|
||||
arrayCell(data.data![2]),
|
||||
arrayCell(data.data![3]),
|
||||
]),
|
||||
const SizedBox(height: 12),
|
||||
Row(children: <Widget>[
|
||||
arrayCell(data.data![4]),
|
||||
arrayCell(data.data![5]),
|
||||
arrayCell(data.data![6]),
|
||||
arrayCell(data.data![7]),
|
||||
]),
|
||||
const SizedBox(height: 12),
|
||||
Row(children: <Widget>[
|
||||
arrayCell(data.data![8]),
|
||||
arrayCell(data.data![9]),
|
||||
arrayCell(data.data![10]),
|
||||
arrayCell(data.data![11]),
|
||||
]),
|
||||
]);
|
||||
}
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
Widget arrayCell(dataWord) {
|
||||
return SizedBox(
|
||||
width: 100,
|
||||
width: 85,
|
||||
child: Column(children: <Widget>[
|
||||
Text(
|
||||
dataWord.split(':')[0],
|
||||
style: TextStyle(fontSize: 13 * ratio, color: const Color(0xff6b6b52)),
|
||||
style: const TextStyle(fontSize: 13, color: Color(0xff6b6b52)),
|
||||
),
|
||||
Text(
|
||||
dataWord.split(':')[1],
|
||||
key: keyMnemonicWord(dataWord.split(':')[0]),
|
||||
style: TextStyle(fontSize: 17 * ratio, color: Colors.black),
|
||||
style: const TextStyle(fontSize: 17, color: Colors.black),
|
||||
),
|
||||
]),
|
||||
);
|
||||
|
@ -226,8 +221,8 @@ Widget nextButton(
|
|||
final myWalletProvider =
|
||||
Provider.of<MyWalletsProvider>(context, listen: false);
|
||||
return SizedBox(
|
||||
width: 380 * ratio,
|
||||
height: 60 * ratio,
|
||||
width: 370,
|
||||
height: 60,
|
||||
child: ElevatedButton(
|
||||
key: keyGoNext,
|
||||
style: ElevatedButton.styleFrom(
|
||||
|
@ -251,7 +246,7 @@ Widget nextButton(
|
|||
},
|
||||
child: Text(
|
||||
text,
|
||||
style: TextStyle(fontSize: 22 * ratio, fontWeight: FontWeight.w600),
|
||||
style: const TextStyle(fontSize: 22, fontWeight: FontWeight.w600),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
|
|
@ -42,13 +42,10 @@ class OnboardingStepSix extends StatelessWidget {
|
|||
resizeToAvoidBottomInset: false,
|
||||
extendBodyBehindAppBar: true,
|
||||
appBar: AppBar(
|
||||
toolbarHeight: 60 * ratio,
|
||||
title: SizedBox(
|
||||
height: 22,
|
||||
child: Text(
|
||||
'yourMnemonic'.tr(),
|
||||
style: const TextStyle(fontWeight: FontWeight.w600),
|
||||
),
|
||||
toolbarHeight: 60,
|
||||
title: Text(
|
||||
'yourMnemonic'.tr(),
|
||||
style: const TextStyle(fontWeight: FontWeight.w600),
|
||||
),
|
||||
),
|
||||
body: SafeArea(
|
||||
|
@ -56,23 +53,23 @@ class OnboardingStepSix extends StatelessWidget {
|
|||
Align(
|
||||
alignment: Alignment.topCenter,
|
||||
child: Column(children: [
|
||||
SizedBox(height: isTall ? 40 : 20),
|
||||
const SizedBox(height: 25),
|
||||
const BuildProgressBar(pagePosition: 5),
|
||||
SizedBox(height: isTall ? 40 : 20),
|
||||
const SizedBox(height: 25),
|
||||
BuildText(
|
||||
text: "didYouNoteMnemonicToBeSureTypeWord".tr(args: [
|
||||
(generateWalletProvider.nbrWord + 1).toString()
|
||||
]),
|
||||
size: 20,
|
||||
size: 18,
|
||||
isMd: true),
|
||||
SizedBox(height: isTall ? 70 : 20),
|
||||
const SizedBox(height: 40),
|
||||
Text('${generateWalletProvider.nbrWord + 1}',
|
||||
key: keyAskedWord,
|
||||
style: TextStyle(
|
||||
fontSize: isTall ? 17 : 15,
|
||||
style: const TextStyle(
|
||||
fontSize: 20,
|
||||
color: orangeC,
|
||||
fontWeight: FontWeight.w400)),
|
||||
const SizedBox(height: 10),
|
||||
fontWeight: FontWeight.w500)),
|
||||
const SizedBox(height: 5),
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(7),
|
||||
|
@ -80,7 +77,7 @@ class OnboardingStepSix extends StatelessWidget {
|
|||
color: Colors.grey[600]!,
|
||||
width: 3,
|
||||
)),
|
||||
width: 430,
|
||||
width: 350,
|
||||
child: TextFormField(
|
||||
key: keyInputWord,
|
||||
autofocus: true,
|
||||
|
@ -95,7 +92,7 @@ class OnboardingStepSix extends StatelessWidget {
|
|||
textAlign: TextAlign.center,
|
||||
decoration: InputDecoration(
|
||||
labelStyle: TextStyle(
|
||||
fontSize: 22.0,
|
||||
fontSize: 19,
|
||||
color: Colors.grey[500],
|
||||
fontWeight: FontWeight.w500),
|
||||
labelText: generateWalletProvider.isAskedWordValid
|
||||
|
@ -103,10 +100,10 @@ class OnboardingStepSix extends StatelessWidget {
|
|||
: "${generateWalletProvider.nbrWordAlpha} ${"nthMnemonicWord".tr()}",
|
||||
fillColor: const Color(0xffeeeedd),
|
||||
filled: true,
|
||||
contentPadding: const EdgeInsets.all(12),
|
||||
contentPadding: const EdgeInsets.all(10),
|
||||
),
|
||||
style: TextStyle(
|
||||
fontSize: 40.0,
|
||||
fontSize: 32,
|
||||
color: generateWalletProvider.askedWordColor,
|
||||
fontWeight: FontWeight.w500))),
|
||||
Visibility(
|
||||
|
@ -133,7 +130,7 @@ class OnboardingStepSix extends StatelessWidget {
|
|||
// ),
|
||||
// ),
|
||||
// ),
|
||||
SizedBox(height: 35 * ratio),
|
||||
const SizedBox(height: 40),
|
||||
]),
|
||||
),
|
||||
const OfflineInfo(),
|
||||
|
@ -152,8 +149,8 @@ Widget nextButton(BuildContext context, String text, nextScreen, bool isFast) {
|
|||
generateWalletProvider.askedWordColor = Colors.black;
|
||||
|
||||
return SizedBox(
|
||||
width: 380 * ratio,
|
||||
height: 60 * ratio,
|
||||
width: 370,
|
||||
height: 60,
|
||||
child: ElevatedButton(
|
||||
key: keyGoNext,
|
||||
style: ElevatedButton.styleFrom(
|
||||
|
|
|
@ -17,13 +17,10 @@ class OnboardingStepSeven extends StatelessWidget {
|
|||
return Scaffold(
|
||||
backgroundColor: backgroundColor,
|
||||
appBar: AppBar(
|
||||
toolbarHeight: 60 * ratio,
|
||||
title: SizedBox(
|
||||
height: 22,
|
||||
child: Text(
|
||||
'myPassword'.tr(),
|
||||
style: const TextStyle(fontWeight: FontWeight.w600),
|
||||
),
|
||||
toolbarHeight: 60,
|
||||
title: Text(
|
||||
'myPassword'.tr(),
|
||||
style: const TextStyle(fontWeight: FontWeight.w600),
|
||||
),
|
||||
),
|
||||
extendBodyBehindAppBar: true,
|
||||
|
@ -35,7 +32,7 @@ class OnboardingStepSeven extends StatelessWidget {
|
|||
buttonText: '>',
|
||||
nextScreen: OnboardingStepEight(scanDerivation: scanDerivation),
|
||||
pagePosition: 6,
|
||||
boxHeight: 400),
|
||||
boxHeight: 320),
|
||||
const OfflineInfo(),
|
||||
]),
|
||||
),
|
||||
|
|
|
@ -17,13 +17,10 @@ class OnboardingStepEight extends StatelessWidget {
|
|||
return Scaffold(
|
||||
backgroundColor: backgroundColor,
|
||||
appBar: AppBar(
|
||||
toolbarHeight: 60 * ratio,
|
||||
title: SizedBox(
|
||||
height: 22,
|
||||
child: Text(
|
||||
'myPassword'.tr(),
|
||||
style: const TextStyle(fontWeight: FontWeight.w600),
|
||||
),
|
||||
toolbarHeight: 60,
|
||||
title: Text(
|
||||
'myPassword'.tr(),
|
||||
style: const TextStyle(fontWeight: FontWeight.w600),
|
||||
),
|
||||
),
|
||||
extendBodyBehindAppBar: true,
|
||||
|
@ -35,7 +32,8 @@ class OnboardingStepEight extends StatelessWidget {
|
|||
buttonText: '>',
|
||||
nextScreen: OnboardingStepNine(scanDerivation: scanDerivation),
|
||||
pagePosition: 7,
|
||||
isMd: true),
|
||||
isMd: true,
|
||||
boxHeight: 320),
|
||||
const OfflineInfo(),
|
||||
]),
|
||||
),
|
||||
|
|
|
@ -31,24 +31,21 @@ class OnboardingStepNine extends StatelessWidget {
|
|||
return Scaffold(
|
||||
backgroundColor: backgroundColor,
|
||||
appBar: AppBar(
|
||||
toolbarHeight: 60 * ratio,
|
||||
title: SizedBox(
|
||||
height: 22,
|
||||
child: Text(
|
||||
'myPassword'.tr(),
|
||||
style: const TextStyle(fontWeight: FontWeight.w600),
|
||||
),
|
||||
toolbarHeight: 60,
|
||||
title: Text(
|
||||
'myPassword'.tr(),
|
||||
style: const TextStyle(fontWeight: FontWeight.w600),
|
||||
),
|
||||
),
|
||||
extendBodyBehindAppBar: true,
|
||||
body: SafeArea(
|
||||
child: Stack(children: [
|
||||
Column(children: <Widget>[
|
||||
SizedBox(height: isTall ? 40 : 20),
|
||||
const SizedBox(height: 25),
|
||||
const BuildProgressBar(pagePosition: 8),
|
||||
SizedBox(height: isTall ? 40 : 20),
|
||||
const SizedBox(height: 25),
|
||||
BuildText(text: "hereIsThePasswordKeepIt".tr()),
|
||||
const SizedBox(height: 100),
|
||||
const SizedBox(height: 60),
|
||||
Stack(
|
||||
alignment: Alignment.centerRight,
|
||||
children: <Widget>[
|
||||
|
@ -62,7 +59,7 @@ class OnboardingStepNine extends StatelessWidget {
|
|||
decoration: const InputDecoration(),
|
||||
style: const TextStyle(
|
||||
letterSpacing: 5,
|
||||
fontSize: 35.0,
|
||||
fontSize: 35,
|
||||
color: Colors.black,
|
||||
fontWeight: FontWeight.bold)),
|
||||
IconButton(
|
||||
|
@ -84,8 +81,8 @@ class OnboardingStepNine extends StatelessWidget {
|
|||
child: Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: SizedBox(
|
||||
width: 380 * ratio,
|
||||
height: 60 * ratio,
|
||||
width: 370,
|
||||
height: 60,
|
||||
child: ElevatedButton(
|
||||
key: keyChangePin,
|
||||
style: ElevatedButton.styleFrom(
|
||||
|
@ -99,16 +96,16 @@ class OnboardingStepNine extends StatelessWidget {
|
|||
reload: true);
|
||||
},
|
||||
child: Text("chooseAnotherPassword".tr(),
|
||||
style: TextStyle(
|
||||
fontSize: 22 * ratio,
|
||||
style: const TextStyle(
|
||||
fontSize: 22,
|
||||
fontWeight: FontWeight.w600))),
|
||||
))),
|
||||
SizedBox(height: 22 * ratio),
|
||||
const SizedBox(height: 22),
|
||||
NextButton(
|
||||
text: "iNotedMyPassword".tr(),
|
||||
nextScreen: OnboardingStepTen(scanDerivation: scanDerivation),
|
||||
isFast: false),
|
||||
SizedBox(height: 35 * ratio),
|
||||
const SizedBox(height: 40),
|
||||
]),
|
||||
const OfflineInfo(),
|
||||
]),
|
||||
|
|
|
@ -20,18 +20,15 @@ class QrCodeFullscreen extends StatelessWidget {
|
|||
appBar: AppBar(
|
||||
elevation: 0,
|
||||
backgroundColor: color ?? Colors.black,
|
||||
toolbarHeight: 60 * ratio,
|
||||
toolbarHeight: 60,
|
||||
leading: IconButton(
|
||||
icon: const Icon(Icons.arrow_back, color: orangeC),
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
}),
|
||||
title: SizedBox(
|
||||
height: 22,
|
||||
child: Text(
|
||||
'QR Code de ${getShortPubkey(address)}',
|
||||
style: const TextStyle(color: orangeC),
|
||||
),
|
||||
title: Text(
|
||||
'QR Code de ${getShortPubkey(address)}',
|
||||
style: const TextStyle(color: orangeC),
|
||||
)),
|
||||
body: SafeArea(
|
||||
child: SizedBox.expand(
|
||||
|
|
|
@ -28,9 +28,11 @@ class _SearchScreenState extends State<SearchScreen> {
|
|||
final int debouneTime = 50;
|
||||
|
||||
Future getClipBoard() async {
|
||||
final searchProvider = Provider.of<SearchProvider>(context, listen: false);
|
||||
final clipboard = await Clipboard.getData('text/plain');
|
||||
pastedAddress = clipboard?.text ?? '';
|
||||
canPasteAddress = isAddress(pastedAddress);
|
||||
searchProvider.reload();
|
||||
}
|
||||
|
||||
@override
|
||||
|
@ -44,10 +46,7 @@ class _SearchScreenState extends State<SearchScreen> {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final searchProvider = Provider.of<SearchProvider>(context);
|
||||
final screenHeight = MediaQuery.of(context).size.height;
|
||||
|
||||
final canValidate = searchProvider.searchController.text.length >= 2;
|
||||
// final canPasteAddress = false;
|
||||
|
||||
return PopScope(
|
||||
onPopInvoked: (_) {
|
||||
|
@ -57,16 +56,13 @@ class _SearchScreenState extends State<SearchScreen> {
|
|||
backgroundColor: backgroundColor,
|
||||
appBar: AppBar(
|
||||
elevation: 1,
|
||||
toolbarHeight: 60 * ratio,
|
||||
title: SizedBox(
|
||||
height: 22,
|
||||
child: Text('search'.tr()),
|
||||
),
|
||||
toolbarHeight: 60,
|
||||
title: Text('search'.tr()),
|
||||
),
|
||||
body: SafeArea(
|
||||
child: Stack(children: [
|
||||
Column(children: <Widget>[
|
||||
SizedBox(height: isTall ? 200 : 100),
|
||||
const SizedBox(height: 165),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 17),
|
||||
child: TextField(
|
||||
|
@ -102,7 +98,7 @@ class _SearchScreenState extends State<SearchScreen> {
|
|||
suffixIcon: searchProvider.searchController.text == ''
|
||||
? null
|
||||
: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 17),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10),
|
||||
child: IconButton(
|
||||
onPressed: (() async => {
|
||||
searchProvider.searchController.text = '',
|
||||
|
@ -117,10 +113,10 @@ class _SearchScreenState extends State<SearchScreen> {
|
|||
),
|
||||
),
|
||||
prefixIcon: const Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 17),
|
||||
padding: EdgeInsets.symmetric(horizontal: 13),
|
||||
child: Image(
|
||||
image: AssetImage('assets/loupe-noire.png'),
|
||||
height: 35),
|
||||
height: 30),
|
||||
),
|
||||
border: OutlineInputBorder(
|
||||
borderSide:
|
||||
|
@ -131,19 +127,19 @@ class _SearchScreenState extends State<SearchScreen> {
|
|||
BorderSide(color: Colors.grey[500]!, width: 2.5),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
contentPadding: const EdgeInsets.all(20),
|
||||
contentPadding: const EdgeInsets.all(13),
|
||||
),
|
||||
style: const TextStyle(
|
||||
fontSize: 20,
|
||||
fontSize: 18,
|
||||
color: Colors.black,
|
||||
fontWeight: FontWeight.w400,
|
||||
),
|
||||
),
|
||||
),
|
||||
const Spacer(flex: 1),
|
||||
const Spacer(),
|
||||
SizedBox(
|
||||
width: 320,
|
||||
height: 90,
|
||||
width: 280,
|
||||
height: 80,
|
||||
child: ElevatedButton(
|
||||
key: keyConfirmSearch,
|
||||
style: ElevatedButton.styleFrom(
|
||||
|
@ -178,11 +174,11 @@ class _SearchScreenState extends State<SearchScreen> {
|
|||
: 'search'.tr(),
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(
|
||||
fontSize: 21, fontWeight: FontWeight.w600),
|
||||
fontSize: 19, fontWeight: FontWeight.w600),
|
||||
),
|
||||
),
|
||||
),
|
||||
Spacer(flex: screenHeight <= 800 ? 1 : 2),
|
||||
const Spacer(),
|
||||
]),
|
||||
const OfflineInfo(),
|
||||
]),
|
||||
|
|
|
@ -20,7 +20,7 @@ class SearchResultScreen extends StatelessWidget {
|
|||
Provider.of<WalletsProfilesProvider>(context, listen: false);
|
||||
final duniterIndexer = Provider.of<DuniterIndexer>(context, listen: false);
|
||||
|
||||
double avatarSize = 55;
|
||||
double avatarSize = 45;
|
||||
// List<G1WalletsList> myContacts = contactsBox.toMap().values.toList();
|
||||
// myContacts = myContacts
|
||||
// .where((map) =>
|
||||
|
@ -33,11 +33,8 @@ class SearchResultScreen extends StatelessWidget {
|
|||
backgroundColor: backgroundColor,
|
||||
appBar: AppBar(
|
||||
elevation: 1,
|
||||
toolbarHeight: 60 * ratio,
|
||||
title: SizedBox(
|
||||
height: 22,
|
||||
child: Text('researchResults'.tr()),
|
||||
),
|
||||
toolbarHeight: 60,
|
||||
title: Text('researchResults'.tr()),
|
||||
),
|
||||
bottomNavigationBar: const GeckoBottomAppBar(),
|
||||
body: SafeArea(
|
||||
|
@ -47,7 +44,7 @@ class SearchResultScreen extends StatelessWidget {
|
|||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
const SizedBox(height: 30),
|
||||
const SizedBox(height: 20),
|
||||
Center(
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
|
@ -73,12 +70,12 @@ class SearchResultScreen extends StatelessWidget {
|
|||
// avatarSize: avatarSize,
|
||||
// walletsProfilesClass: walletsProfilesClass,
|
||||
// duniterIndexer: duniterIndexer),
|
||||
const SizedBox(height: 40),
|
||||
const SizedBox(height: 22),
|
||||
Text(
|
||||
'inBlockchainResult'.tr(args: [currencyName]),
|
||||
style: const TextStyle(fontSize: 20),
|
||||
style: const TextStyle(fontSize: 18),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
const SizedBox(height: 15),
|
||||
SearchResult(
|
||||
searchProvider: searchProvider,
|
||||
duniterIndexer: duniterIndexer,
|
||||
|
|
|
@ -8,6 +8,7 @@ import 'package:gecko/providers/my_wallets.dart';
|
|||
import 'package:gecko/providers/settings_provider.dart';
|
||||
import 'package:gecko/providers/substrate_sdk.dart';
|
||||
import 'package:gecko/globals.dart';
|
||||
import 'package:gecko/widgets/commons/loading.dart';
|
||||
import 'package:polkawallet_sdk/api/types/networkParams.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
|
@ -18,61 +19,54 @@ class SettingsScreen extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
const double buttonHigh = 50;
|
||||
const double buttonWidth = 240;
|
||||
const double fontSize = 16;
|
||||
|
||||
return Scaffold(
|
||||
backgroundColor: backgroundColor,
|
||||
appBar: AppBar(
|
||||
toolbarHeight: 60 * ratio,
|
||||
title: SizedBox(
|
||||
height: 22,
|
||||
child: Text('parameters'.tr()),
|
||||
)),
|
||||
appBar: AppBar(toolbarHeight: 60, title: Text('parameters'.tr())),
|
||||
body: Column(children: <Widget>[
|
||||
const SizedBox(height: 30),
|
||||
Text(
|
||||
'networkSettings'.tr(),
|
||||
style: TextStyle(color: Colors.grey[500], fontSize: 22),
|
||||
style: TextStyle(color: Colors.grey[500], fontSize: 20),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
duniterEndpointSelection(context),
|
||||
const SizedBox(height: 30),
|
||||
indexerEndpointSelection(context),
|
||||
const SizedBox(height: 40),
|
||||
const SizedBox(height: 35),
|
||||
Text(
|
||||
'displaySettings'.tr(),
|
||||
style: TextStyle(color: Colors.grey[500], fontSize: 22),
|
||||
style: TextStyle(color: Colors.grey[500], fontSize: 20),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
chooseCurrencyUnit(context),
|
||||
|
||||
// SizedBox(height: isTall ? 80 : 120),
|
||||
const Spacer(),
|
||||
SizedBox(
|
||||
height: buttonHigh,
|
||||
width: buttonWidth,
|
||||
child: Center(
|
||||
child: InkWell(
|
||||
key: keyDeleteAllWallets,
|
||||
onTap: () async {
|
||||
log.i('Oublier tous mes coffres');
|
||||
await _myWallets.deleteAllWallet(context);
|
||||
},
|
||||
child: Text(
|
||||
'forgetAllMyChests'.tr(),
|
||||
style: const TextStyle(
|
||||
fontSize: fontSize + 4,
|
||||
color: Color(0xffD80000),
|
||||
fontWeight: FontWeight.w600,
|
||||
Center(
|
||||
child: InkWell(
|
||||
key: keyDeleteAllWallets,
|
||||
onTap: () async {
|
||||
log.i('Oublier tous mes coffres');
|
||||
await _myWallets.deleteAllWallet(context);
|
||||
},
|
||||
child: SizedBox(
|
||||
height: 40,
|
||||
width: 220,
|
||||
child: Center(
|
||||
child: Text(
|
||||
'forgetAllMyChests'.tr(),
|
||||
style: const TextStyle(
|
||||
fontSize: 18,
|
||||
color: Color(0xffD80000),
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
// const Spacer(),
|
||||
SizedBox(height: isTall ? 90 : 60),
|
||||
const SizedBox(height: 70),
|
||||
]),
|
||||
);
|
||||
}
|
||||
|
@ -144,22 +138,26 @@ class SettingsScreen extends StatelessWidget {
|
|||
log.d(sub.sdk.api.connectedNode?.endpoint);
|
||||
return Expanded(
|
||||
child: Row(children: [
|
||||
const SizedBox(width: 10),
|
||||
const SizedBox(width: 2),
|
||||
SizedBox(
|
||||
width: 80,
|
||||
width: 60,
|
||||
child: Text(
|
||||
'currencyNode'.tr(args: ['']),
|
||||
'currencyNode'.tr(),
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
Icon(sub.nodeConnected && !sub.isLoadingEndpoint
|
||||
? Icons.check
|
||||
: Icons.close),
|
||||
SizedBox(
|
||||
width: 30,
|
||||
child: Icon(sub.nodeConnected && !sub.isLoadingEndpoint
|
||||
? Icons.check
|
||||
: Icons.close),
|
||||
),
|
||||
if (sub.nodeConnected && !sub.isLoadingEndpoint)
|
||||
const Icon(Icons.add_card_sharp, size: 0.01),
|
||||
const Spacer(),
|
||||
SizedBox(
|
||||
width: 280,
|
||||
height: 52,
|
||||
width: 240,
|
||||
child: Consumer<SettingsProvider>(builder: (context, set, _) {
|
||||
return DropdownButtonHideUnderline(
|
||||
key: keySelectDuniterNodeDropDown,
|
||||
|
@ -184,9 +182,9 @@ class SettingsScreen extends StatelessWidget {
|
|||
);
|
||||
}),
|
||||
),
|
||||
const Spacer(flex: 5),
|
||||
const Spacer(flex: 3),
|
||||
sub.isLoadingEndpoint
|
||||
? const CircularProgressIndicator(color: orangeC)
|
||||
? const Loading(size: 33, stroke: 2.5)
|
||||
: Consumer<SettingsProvider>(builder: (context, set, _) {
|
||||
return IconButton(
|
||||
key: keyConnectToEndpoint,
|
||||
|
@ -196,7 +194,7 @@ class SettingsScreen extends StatelessWidget {
|
|||
sub.getConnectedEndpoint()
|
||||
? orangeC
|
||||
: Colors.grey[500],
|
||||
size: 40,
|
||||
size: 36,
|
||||
),
|
||||
onPressed: selectedDuniterEndpoint !=
|
||||
sub.getConnectedEndpoint()
|
||||
|
@ -297,9 +295,9 @@ class SettingsScreen extends StatelessWidget {
|
|||
log.d(indexer.listIndexerEndpoints);
|
||||
return Expanded(
|
||||
child: Row(children: [
|
||||
const SizedBox(width: 10),
|
||||
const SizedBox(width: 5),
|
||||
const SizedBox(
|
||||
width: 80,
|
||||
width: 65,
|
||||
// child: Text('indexer'.tr()), // why translation does not work??
|
||||
child: Text('Indexer'),
|
||||
),
|
||||
|
@ -307,7 +305,7 @@ class SettingsScreen extends StatelessWidget {
|
|||
Icon(indexerEndpoint != '' ? Icons.check : Icons.close),
|
||||
const Spacer(),
|
||||
SizedBox(
|
||||
width: 280,
|
||||
width: 240,
|
||||
child: Consumer<SettingsProvider>(builder: (context, set, _) {
|
||||
return DropdownButtonHideUnderline(
|
||||
child: DropdownButton(
|
||||
|
@ -332,7 +330,7 @@ class SettingsScreen extends StatelessWidget {
|
|||
),
|
||||
const Spacer(flex: 5),
|
||||
indexer.isLoadingIndexer
|
||||
? const CircularProgressIndicator(color: orangeC)
|
||||
? const Loading(size: 33, stroke: 2.5)
|
||||
: Consumer<SettingsProvider>(builder: (context, set, _) {
|
||||
return IconButton(
|
||||
icon: Icon(
|
||||
|
@ -340,7 +338,7 @@ class SettingsScreen extends StatelessWidget {
|
|||
color: selectedIndexerEndpoint != indexerEndpoint
|
||||
? orangeC
|
||||
: Colors.grey[500],
|
||||
size: 40,
|
||||
size: 36,
|
||||
),
|
||||
onPressed: selectedIndexerEndpoint != indexerEndpoint
|
||||
? () async {
|
||||
|
|
|
@ -10,12 +10,7 @@ class TemplateScreen extends StatelessWidget {
|
|||
|
||||
return Scaffold(
|
||||
backgroundColor: backgroundColor,
|
||||
appBar: AppBar(
|
||||
toolbarHeight: 60 * ratio,
|
||||
title: const SizedBox(
|
||||
height: 22,
|
||||
child: Text('Template screen'),
|
||||
)),
|
||||
appBar: AppBar(toolbarHeight: 60, title: const Text('Template screen')),
|
||||
body: const SafeArea(
|
||||
child: Column(children: <Widget>[
|
||||
SizedBox(height: 20),
|
||||
|
|
|
@ -94,19 +94,16 @@ class TransactionInProgress extends StatelessWidget {
|
|||
child: Scaffold(
|
||||
backgroundColor: backgroundColor,
|
||||
appBar: AppBar(
|
||||
toolbarHeight: 60 * ratio,
|
||||
toolbarHeight: 60,
|
||||
elevation: 0,
|
||||
automaticallyImplyLeading: false,
|
||||
title: SizedBox(
|
||||
height: 22,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
Text('extrinsicInProgress'.tr(args: [
|
||||
actionMap[transType] ?? 'strangeTransaction'.tr()
|
||||
]))
|
||||
]),
|
||||
)),
|
||||
title: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
Text('extrinsicInProgress'.tr(args: [
|
||||
actionMap[transType] ?? 'strangeTransaction'.tr()
|
||||
]))
|
||||
])),
|
||||
body: SafeArea(
|
||||
child: Align(
|
||||
alignment: FractionalOffset.bottomCenter,
|
||||
|
@ -145,17 +142,24 @@ class TransactionInProgress extends StatelessWidget {
|
|||
style: const TextStyle(
|
||||
fontSize: 18, fontWeight: FontWeight.w600),
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
Text(
|
||||
'toMinus'.tr(),
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(fontSize: 18),
|
||||
),
|
||||
Text(
|
||||
toUsername ?? to,
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(
|
||||
fontSize: 18, fontWeight: FontWeight.w600),
|
||||
Visibility(
|
||||
visible: from != to,
|
||||
child: Column(
|
||||
children: [
|
||||
const SizedBox(height: 10),
|
||||
Text(
|
||||
'toMinus'.tr(),
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(fontSize: 18),
|
||||
),
|
||||
Text(
|
||||
toUsername ?? to,
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(
|
||||
fontSize: 18, fontWeight: FontWeight.w600),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
]),
|
||||
|
@ -196,7 +200,7 @@ class TransactionInProgress extends StatelessWidget {
|
|||
child: Text(
|
||||
resultText,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(fontSize: 19 * ratio),
|
||||
style: const TextStyle(fontSize: 19),
|
||||
),
|
||||
),
|
||||
]),
|
||||
|
@ -205,8 +209,8 @@ class TransactionInProgress extends StatelessWidget {
|
|||
child: Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: SizedBox(
|
||||
width: 380 * ratio,
|
||||
height: 60 * ratio,
|
||||
width: 300,
|
||||
height: 55,
|
||||
child: ElevatedButton(
|
||||
key: keyCloseTransactionScreen,
|
||||
style: ElevatedButton.styleFrom(
|
||||
|
@ -219,15 +223,14 @@ class TransactionInProgress extends StatelessWidget {
|
|||
},
|
||||
child: Text(
|
||||
'close'.tr(),
|
||||
style: TextStyle(
|
||||
fontSize: 23 * ratio,
|
||||
fontWeight: FontWeight.w600),
|
||||
style: const TextStyle(
|
||||
fontSize: 23, fontWeight: FontWeight.w600),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: isTall ? 80 : 20)
|
||||
const SizedBox(height: 80)
|
||||
])),
|
||||
),
|
||||
),
|
||||
|
|
|
@ -23,8 +23,8 @@ import 'package:gecko/widgets/payment_popup.dart';
|
|||
import 'package:provider/provider.dart';
|
||||
import 'package:qr_flutter/qr_flutter.dart';
|
||||
|
||||
const double buttonSize = 100;
|
||||
const double buttonFontSize = 18;
|
||||
const double buttonSize = 85;
|
||||
const double buttonFontSize = 16;
|
||||
|
||||
class WalletViewScreen extends StatelessWidget {
|
||||
const WalletViewScreen(
|
||||
|
@ -53,7 +53,7 @@ class WalletViewScreen extends StatelessWidget {
|
|||
resizeToAvoidBottomInset: true,
|
||||
appBar: AppBar(
|
||||
elevation: 0,
|
||||
toolbarHeight: 60 * ratio,
|
||||
toolbarHeight: 60,
|
||||
actions: [
|
||||
Row(
|
||||
children: [
|
||||
|
@ -98,22 +98,18 @@ class WalletViewScreen extends StatelessWidget {
|
|||
],
|
||||
)
|
||||
],
|
||||
title: SizedBox(
|
||||
height: 22,
|
||||
child: Text(duniterIndexer
|
||||
.walletNameIndexer[walletProfile.address] ==
|
||||
null
|
||||
? 'seeAWallet'.tr()
|
||||
: 'memberAccountOf'.tr(args: [
|
||||
duniterIndexer.walletNameIndexer[walletProfile.address] ??
|
||||
'?'
|
||||
]))),
|
||||
title: Text(duniterIndexer.walletNameIndexer[walletProfile.address] ==
|
||||
null
|
||||
? 'seeAWallet'.tr()
|
||||
: 'memberAccountOf'.tr(args: [
|
||||
duniterIndexer.walletNameIndexer[walletProfile.address] ?? '?'
|
||||
])),
|
||||
),
|
||||
bottomNavigationBar: const GeckoBottomAppBar(),
|
||||
body: SafeArea(
|
||||
child: Column(children: <Widget>[
|
||||
HeaderProfile(address: address, username: username),
|
||||
SizedBox(height: isTall ? 30 : 15),
|
||||
const SizedBox(height: 25),
|
||||
Row(mainAxisAlignment: MainAxisAlignment.spaceAround, children: [
|
||||
Column(children: <Widget>[
|
||||
SizedBox(
|
||||
|
@ -125,11 +121,12 @@ class WalletViewScreen extends StatelessWidget {
|
|||
key: keyViewActivity,
|
||||
splashColor: orangeC, // inkwell color
|
||||
child: const Padding(
|
||||
padding: EdgeInsets.all(13),
|
||||
child: Image(
|
||||
image: AssetImage(
|
||||
'assets/walletOptions/clock.png'),
|
||||
height: 90)),
|
||||
padding: EdgeInsets.all(11),
|
||||
child: Image(
|
||||
image:
|
||||
AssetImage('assets/walletOptions/clock.png'),
|
||||
),
|
||||
),
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
|
@ -300,10 +297,11 @@ class WalletViewScreen extends StatelessWidget {
|
|||
key: keyCopyAddress,
|
||||
splashColor: orangeC,
|
||||
child: const Padding(
|
||||
padding: EdgeInsets.all(20),
|
||||
child: Image(
|
||||
image: AssetImage('assets/copy_key.png'),
|
||||
height: 90)),
|
||||
padding: EdgeInsets.all(17),
|
||||
child: Image(
|
||||
image: AssetImage('assets/copy_key.png'),
|
||||
),
|
||||
),
|
||||
onTap: () {
|
||||
Clipboard.setData(ClipboardData(text: address));
|
||||
snackCopyKey(context);
|
||||
|
@ -361,7 +359,7 @@ class WalletViewScreen extends StatelessWidget {
|
|||
}
|
||||
: null,
|
||||
child: const Padding(
|
||||
padding: EdgeInsets.all(14),
|
||||
padding: EdgeInsets.all(10),
|
||||
child: Image(
|
||||
image: AssetImage('assets/vector_white.png')),
|
||||
)),
|
||||
|
@ -381,7 +379,7 @@ class WalletViewScreen extends StatelessWidget {
|
|||
fontWeight: FontWeight.w500),
|
||||
);
|
||||
}),
|
||||
SizedBox(height: isTall ? 50 : 20)
|
||||
const SizedBox(height: 50)
|
||||
]),
|
||||
));
|
||||
}
|
||||
|
@ -390,17 +388,14 @@ class WalletViewScreen extends StatelessWidget {
|
|||
return Column(children: <Widget>[
|
||||
SizedBox(
|
||||
height: buttonSize,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(bottom: 0),
|
||||
child: Container(
|
||||
foregroundDecoration: const BoxDecoration(
|
||||
color: Colors.grey,
|
||||
backgroundBlendMode: BlendMode.saturation,
|
||||
),
|
||||
child: const Opacity(
|
||||
opacity: 0.5,
|
||||
child: Image(image: AssetImage('assets/gecko_certify.png')),
|
||||
),
|
||||
child: Container(
|
||||
foregroundDecoration: const BoxDecoration(
|
||||
color: Colors.grey,
|
||||
backgroundBlendMode: BlendMode.saturation,
|
||||
),
|
||||
child: const Opacity(
|
||||
opacity: 0.5,
|
||||
child: Image(image: AssetImage('assets/gecko_certify.png')),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:gecko/globals.dart';
|
||||
import 'package:gecko/providers/substrate_sdk.dart';
|
||||
import 'package:gecko/providers/wallet_options.dart';
|
||||
import 'package:gecko/widgets/ud_unit_display.dart';
|
||||
|
@ -34,9 +33,7 @@ class Balance extends StatelessWidget {
|
|||
walletOptions.balanceCache[address] != -1) {
|
||||
return Row(children: [
|
||||
Text(walletOptions.balanceCache[address]!.toString(),
|
||||
style: TextStyle(
|
||||
fontSize: isTall ? size : size * 0.9,
|
||||
color: color)),
|
||||
style: TextStyle(fontSize: size, color: color)),
|
||||
const SizedBox(width: 5),
|
||||
UdUnitDisplay(size: size, color: color),
|
||||
]);
|
||||
|
@ -58,7 +55,7 @@ class Balance extends StatelessWidget {
|
|||
Text(
|
||||
walletOptions.balanceCache[address]!.toString(),
|
||||
style: TextStyle(
|
||||
fontSize: isTall ? size : size * 0.9,
|
||||
fontSize: size,
|
||||
color: color,
|
||||
),
|
||||
),
|
||||
|
|
|
@ -32,7 +32,7 @@ class GeckoBottomAppBar extends StatelessWidget {
|
|||
child: Container(
|
||||
color: yellowC,
|
||||
width: size.width,
|
||||
height: 80,
|
||||
height: 70,
|
||||
child: Row(mainAxisAlignment: MainAxisAlignment.start, children: [
|
||||
const Spacer(),
|
||||
const SizedBox(width: 11),
|
||||
|
|
|
@ -18,7 +18,7 @@ class BubbleSpeak extends StatelessWidget {
|
|||
Widget build(BuildContext context) {
|
||||
return Bubble(
|
||||
padding: long == null
|
||||
? const BubbleEdges.all(20)
|
||||
? const BubbleEdges.all(18)
|
||||
: BubbleEdges.symmetric(horizontal: long, vertical: 30),
|
||||
elevation: 5,
|
||||
color: backgroundColor,
|
||||
|
@ -26,7 +26,7 @@ class BubbleSpeak extends StatelessWidget {
|
|||
text,
|
||||
key: textKey,
|
||||
style: const TextStyle(
|
||||
color: Colors.black, fontSize: 21, fontWeight: FontWeight.w400),
|
||||
color: Colors.black, fontSize: 18, fontWeight: FontWeight.w400),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ class AddNewDerivationButton extends StatelessWidget {
|
|||
String newDerivationName =
|
||||
'${'wallet'.tr()} ${myWalletProvider.listWallets.last.number! + 2}';
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(16),
|
||||
padding: const EdgeInsets.all(12),
|
||||
child: ClipRRect(
|
||||
borderRadius: const BorderRadius.all(Radius.circular(12)),
|
||||
child: Column(children: <Widget>[
|
||||
|
@ -56,17 +56,17 @@ class AddNewDerivationButton extends StatelessWidget {
|
|||
child: Center(
|
||||
child: myWalletProvider.isNewDerivationLoading
|
||||
? const SizedBox(
|
||||
height: 60,
|
||||
width: 60,
|
||||
height: 50,
|
||||
width: 50,
|
||||
child: CircularProgressIndicator(
|
||||
color: orangeC,
|
||||
strokeWidth: 7,
|
||||
strokeWidth: 6,
|
||||
),
|
||||
)
|
||||
: const Text(
|
||||
'+',
|
||||
style: TextStyle(
|
||||
fontSize: 150,
|
||||
fontSize: 120,
|
||||
fontWeight: FontWeight.w700,
|
||||
color: Color(0xFFFCB437)),
|
||||
)),
|
||||
|
|
|
@ -19,12 +19,12 @@ class ChestOptionsButtons extends StatelessWidget {
|
|||
return Column(children: [
|
||||
const SizedBox(height: 50),
|
||||
SizedBox(
|
||||
height: 80,
|
||||
width: 420,
|
||||
height: 65,
|
||||
width: 340,
|
||||
child: ElevatedButton.icon(
|
||||
icon: Image.asset(
|
||||
'assets/chests/config.png',
|
||||
height: 60,
|
||||
height: 40,
|
||||
),
|
||||
style: ElevatedButton.styleFrom(
|
||||
foregroundColor: Colors.black, elevation: 2,
|
||||
|
@ -39,67 +39,67 @@ class ChestOptionsButtons extends StatelessWidget {
|
|||
label: Text(
|
||||
" ${"manageChest".tr()}",
|
||||
style: const TextStyle(
|
||||
fontSize: 22,
|
||||
fontSize: 19,
|
||||
fontWeight: FontWeight.w700,
|
||||
color: Color(0xff8a3c0f),
|
||||
),
|
||||
),
|
||||
)),
|
||||
const SizedBox(height: 30),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
SvgPicture.asset(
|
||||
'assets/cesium_bw2.svg',
|
||||
semanticsLabel: 'CS',
|
||||
height: 50,
|
||||
),
|
||||
const SizedBox(width: 5),
|
||||
InkWell(
|
||||
key: keyImportG1v1,
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) {
|
||||
return const ImportG1v1();
|
||||
}),
|
||||
);
|
||||
},
|
||||
child: SizedBox(
|
||||
width: 350,
|
||||
const SizedBox(height: 20),
|
||||
InkWell(
|
||||
key: keyImportG1v1,
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) {
|
||||
return const ImportG1v1();
|
||||
}),
|
||||
);
|
||||
},
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
SvgPicture.asset(
|
||||
'assets/cesium_bw2.svg',
|
||||
semanticsLabel: 'CS',
|
||||
height: 40,
|
||||
),
|
||||
const SizedBox(width: 5),
|
||||
SizedBox(
|
||||
width: 300,
|
||||
height: 60,
|
||||
child: Center(
|
||||
child: Text('importG1v1'.tr(),
|
||||
style: TextStyle(
|
||||
fontSize: 22,
|
||||
fontSize: 18,
|
||||
color: Colors.blue[900],
|
||||
fontWeight: FontWeight.w500))),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
InkWell(
|
||||
key: keyChangeChest,
|
||||
onTap: () {
|
||||
// Navigator.push(
|
||||
// context,
|
||||
// MaterialPageRoute(builder: (context) {
|
||||
// return const ChooseChest();
|
||||
// }),
|
||||
// );
|
||||
},
|
||||
child: SizedBox(
|
||||
width: 400,
|
||||
height: 60,
|
||||
child: Center(
|
||||
child: Text('changeChest'.tr(),
|
||||
style: const TextStyle(
|
||||
fontSize: 22,
|
||||
color: Colors.grey, //orangeC
|
||||
fontWeight: FontWeight.w500))),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
// InkWell(
|
||||
// key: keyChangeChest,
|
||||
// onTap: () {
|
||||
// // Navigator.push(
|
||||
// // context,
|
||||
// // MaterialPageRoute(builder: (context) {
|
||||
// // return const ChooseChest();
|
||||
// // }),
|
||||
// // );
|
||||
// },
|
||||
// child: SizedBox(
|
||||
// width: 270,
|
||||
// height: 60,
|
||||
// child: Center(
|
||||
// child: Text('changeChest'.tr(),
|
||||
// style: const TextStyle(
|
||||
// fontSize: 20,
|
||||
// color: Colors.grey, //orangeC
|
||||
// fontWeight: FontWeight.w500))),
|
||||
// ),
|
||||
// ),
|
||||
const SizedBox(height: 30)
|
||||
]);
|
||||
}
|
||||
|
|
|
@ -41,11 +41,11 @@ class HomeButtons extends StatelessWidget {
|
|||
color: orangeC, // button color
|
||||
child: InkWell(
|
||||
key: keyOpenSearch,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(18),
|
||||
child: const Padding(
|
||||
padding: EdgeInsets.all(16),
|
||||
child: Image(
|
||||
image: const AssetImage('assets/home/loupe.png'),
|
||||
height: 62 * ratio),
|
||||
image: AssetImage('assets/home/loupe.png'),
|
||||
height: 58),
|
||||
),
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
|
@ -58,17 +58,17 @@ class HomeButtons extends StatelessWidget {
|
|||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
const SizedBox(height: 10),
|
||||
Text(
|
||||
"searchWallet".tr(),
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 15 * ratio,
|
||||
fontSize: 13.5,
|
||||
fontWeight: FontWeight.w500),
|
||||
)
|
||||
]),
|
||||
const SizedBox(width: 120),
|
||||
const SizedBox(width: 110),
|
||||
Column(children: <Widget>[
|
||||
Container(
|
||||
decoration: const BoxDecoration(
|
||||
|
@ -107,27 +107,27 @@ class HomeButtons extends StatelessWidget {
|
|||
Navigator.pushNamed(context, '/mywallets');
|
||||
}
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(18),
|
||||
child: const Padding(
|
||||
padding: EdgeInsets.all(15),
|
||||
child: Image(
|
||||
image: const AssetImage('assets/home/wallet.png'),
|
||||
height: 68 * ratio))),
|
||||
image: AssetImage('assets/home/wallet.png'),
|
||||
height: 61))),
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
const SizedBox(height: 10),
|
||||
Text(
|
||||
"manageWallets".tr(),
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 15 * ratio,
|
||||
fontSize: 13.5,
|
||||
fontWeight: FontWeight.w500),
|
||||
)
|
||||
])
|
||||
]),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(top: 35 * ratio),
|
||||
padding: const EdgeInsets.only(top: 35),
|
||||
child:
|
||||
Row(mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[
|
||||
Column(children: <Widget>[
|
||||
|
@ -144,30 +144,30 @@ class HomeButtons extends StatelessWidget {
|
|||
child: Material(
|
||||
color: orangeC, // button color
|
||||
child: InkWell(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(18),
|
||||
child: const Padding(
|
||||
padding: EdgeInsets.all(14),
|
||||
child: Image(
|
||||
image: const AssetImage('assets/home/qrcode.png'),
|
||||
height: 68 * ratio)),
|
||||
image: AssetImage('assets/home/qrcode.png'),
|
||||
height: 62)),
|
||||
onTap: () async {
|
||||
await historyProvider.scan(context);
|
||||
}),
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
const SizedBox(height: 10),
|
||||
Text(
|
||||
"scanQRCode".tr(),
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 15 * ratio,
|
||||
fontSize: 13.5,
|
||||
fontWeight: FontWeight.w500),
|
||||
)
|
||||
])
|
||||
]),
|
||||
),
|
||||
SizedBox(height: isTall ? 80 : 40)
|
||||
const SizedBox(height: 70)
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ class CertTile extends StatelessWidget {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
int keyID = 0;
|
||||
const double avatarSize = 200;
|
||||
const double avatarSize = 50;
|
||||
|
||||
return Column(
|
||||
children: listCerts.map((repository) {
|
||||
|
@ -25,15 +25,17 @@ class CertTile extends StatelessWidget {
|
|||
padding: const EdgeInsets.only(right: 0),
|
||||
child: ListTile(
|
||||
key: keyTransaction(keyID++),
|
||||
contentPadding: const EdgeInsets.only(
|
||||
left: 20, right: 30, top: 15, bottom: 15),
|
||||
contentPadding:
|
||||
const EdgeInsets.only(left: 10, right: 0, top: 7, bottom: 7),
|
||||
leading: ClipOval(
|
||||
child: defaultAvatar(avatarSize),
|
||||
),
|
||||
title: Padding(
|
||||
padding: const EdgeInsets.only(bottom: 5),
|
||||
child: Text(repository['name'],
|
||||
style: const TextStyle(fontSize: 22)),
|
||||
padding: const EdgeInsets.only(bottom: 2),
|
||||
child: Text(
|
||||
repository['name'],
|
||||
style: const TextStyle(fontSize: 18),
|
||||
),
|
||||
),
|
||||
subtitle: RichText(
|
||||
text: TextSpan(
|
||||
|
@ -44,12 +46,13 @@ class CertTile extends StatelessWidget {
|
|||
children: <TextSpan>[
|
||||
TextSpan(
|
||||
text: repository['date'],
|
||||
style: const TextStyle(fontSize: 16),
|
||||
),
|
||||
if (repository[2] != '')
|
||||
TextSpan(
|
||||
text: ' · ',
|
||||
style: TextStyle(
|
||||
fontSize: 20,
|
||||
fontSize: 19,
|
||||
color: Colors.grey[550],
|
||||
),
|
||||
),
|
||||
|
@ -57,8 +60,9 @@ class CertTile extends StatelessWidget {
|
|||
text: getShortPubkey(repository['address']),
|
||||
style: TextStyle(
|
||||
fontStyle: FontStyle.italic,
|
||||
fontFamily: 'Monospace',
|
||||
color: Colors.grey[600],
|
||||
fontSize: 18),
|
||||
fontSize: 16),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
|
@ -35,7 +35,7 @@ class Certifications extends StatelessWidget {
|
|||
)
|
||||
],
|
||||
)
|
||||
: const Text('');
|
||||
: const SizedBox();
|
||||
});
|
||||
}),
|
||||
]);
|
||||
|
|
|
@ -6,9 +6,14 @@ import 'package:gecko/models/widgets_keys.dart';
|
|||
import 'package:gecko/widgets/cert_tile.dart';
|
||||
import 'package:graphql_flutter/graphql_flutter.dart';
|
||||
|
||||
class CertsSent extends StatelessWidget {
|
||||
const CertsSent({Key? key, required this.address}) : super(key: key);
|
||||
class CertsList extends StatelessWidget {
|
||||
const CertsList(
|
||||
{Key? key,
|
||||
required this.address,
|
||||
this.direction = CertDirection.received})
|
||||
: super(key: key);
|
||||
final String address;
|
||||
final CertDirection direction;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
@ -21,6 +26,17 @@ class CertsSent extends StatelessWidget {
|
|||
'$indexerEndpoint/v1/graphql',
|
||||
);
|
||||
|
||||
late String gertCertsReq;
|
||||
late String certFrom;
|
||||
|
||||
if (direction == CertDirection.received) {
|
||||
gertCertsReq = getCertsReceived;
|
||||
certFrom = 'issuer';
|
||||
} else {
|
||||
gertCertsReq = getCertsSent;
|
||||
certFrom = 'receiver';
|
||||
}
|
||||
|
||||
final client = ValueNotifier(
|
||||
GraphQLClient(
|
||||
cache: GraphQLCache(store: HiveStore()),
|
||||
|
@ -31,7 +47,7 @@ class CertsSent extends StatelessWidget {
|
|||
client: client,
|
||||
child: Query(
|
||||
options: QueryOptions(
|
||||
document: gql(getCertsSent),
|
||||
document: gql(gertCertsReq),
|
||||
variables: <String, dynamic>{
|
||||
'address': address,
|
||||
},
|
||||
|
@ -62,44 +78,46 @@ class CertsSent extends StatelessWidget {
|
|||
)
|
||||
]);
|
||||
}
|
||||
|
||||
final List certsData = result.data!['certification'];
|
||||
List listCerts = [];
|
||||
for (final cert in certsData) {
|
||||
final String issuerAddress = cert[certFrom]['pubkey'];
|
||||
final String issuerName = cert[certFrom]['name'];
|
||||
final date = DateTime.parse(cert['created_at']);
|
||||
final dp = DateTime(date.year, date.month, date.day);
|
||||
final dateForm = '${dp.day}-${dp.month}-${dp.year}';
|
||||
listCerts.add({
|
||||
'address': issuerAddress,
|
||||
'name': issuerName,
|
||||
'date': dateForm
|
||||
});
|
||||
}
|
||||
|
||||
// Build history list
|
||||
return SizedBox(
|
||||
height: windowHeight,
|
||||
child: ListView(
|
||||
key: keyListTransactions,
|
||||
children: <Widget>[certsView(result)],
|
||||
children: <Widget>[
|
||||
result.data == null
|
||||
? Column(children: <Widget>[
|
||||
const SizedBox(height: 50),
|
||||
Text(
|
||||
"noTransactionToDisplay".tr(),
|
||||
style: const TextStyle(fontSize: 18),
|
||||
)
|
||||
])
|
||||
: Column(children: <Widget>[
|
||||
CertTile(listCerts: listCerts),
|
||||
])
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget certsView(QueryResult result) {
|
||||
List listCerts = [];
|
||||
final List certsData = result.data!['certification'];
|
||||
|
||||
for (final cert in certsData) {
|
||||
final String issuerAddress = cert['receiver']['pubkey'];
|
||||
final String issuerName = cert['receiver']['name'];
|
||||
final date = DateTime.parse(cert['created_at']);
|
||||
final dp = DateTime(date.year, date.month, date.day);
|
||||
final dateForm = '${dp.day}-${dp.month}-${dp.year}';
|
||||
|
||||
listCerts.add(
|
||||
{'address': issuerAddress, 'name': issuerName, 'date': dateForm});
|
||||
}
|
||||
|
||||
return result.data == null
|
||||
? Column(children: <Widget>[
|
||||
const SizedBox(height: 50),
|
||||
Text(
|
||||
"noTransactionToDisplay".tr(),
|
||||
style: const TextStyle(fontSize: 18),
|
||||
)
|
||||
])
|
||||
: Column(children: <Widget>[
|
||||
CertTile(listCerts: listCerts),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
enum CertDirection { received, sent }
|
|
@ -1,104 +0,0 @@
|
|||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gecko/globals.dart';
|
||||
import 'package:gecko/models/queries_indexer.dart';
|
||||
import 'package:gecko/models/widgets_keys.dart';
|
||||
import 'package:gecko/widgets/cert_tile.dart';
|
||||
import 'package:graphql_flutter/graphql_flutter.dart';
|
||||
|
||||
class CertsReceived extends StatelessWidget {
|
||||
const CertsReceived({Key? key, required this.address}) : super(key: key);
|
||||
final String address;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final screenHeight = MediaQuery.of(context).size.height;
|
||||
final appBarHeight = AppBar().preferredSize.height;
|
||||
log.d(appBarHeight);
|
||||
final windowHeight = screenHeight - appBarHeight - 200;
|
||||
|
||||
final httpLink = HttpLink(
|
||||
'$indexerEndpoint/v1/graphql',
|
||||
);
|
||||
|
||||
final client = ValueNotifier(
|
||||
GraphQLClient(
|
||||
cache: GraphQLCache(store: HiveStore()),
|
||||
link: httpLink,
|
||||
),
|
||||
);
|
||||
return GraphQLProvider(
|
||||
client: client,
|
||||
child: Query(
|
||||
options: QueryOptions(
|
||||
document: gql(getCertsReceived),
|
||||
variables: <String, dynamic>{
|
||||
'address': address,
|
||||
},
|
||||
),
|
||||
builder: (QueryResult result, {fetchMore, refetch}) {
|
||||
if (result.isLoading && result.data == null) {
|
||||
return const Center(
|
||||
child: CircularProgressIndicator(),
|
||||
);
|
||||
}
|
||||
|
||||
if (result.hasException || result.data == null) {
|
||||
log.e('Error Indexer: ${result.exception}');
|
||||
return Column(children: <Widget>[
|
||||
const SizedBox(height: 50),
|
||||
Text(
|
||||
"noNetworkNoHistory".tr(),
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(fontSize: 18),
|
||||
)
|
||||
]);
|
||||
} else if (result.data?['certification']?.isEmpty) {
|
||||
return Column(children: <Widget>[
|
||||
const SizedBox(height: 50),
|
||||
Text(
|
||||
"noDataToDisplay".tr(),
|
||||
style: const TextStyle(fontSize: 18),
|
||||
)
|
||||
]);
|
||||
}
|
||||
// Build history list
|
||||
return SizedBox(
|
||||
height: windowHeight,
|
||||
child: ListView(
|
||||
key: keyListTransactions,
|
||||
children: <Widget>[certsView(result)],
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget certsView(QueryResult result) {
|
||||
List listCerts = [];
|
||||
final List certsData = result.data!['certification'];
|
||||
|
||||
for (final cert in certsData) {
|
||||
final String issuerAddress = cert['issuer']['pubkey'];
|
||||
final String issuerName = cert['issuer']['name'];
|
||||
final date = DateTime.parse(cert['created_at']);
|
||||
final dp = DateTime(date.year, date.month, date.day);
|
||||
final dateForm = '${dp.day}-${dp.month}-${dp.year}';
|
||||
listCerts.add(
|
||||
{'address': issuerAddress, 'name': issuerName, 'date': dateForm});
|
||||
}
|
||||
|
||||
return result.data == null
|
||||
? Column(children: <Widget>[
|
||||
const SizedBox(height: 50),
|
||||
Text(
|
||||
"noTransactionToDisplay".tr(),
|
||||
style: const TextStyle(fontSize: 18),
|
||||
)
|
||||
])
|
||||
: Column(children: <Widget>[
|
||||
CertTile(listCerts: listCerts),
|
||||
]);
|
||||
}
|
||||
}
|
|
@ -13,7 +13,6 @@ class CesiumAvatar extends StatelessWidget {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final csProvider = Provider.of<CesiumPlusProvider>(context, listen: false);
|
||||
log.d('tatata');
|
||||
|
||||
return ClipOval(
|
||||
child: FutureBuilder(
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:gecko/globals.dart';
|
||||
|
||||
class BuildImage extends StatelessWidget {
|
||||
const BuildImage({
|
||||
|
@ -17,8 +16,8 @@ class BuildImage extends StatelessWidget {
|
|||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(0),
|
||||
width: 440,
|
||||
height: isTall ? boxHeight : boxHeight * 0.9,
|
||||
width: imageWidth,
|
||||
height: boxHeight,
|
||||
decoration: BoxDecoration(
|
||||
gradient: const LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
|
@ -29,6 +28,6 @@ class BuildImage extends StatelessWidget {
|
|||
],
|
||||
),
|
||||
border: Border.all(color: Colors.grey[900]!)),
|
||||
child: Image.asset('assets/onBoarding/$assetName', width: imageWidth));
|
||||
child: Image.asset('assets/onBoarding/$assetName'));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,8 +16,10 @@ class BuildProgressBar extends StatelessWidget {
|
|||
dotsCount: 10,
|
||||
position: pagePosition,
|
||||
decorator: DotsDecorator(
|
||||
size: const Size.square(7),
|
||||
activeSize: const Size.square(10),
|
||||
spacing: const EdgeInsets.symmetric(horizontal: 10),
|
||||
color: Colors.grey[300]!, // Inactive color
|
||||
color: Colors.grey[400]!,
|
||||
activeColor: orangeC,
|
||||
),
|
||||
);
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_markdown/flutter_markdown.dart';
|
||||
import 'package:gecko/globals.dart';
|
||||
|
||||
class BuildText extends StatelessWidget {
|
||||
const BuildText({
|
||||
Key? key,
|
||||
required this.text,
|
||||
this.size = 20,
|
||||
this.size = 18,
|
||||
this.isMd = true,
|
||||
}) : super(key: key);
|
||||
|
||||
|
@ -17,16 +16,13 @@ class BuildText extends StatelessWidget {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final mdStyle = MarkdownStyleSheet(
|
||||
p: TextStyle(
|
||||
fontSize: isTall ? size : size * 0.9,
|
||||
color: Colors.black,
|
||||
letterSpacing: 0.3),
|
||||
p: TextStyle(fontSize: size, color: Colors.black, letterSpacing: 0.3),
|
||||
textAlign: WrapAlignment.spaceBetween,
|
||||
);
|
||||
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(12),
|
||||
width: 440,
|
||||
width: 375,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white, border: Border.all(color: Colors.grey[900]!)),
|
||||
child: isMd
|
||||
|
@ -34,9 +30,7 @@ class BuildText extends StatelessWidget {
|
|||
: Text(text,
|
||||
textAlign: TextAlign.justify,
|
||||
style: TextStyle(
|
||||
fontSize: isTall ? size : size * 0.9,
|
||||
color: Colors.black,
|
||||
letterSpacing: 0.3)),
|
||||
fontSize: size, color: Colors.black, letterSpacing: 0.3)),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -194,24 +194,3 @@ bool isAddress(address) {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Widget geckoAppBar() {
|
||||
// return AppBar(
|
||||
// toolbarHeight: 60 * ratio,
|
||||
// elevation: 0,
|
||||
// leading: IconButton(
|
||||
// icon: const Icon(Icons.arrow_back, color: Colors.black),
|
||||
// onPressed: () {
|
||||
// _walletOptions.isEditing = false;
|
||||
// _walletOptions.isBalanceBlur = false;
|
||||
// Navigator.pop(context);
|
||||
// }),
|
||||
// title: SizedBox(
|
||||
// height: 22,
|
||||
// child: Consumer<WalletOptionsProvider>(
|
||||
// builder: (context, walletProvider, _) {
|
||||
// return Text(_walletOptions.nameController.text);
|
||||
// }),
|
||||
// ),
|
||||
// );
|
||||
// }
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:gecko/globals.dart';
|
||||
import 'package:gecko/widgets/commons/build_image.dart';
|
||||
import 'package:gecko/widgets/commons/build_progress_bar.dart';
|
||||
import 'package:gecko/widgets/commons/build_text.dart';
|
||||
|
@ -15,9 +14,9 @@ class InfoIntro extends StatelessWidget {
|
|||
required this.pagePosition,
|
||||
this.isMd = false,
|
||||
this.isFast = false,
|
||||
this.boxHeight = 440,
|
||||
this.imageWidth = 350,
|
||||
this.textSize = 20,
|
||||
this.boxHeight = 375,
|
||||
this.imageWidth = 375,
|
||||
this.textSize = 18,
|
||||
}) : super(key: key);
|
||||
|
||||
final String text;
|
||||
|
@ -34,12 +33,10 @@ class InfoIntro extends StatelessWidget {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(children: <Widget>[
|
||||
SizedBox(height: isTall ? 40 : 20),
|
||||
const SizedBox(height: 25),
|
||||
BuildProgressBar(pagePosition: pagePosition),
|
||||
SizedBox(height: isTall ? 40 : 20),
|
||||
|
||||
const SizedBox(height: 25),
|
||||
BuildText(text: text, size: textSize, isMd: isMd),
|
||||
|
||||
BuildImage(
|
||||
assetName: assetName, boxHeight: boxHeight, imageWidth: imageWidth),
|
||||
Expanded(
|
||||
|
@ -49,8 +46,7 @@ class InfoIntro extends StatelessWidget {
|
|||
text: buttonText, nextScreen: nextScreen, isFast: false),
|
||||
),
|
||||
),
|
||||
// const SizedBox(height: 40),
|
||||
SizedBox(height: isTall ? 40 : 20),
|
||||
const SizedBox(height: 40),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,8 +18,8 @@ class NextButton extends StatelessWidget {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SizedBox(
|
||||
width: 380 * ratio,
|
||||
height: 60 * ratio,
|
||||
width: 370,
|
||||
height: 60,
|
||||
child: ElevatedButton(
|
||||
key: keyGoNext,
|
||||
style: ElevatedButton.styleFrom(
|
||||
|
@ -32,7 +32,7 @@ class NextButton extends StatelessWidget {
|
|||
},
|
||||
child: Text(
|
||||
text,
|
||||
style: TextStyle(fontSize: 23 * ratio, fontWeight: FontWeight.w600),
|
||||
style: const TextStyle(fontSize: 23, fontWeight: FontWeight.w600),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
|
|
@ -27,11 +27,11 @@ class ContactsList extends StatelessWidget {
|
|||
final duniterIndexer = Provider.of<DuniterIndexer>(context, listen: false);
|
||||
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 20),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 5),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
const SizedBox(height: 20, width: double.infinity),
|
||||
const SizedBox(height: 10, width: double.infinity),
|
||||
if (myContacts.isEmpty)
|
||||
Text('noContacts'.tr())
|
||||
else
|
||||
|
@ -42,7 +42,7 @@ class ContactsList extends StatelessWidget {
|
|||
padding: const EdgeInsets.symmetric(horizontal: 5),
|
||||
child: ListTile(
|
||||
key: keySearchResult('keyID++'),
|
||||
horizontalTitleGap: 40,
|
||||
horizontalTitleGap: 7,
|
||||
contentPadding: const EdgeInsets.all(5),
|
||||
leading:
|
||||
CesiumAvatar(address: g1Wallet.address, size: 55),
|
||||
|
|
|
@ -23,9 +23,7 @@ class DragTuleAction extends StatelessWidget {
|
|||
delay: const Duration(milliseconds: 200),
|
||||
data: wallet.address,
|
||||
dragAnchorStrategy: (Draggable<Object> _, BuildContext __, Offset ___) =>
|
||||
const Offset(0, 0),
|
||||
// feedbackOffset: const Offset(-500, -500),
|
||||
// dragAnchorStrategy: childDragAnchorStrategy,
|
||||
const Offset(55, 55),
|
||||
onDragStarted: () => myWalletProvider.dragAddress = wallet,
|
||||
onDragEnd: (_) {
|
||||
myWalletProvider.lastFlyBy = null;
|
||||
|
|
|
@ -31,15 +31,16 @@ class DragWalletsInfo extends StatelessWidget {
|
|||
return Container(
|
||||
color: yellowC,
|
||||
width: screenWidth,
|
||||
height: 80,
|
||||
height: 90,
|
||||
child: Center(
|
||||
child: Column(
|
||||
children: [
|
||||
const SizedBox(height: 2),
|
||||
Text('${'executeATransfer'.tr()}:'),
|
||||
MarkdownBody(data: '${'from'.tr()} **$fromName**'),
|
||||
MarkdownBody(data: '${'from'.tr(args: [''])} **$fromName**'),
|
||||
if (isSameAddress) Text('chooseATargetWallet'.tr()),
|
||||
if (!isSameAddress) MarkdownBody(data: 'Vers: **$toName**'),
|
||||
if (!isSameAddress)
|
||||
MarkdownBody(data: '${'to'.tr(args: [''])} **$toName**'),
|
||||
],
|
||||
)),
|
||||
);
|
||||
|
|
|
@ -19,82 +19,116 @@ class MainDrawer extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Drawer(
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: ListView(padding: EdgeInsets.zero, children: <Widget>[
|
||||
const DrawerHeader(
|
||||
decoration: BoxDecoration(
|
||||
color: orangeC,
|
||||
const listStyle = TextStyle(fontSize: 16);
|
||||
|
||||
return SizedBox(
|
||||
width: MediaQuery.of(context).size.width * 0.67,
|
||||
child: Drawer(
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: ListView(padding: EdgeInsets.zero, children: <Widget>[
|
||||
const DrawerHeader(
|
||||
decoration: BoxDecoration(
|
||||
color: orangeC,
|
||||
),
|
||||
child: Column(children: <Widget>[
|
||||
Image(
|
||||
image: AssetImage('assets/icon/gecko_final.png'),
|
||||
height: 130),
|
||||
]),
|
||||
),
|
||||
child: Column(children: <Widget>[
|
||||
SizedBox(height: 0),
|
||||
Image(
|
||||
image: AssetImage('assets/icon/gecko_final.png'),
|
||||
height: 130),
|
||||
]),
|
||||
),
|
||||
ListTile(
|
||||
key: keyParameters,
|
||||
title: Text('parameters'.tr()),
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) {
|
||||
return SettingsScreen();
|
||||
const SizedBox(height: 10),
|
||||
Opacity(
|
||||
opacity: 0.8,
|
||||
child: ListTile(
|
||||
key: keyParameters,
|
||||
leading: const Icon(Icons.settings),
|
||||
title: Text(
|
||||
'parameters'.tr(),
|
||||
style: listStyle,
|
||||
),
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) {
|
||||
return SettingsScreen();
|
||||
}),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 5),
|
||||
if (isWalletsExists)
|
||||
Opacity(
|
||||
opacity: 0.8,
|
||||
child: ListTile(
|
||||
key: keyContacts,
|
||||
leading: const Icon(Icons.contacts_rounded),
|
||||
title: Text(
|
||||
'contactsManagement'.tr(),
|
||||
style: listStyle,
|
||||
),
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) {
|
||||
return const ContactsScreen();
|
||||
}),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 5),
|
||||
if (kDebugMode)
|
||||
Opacity(
|
||||
opacity: 0.8,
|
||||
child: ListTile(
|
||||
key: keyDebugScreen,
|
||||
leading: const Icon(Icons.developer_mode_rounded),
|
||||
title: Text(
|
||||
'Debug screen'.tr(),
|
||||
style: listStyle,
|
||||
),
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) {
|
||||
return const DebugScreen();
|
||||
}),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
])),
|
||||
Align(
|
||||
alignment: FractionalOffset.bottomCenter,
|
||||
child: InkWell(
|
||||
key: keyCopyAddress,
|
||||
splashColor: orangeC,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(15),
|
||||
child: Opacity(
|
||||
opacity: 0.8,
|
||||
child: Text('Ğecko v$appVersion',
|
||||
style: const TextStyle(fontSize: 13)),
|
||||
),
|
||||
),
|
||||
onTap: () {
|
||||
Clipboard.setData(
|
||||
ClipboardData(text: 'Ğecko v$appVersion'));
|
||||
snackMessage(context,
|
||||
message:
|
||||
'Le numéro de version de Ğecko a été copié dans votre presse papier',
|
||||
duration: 4);
|
||||
}),
|
||||
);
|
||||
},
|
||||
),
|
||||
if (isWalletsExists)
|
||||
ListTile(
|
||||
key: keyContacts,
|
||||
title: Text('contactsManagement'.tr()),
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) {
|
||||
return const ContactsScreen();
|
||||
}),
|
||||
);
|
||||
},
|
||||
),
|
||||
if (kDebugMode)
|
||||
ListTile(
|
||||
key: keyDebugScreen,
|
||||
title: Text('Debug screen'.tr()),
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) {
|
||||
return const DebugScreen();
|
||||
}),
|
||||
);
|
||||
},
|
||||
),
|
||||
])),
|
||||
Align(
|
||||
alignment: FractionalOffset.bottomCenter,
|
||||
child: InkWell(
|
||||
key: keyCopyAddress,
|
||||
splashColor: orangeC,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(20),
|
||||
child: Text('Ğecko v$appVersion')),
|
||||
onTap: () {
|
||||
Clipboard.setData(ClipboardData(text: 'Ğecko v$appVersion'));
|
||||
snackMessage(context,
|
||||
message:
|
||||
'Le numéro de version de Ğecko a été copié dans votre presse papier',
|
||||
duration: 4);
|
||||
}),
|
||||
),
|
||||
const SizedBox(height: 20)
|
||||
],
|
||||
const SizedBox(height: 15)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ class HeaderProfile extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
const double avatarSize = 140;
|
||||
const double avatarSize = 130;
|
||||
final duniterIndexer = Provider.of<DuniterIndexer>(context, listen: false);
|
||||
final walletOptions =
|
||||
Provider.of<WalletOptionsProvider>(context, listen: false);
|
||||
|
@ -37,7 +37,7 @@ class HeaderProfile extends StatelessWidget {
|
|||
Consumer<SubstrateSdk>(builder: (context, sub, _) {
|
||||
bool isAccountExist = walletOptions.balanceCache[address] != 0;
|
||||
return Container(
|
||||
height: 185,
|
||||
height: 170,
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topCenter,
|
||||
|
@ -50,13 +50,13 @@ class HeaderProfile extends StatelessWidget {
|
|||
));
|
||||
}),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 30, right: 30),
|
||||
padding: const EdgeInsets.only(left: 20, right: 20),
|
||||
child: Row(children: <Widget>[
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Container(
|
||||
height: 10,
|
||||
height: 5,
|
||||
color: yellowC,
|
||||
),
|
||||
Row(children: [
|
||||
|
@ -69,14 +69,15 @@ class HeaderProfile extends StatelessWidget {
|
|||
child: Text(
|
||||
getShortPubkey(address),
|
||||
style: const TextStyle(
|
||||
fontSize: 30,
|
||||
fontWeight: FontWeight.w800,
|
||||
fontSize: 27,
|
||||
fontFamily: 'Monospace',
|
||||
fontWeight: FontWeight.w900,
|
||||
),
|
||||
),
|
||||
),
|
||||
]),
|
||||
const SizedBox(height: 18),
|
||||
Balance(address: address, size: 25),
|
||||
const SizedBox(height: 15),
|
||||
Balance(address: address, size: 23),
|
||||
const SizedBox(height: 5),
|
||||
InkWell(
|
||||
onTap: () => sub.certsCounterCache[address] != null
|
||||
|
@ -106,7 +107,9 @@ class HeaderProfile extends StatelessWidget {
|
|||
),
|
||||
]),
|
||||
const Spacer(),
|
||||
// const SizedBox(width: 20),
|
||||
Column(children: <Widget>[
|
||||
const SizedBox(height: 15),
|
||||
CesiumAvatar(address: address, size: avatarSize),
|
||||
]),
|
||||
]),
|
||||
|
|
|
@ -24,7 +24,7 @@ class HistoryView extends StatelessWidget {
|
|||
final sub = Provider.of<SubstrateSdk>(homeContext, listen: false);
|
||||
|
||||
int keyID = 0;
|
||||
const double avatarSize = 200;
|
||||
const double avatarSize = 50;
|
||||
bool isMigrationPassed = false;
|
||||
List<String> pastDelimiters = [];
|
||||
|
||||
|
@ -51,21 +51,19 @@ class HistoryView extends StatelessWidget {
|
|||
return Column(children: <Widget>[
|
||||
if (isMigrationTime)
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 30),
|
||||
padding: const EdgeInsets.symmetric(vertical: 25),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
const Image(
|
||||
image: AssetImage('assets/party.png'), height: 40),
|
||||
const SizedBox(width: 40),
|
||||
Text(
|
||||
'blockchainStart'.tr(),
|
||||
style: const TextStyle(
|
||||
fontSize: 25,
|
||||
fontSize: 23,
|
||||
color: Colors.blueAccent,
|
||||
fontWeight: FontWeight.w500),
|
||||
),
|
||||
const SizedBox(width: 40),
|
||||
const Image(
|
||||
image: AssetImage('assets/party.png'), height: 40),
|
||||
],
|
||||
|
@ -76,7 +74,7 @@ class HistoryView extends StatelessWidget {
|
|||
!(pastDelimiters[pastDelimiters.length - 2] ==
|
||||
answer['dateDelimiter']))
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 30),
|
||||
padding: const EdgeInsets.symmetric(vertical: 20),
|
||||
child: Text(
|
||||
answer['dateDelimiter'],
|
||||
style: const TextStyle(
|
||||
|
@ -117,30 +115,29 @@ class HistoryView extends StatelessWidget {
|
|||
}),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
const Icon(
|
||||
Icon(
|
||||
Icons.account_circle,
|
||||
size: 40,
|
||||
color: Colors.blueAccent,
|
||||
color: Colors.green[700],
|
||||
),
|
||||
const SizedBox(width: 40),
|
||||
Column(children: [
|
||||
Text(
|
||||
'Identité migré:'.tr(),
|
||||
style: const TextStyle(
|
||||
fontSize: 25,
|
||||
color: Colors.blueAccent,
|
||||
style: TextStyle(
|
||||
fontSize: 23,
|
||||
color: Colors.green[700],
|
||||
fontWeight: FontWeight.w500),
|
||||
),
|
||||
Text(
|
||||
'Ancienne adresse: ${getShortPubkey(sub.oldOwnerKeys[address]![0])}')
|
||||
Text('from'.tr(args: [
|
||||
' ${getShortPubkey(sub.oldOwnerKeys[address]![0])}'
|
||||
])),
|
||||
]),
|
||||
const SizedBox(width: 40),
|
||||
const Icon(
|
||||
Icon(
|
||||
Icons.account_circle,
|
||||
size: 40,
|
||||
color: Colors.blueAccent,
|
||||
color: Colors.green[700],
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
|
@ -117,7 +117,7 @@ void paymentPopup(BuildContext context, String toAddress, String? username) {
|
|||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(
|
||||
top: 24, bottom: 0, left: 24, right: 24),
|
||||
top: 15, bottom: 0, left: 17, right: 17),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
|
@ -128,11 +128,11 @@ void paymentPopup(BuildContext context, String toAddress, String? username) {
|
|||
Text(
|
||||
'executeATransfer'.tr(),
|
||||
style: const TextStyle(
|
||||
fontSize: 26, fontWeight: FontWeight.w700),
|
||||
fontSize: 24, fontWeight: FontWeight.w700),
|
||||
),
|
||||
IconButton(
|
||||
key: keyPopButton,
|
||||
iconSize: 40,
|
||||
iconSize: 35,
|
||||
icon: const Icon(Icons.cancel_outlined),
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
|
@ -141,7 +141,7 @@ void paymentPopup(BuildContext context, String toAddress, String? username) {
|
|||
]),
|
||||
const SizedBox(height: 5),
|
||||
Text(
|
||||
'from'.tr(),
|
||||
'from'.tr(args: ['']),
|
||||
style: TextStyle(
|
||||
fontSize: 19,
|
||||
fontWeight: FontWeight.w500,
|
||||
|
@ -149,31 +149,62 @@ void paymentPopup(BuildContext context, String toAddress, String? username) {
|
|||
),
|
||||
const SizedBox(height: 5),
|
||||
Consumer<SubstrateSdk>(builder: (context, sub, _) {
|
||||
return DropdownButton(
|
||||
dropdownColor: const Color(0xffffeed1),
|
||||
elevation: 12,
|
||||
key: keyDropdownWallets,
|
||||
value: defaultWallet,
|
||||
menuMaxHeight: 300,
|
||||
onTap: () {
|
||||
FocusScope.of(context).requestFocus(amountFocus);
|
||||
},
|
||||
selectedItemBuilder: (_) {
|
||||
return myWalletProvider.listWallets
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
color: Colors.blueAccent.shade200, width: 2),
|
||||
borderRadius:
|
||||
const BorderRadius.all(Radius.circular(10.0)),
|
||||
),
|
||||
padding: const EdgeInsets.all(0),
|
||||
child: DropdownButton(
|
||||
dropdownColor: const Color(0xffffeed1),
|
||||
elevation: 12,
|
||||
key: keyDropdownWallets,
|
||||
value: defaultWallet,
|
||||
menuMaxHeight: 300,
|
||||
onTap: () {
|
||||
FocusScope.of(context)
|
||||
.requestFocus(amountFocus);
|
||||
},
|
||||
selectedItemBuilder: (_) {
|
||||
return myWalletProvider.listWallets
|
||||
.map((WalletData wallet) {
|
||||
return Container(
|
||||
width: 330,
|
||||
padding: const EdgeInsets.all(8),
|
||||
child: Visibility(
|
||||
visible: wallet.address ==
|
||||
defaultWallet.address,
|
||||
child: Row(children: [
|
||||
NameByAddress(
|
||||
wallet: wallet,
|
||||
fontStyle: FontStyle.normal),
|
||||
const Spacer(),
|
||||
Balance(
|
||||
address: wallet.address, size: 20),
|
||||
]),
|
||||
),
|
||||
);
|
||||
}).toList();
|
||||
},
|
||||
onChanged: (WalletData? newSelectedWallet) async {
|
||||
defaultWallet = newSelectedWallet!;
|
||||
await sub.setCurrentWallet(newSelectedWallet);
|
||||
sub.reload();
|
||||
amountFocus.requestFocus();
|
||||
setState(() {});
|
||||
},
|
||||
items: myWalletProvider.listWallets
|
||||
.map((WalletData wallet) {
|
||||
return Container(
|
||||
width: 408,
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
color: Colors.blueAccent.shade200,
|
||||
width: 2),
|
||||
borderRadius: const BorderRadius.all(
|
||||
Radius.circular(10.0)),
|
||||
),
|
||||
padding: const EdgeInsets.all(7),
|
||||
child: Visibility(
|
||||
visible:
|
||||
wallet.address == defaultWallet.address,
|
||||
return DropdownMenuItem(
|
||||
value: wallet,
|
||||
key: keySelectThisWallet(wallet.address),
|
||||
child: Container(
|
||||
color: const Color(0xffffeed1),
|
||||
width: 332,
|
||||
height: 80,
|
||||
padding: const EdgeInsets.all(7),
|
||||
child: Row(children: [
|
||||
NameByAddress(
|
||||
wallet: wallet,
|
||||
|
@ -184,58 +215,26 @@ void paymentPopup(BuildContext context, String toAddress, String? username) {
|
|||
]),
|
||||
),
|
||||
);
|
||||
}).toList();
|
||||
},
|
||||
onChanged: (WalletData? newSelectedWallet) async {
|
||||
defaultWallet = newSelectedWallet!;
|
||||
await sub.setCurrentWallet(newSelectedWallet);
|
||||
sub.reload();
|
||||
amountFocus.requestFocus();
|
||||
setState(() {});
|
||||
},
|
||||
items: myWalletProvider.listWallets
|
||||
.map((WalletData wallet) {
|
||||
return DropdownMenuItem(
|
||||
value: wallet,
|
||||
key: keySelectThisWallet(wallet.address),
|
||||
child: Container(
|
||||
color: const Color(0xffffeed1),
|
||||
width: 408,
|
||||
height: 80,
|
||||
padding: const EdgeInsets.all(7),
|
||||
child: Row(children: [
|
||||
NameByAddress(
|
||||
wallet: wallet,
|
||||
fontStyle: FontStyle.normal),
|
||||
const Spacer(),
|
||||
Balance(address: wallet.address, size: 20),
|
||||
]),
|
||||
),
|
||||
);
|
||||
}).toList());
|
||||
}).toList()),
|
||||
);
|
||||
}),
|
||||
const SizedBox(height: 12),
|
||||
Row(
|
||||
children: [
|
||||
Text(
|
||||
'to'.tr(),
|
||||
'to'.tr(args: ['']),
|
||||
style: TextStyle(
|
||||
fontSize: 19,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Colors.grey[600]),
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Column(
|
||||
children: [
|
||||
const SizedBox(height: 2),
|
||||
Text(
|
||||
username ?? getShortPubkey(toAddress),
|
||||
style: const TextStyle(
|
||||
fontSize: 21,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
],
|
||||
Text(
|
||||
username ?? getShortPubkey(toAddress),
|
||||
style: const TextStyle(
|
||||
fontSize: 21,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
@ -320,10 +319,10 @@ void paymentPopup(BuildContext context, String toAddress, String? username) {
|
|||
color: Colors.grey[500]!, width: 2),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
contentPadding: const EdgeInsets.all(15),
|
||||
contentPadding: const EdgeInsets.all(10),
|
||||
),
|
||||
style: const TextStyle(
|
||||
fontSize: 33,
|
||||
fontSize: 30,
|
||||
color: Colors.black,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
|
|
|
@ -80,57 +80,54 @@ class SearchIdentityQuery extends StatelessWidget {
|
|||
return Expanded(
|
||||
child: ListView(children: <Widget>[
|
||||
for (Map profile in identities)
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 5),
|
||||
child: ListTile(
|
||||
key: keySearchResult(profile['pubkey']),
|
||||
horizontalTitleGap: 40,
|
||||
contentPadding: const EdgeInsets.all(5),
|
||||
leading: CesiumAvatar(
|
||||
address: profile['pubkey'], size: avatarSize),
|
||||
title: Row(children: <Widget>[
|
||||
Text(getShortPubkey(profile['pubkey']),
|
||||
style: const TextStyle(
|
||||
fontSize: 18,
|
||||
fontFamily: 'Monospace',
|
||||
fontWeight: FontWeight.w500),
|
||||
textAlign: TextAlign.center),
|
||||
]),
|
||||
trailing: SizedBox(
|
||||
width: 110,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Balance(
|
||||
address: profile['pubkey'], size: 16),
|
||||
]),
|
||||
]),
|
||||
),
|
||||
subtitle: Row(children: <Widget>[
|
||||
Text(profile['name'] ?? '',
|
||||
style: const TextStyle(
|
||||
fontSize: 18, fontWeight: FontWeight.w500),
|
||||
textAlign: TextAlign.center),
|
||||
]),
|
||||
dense: false,
|
||||
isThreeLine: false,
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) {
|
||||
walletsProfiles.address = profile['pubkey'];
|
||||
return WalletViewScreen(
|
||||
address: profile['pubkey'],
|
||||
username: profile['name'],
|
||||
);
|
||||
}),
|
||||
);
|
||||
}),
|
||||
),
|
||||
ListTile(
|
||||
key: keySearchResult(profile['pubkey']),
|
||||
horizontalTitleGap: 10,
|
||||
contentPadding: const EdgeInsets.only(right: 2),
|
||||
leading: CesiumAvatar(
|
||||
address: profile['pubkey'], size: avatarSize),
|
||||
title: Row(children: <Widget>[
|
||||
Text(getShortPubkey(profile['pubkey']),
|
||||
style: const TextStyle(
|
||||
fontSize: 18,
|
||||
fontFamily: 'Monospace',
|
||||
fontWeight: FontWeight.w500),
|
||||
textAlign: TextAlign.center),
|
||||
]),
|
||||
trailing: SizedBox(
|
||||
width: 120,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Balance(
|
||||
address: profile['pubkey'], size: 16),
|
||||
]),
|
||||
]),
|
||||
),
|
||||
subtitle: Row(children: <Widget>[
|
||||
Text(profile['name'] ?? '',
|
||||
style: const TextStyle(
|
||||
fontSize: 18, fontWeight: FontWeight.w500),
|
||||
textAlign: TextAlign.center),
|
||||
]),
|
||||
dense: false,
|
||||
isThreeLine: false,
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) {
|
||||
walletsProfiles.address = profile['pubkey'];
|
||||
return WalletViewScreen(
|
||||
address: profile['pubkey'],
|
||||
username: profile['name'],
|
||||
);
|
||||
}),
|
||||
);
|
||||
}),
|
||||
]),
|
||||
);
|
||||
}),
|
||||
|
|
|
@ -41,7 +41,7 @@ class SearchResult extends StatelessWidget {
|
|||
return Expanded(
|
||||
child: ListView(children: <Widget>[
|
||||
for (G1WalletsList g1Wallet in snapshot.data ?? [])
|
||||
resultTile(g1Wallet, context),
|
||||
resultTileAddressSearch(g1Wallet, context),
|
||||
]),
|
||||
);
|
||||
}
|
||||
|
@ -58,53 +58,50 @@ class SearchResult extends StatelessWidget {
|
|||
);
|
||||
}
|
||||
|
||||
Padding resultTile(G1WalletsList g1Wallet, BuildContext context) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 5),
|
||||
child: ListTile(
|
||||
key: keySearchResult(g1Wallet.address),
|
||||
horizontalTitleGap: 40,
|
||||
contentPadding: const EdgeInsets.all(5),
|
||||
leading: CesiumAvatar(address: g1Wallet.address, size: avatarSize),
|
||||
title: Row(children: <Widget>[
|
||||
Text(getShortPubkey(g1Wallet.address),
|
||||
style: const TextStyle(
|
||||
fontSize: 18,
|
||||
fontFamily: 'Monospace',
|
||||
fontWeight: FontWeight.w500),
|
||||
textAlign: TextAlign.center),
|
||||
]),
|
||||
trailing:
|
||||
Widget resultTileAddressSearch(G1WalletsList g1Wallet, BuildContext context) {
|
||||
return ListTile(
|
||||
key: keySearchResult(g1Wallet.address),
|
||||
horizontalTitleGap: 10,
|
||||
contentPadding: const EdgeInsets.all(5),
|
||||
leading: CesiumAvatar(address: g1Wallet.address, size: avatarSize),
|
||||
title: Row(children: <Widget>[
|
||||
Text(getShortPubkey(g1Wallet.address),
|
||||
style: const TextStyle(
|
||||
fontSize: 18,
|
||||
fontFamily: 'Monospace',
|
||||
fontWeight: FontWeight.w500),
|
||||
textAlign: TextAlign.center),
|
||||
]),
|
||||
trailing:
|
||||
Column(mainAxisAlignment: MainAxisAlignment.center, children: [
|
||||
SizedBox(
|
||||
width: 110,
|
||||
child: Row(mainAxisAlignment: MainAxisAlignment.end, children: [
|
||||
Column(mainAxisAlignment: MainAxisAlignment.center, children: [
|
||||
SizedBox(
|
||||
width: 110,
|
||||
child: Row(mainAxisAlignment: MainAxisAlignment.end, children: [
|
||||
Column(mainAxisAlignment: MainAxisAlignment.center, children: [
|
||||
Balance(address: g1Wallet.address, size: 16),
|
||||
]),
|
||||
Balance(address: g1Wallet.address, size: 16),
|
||||
]),
|
||||
),
|
||||
]),
|
||||
subtitle: Row(children: <Widget>[
|
||||
NameByAddress(
|
||||
wallet: WalletData(address: g1Wallet.address),
|
||||
),
|
||||
]),
|
||||
dense: false,
|
||||
isThreeLine: false,
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) {
|
||||
walletsProfilesClass.address = g1Wallet.address;
|
||||
return WalletViewScreen(
|
||||
address: g1Wallet.address,
|
||||
username: g1Wallet.username,
|
||||
);
|
||||
}),
|
||||
);
|
||||
}),
|
||||
);
|
||||
]),
|
||||
),
|
||||
]),
|
||||
subtitle: Row(children: <Widget>[
|
||||
NameByAddress(
|
||||
wallet: WalletData(address: g1Wallet.address),
|
||||
),
|
||||
]),
|
||||
dense: false,
|
||||
isThreeLine: false,
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) {
|
||||
walletsProfilesClass.address = g1Wallet.address;
|
||||
return WalletViewScreen(
|
||||
address: g1Wallet.address,
|
||||
username: g1Wallet.username,
|
||||
);
|
||||
}),
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ class TransactionTile extends StatelessWidget {
|
|||
child: ListTile(
|
||||
key: keyTransaction(newKey),
|
||||
contentPadding:
|
||||
const EdgeInsets.only(left: 20, right: 30, top: 15, bottom: 15),
|
||||
const EdgeInsets.symmetric(horizontal: 15, vertical: 5),
|
||||
leading: ClipOval(
|
||||
child: defaultAvatar(avatarSize),
|
||||
),
|
||||
|
|
|
@ -21,15 +21,14 @@ class UdUnitDisplay extends StatelessWidget {
|
|||
children: [
|
||||
Text(
|
||||
'ud'.tr(args: ['']),
|
||||
style: TextStyle(
|
||||
fontSize: isTall ? size : size * 0.9, color: color),
|
||||
style: TextStyle(fontSize: size, color: color),
|
||||
),
|
||||
Column(
|
||||
children: [
|
||||
Text(
|
||||
currencyName,
|
||||
style: TextStyle(
|
||||
fontSize: (isTall ? size : size * 0.9) * 0.7,
|
||||
fontSize: size * 0.7,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: color),
|
||||
),
|
||||
|
@ -38,8 +37,6 @@ class UdUnitDisplay extends StatelessWidget {
|
|||
)
|
||||
],
|
||||
)
|
||||
: Text(currencyName,
|
||||
style:
|
||||
TextStyle(fontSize: isTall ? size : size * 0.9, color: color));
|
||||
: Text(currencyName, style: TextStyle(fontSize: size, color: color));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:gecko/globals.dart';
|
||||
import 'package:gecko/models/wallet_data.dart';
|
||||
import 'package:truncate/truncate.dart';
|
||||
|
||||
|
@ -23,7 +22,7 @@ class WalletName extends StatelessWidget {
|
|||
truncate(wallet.name ?? '', 20),
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: isTall ? newSize : newSize * 0.9,
|
||||
fontSize: newSize,
|
||||
color: color,
|
||||
fontWeight: FontWeight.w400,
|
||||
fontStyle: FontStyle.italic,
|
||||
|
|
|
@ -24,7 +24,7 @@ class WalletTile extends StatelessWidget {
|
|||
final defaultWallet = myWalletProvider.getDefaultWallet();
|
||||
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(16),
|
||||
padding: const EdgeInsets.all(12),
|
||||
child: GestureDetector(
|
||||
key: keyOpenWallet(repository.address),
|
||||
onTap: () {
|
||||
|
@ -91,12 +91,12 @@ class WalletTile extends StatelessWidget {
|
|||
children: [
|
||||
Column(
|
||||
children: [
|
||||
const SizedBox(height: 7),
|
||||
const SizedBox(height: 3),
|
||||
Opacity(
|
||||
opacity: 0.7,
|
||||
child: NameByAddress(
|
||||
wallet: repository,
|
||||
size: 20,
|
||||
size: 19,
|
||||
color:
|
||||
defaultWallet.address == repository.address
|
||||
? Colors.white
|
||||
|
@ -134,8 +134,7 @@ class BalanceBuilder extends StatelessWidget {
|
|||
width: double.infinity,
|
||||
color: isDefault ? orangeC : yellowC,
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsets.only(left: 5, right: 5, top: 38, bottom: 10),
|
||||
padding: const EdgeInsets.only(left: 5, right: 5, top: 30, bottom: 7),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
|
@ -143,7 +142,7 @@ class BalanceBuilder extends StatelessWidget {
|
|||
opacity: 0.7,
|
||||
child: Balance(
|
||||
address: address,
|
||||
size: 16,
|
||||
size: 15,
|
||||
color: isDefault ? Colors.white : Colors.black,
|
||||
loadingColor: isDefault ? yellowC : orangeC),
|
||||
)
|
||||
|
|
|
@ -22,7 +22,7 @@ class WalletTileMembre extends StatelessWidget {
|
|||
final myWalletProvider = Provider.of<MyWalletsProvider>(context);
|
||||
final defaultWallet = myWalletProvider.getDefaultWallet();
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 70, vertical: 20),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 60, vertical: 16),
|
||||
child: GestureDetector(
|
||||
key: keyOpenWallet(repository.address),
|
||||
onTap: () {
|
||||
|
@ -37,7 +37,7 @@ class WalletTileMembre extends StatelessWidget {
|
|||
},
|
||||
child: SizedBox(
|
||||
key: repository.number == 1 ? keyDragAndDrop : const Key('nothing'),
|
||||
height: 240,
|
||||
height: 200,
|
||||
child: ClipOvalShadow(
|
||||
shadow: const Shadow(
|
||||
color: Colors.transparent,
|
||||
|
@ -84,12 +84,12 @@ class WalletTileMembre extends StatelessWidget {
|
|||
),
|
||||
),
|
||||
Positioned(
|
||||
left: 25,
|
||||
top: 25,
|
||||
left: 20,
|
||||
top: 20,
|
||||
child: Opacity(
|
||||
opacity: 0.6,
|
||||
child: Image.asset('assets/medal.png',
|
||||
color: Colors.black, height: 40),
|
||||
color: Colors.black, height: 35),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
@ -101,7 +101,7 @@ class WalletTileMembre extends StatelessWidget {
|
|||
isDefault: repository.address == defaultWallet.address),
|
||||
Row(mainAxisAlignment: MainAxisAlignment.center, children: [
|
||||
Column(children: [
|
||||
const SizedBox(height: 10),
|
||||
const SizedBox(height: 7),
|
||||
Opacity(
|
||||
opacity: 0.7,
|
||||
child: NameByAddress(
|
||||
|
@ -116,7 +116,7 @@ class WalletTileMembre extends StatelessWidget {
|
|||
]),
|
||||
]),
|
||||
Positioned(
|
||||
right: 25,
|
||||
right: 12,
|
||||
top: 25,
|
||||
child: Opacity(
|
||||
opacity: 0.7,
|
||||
|
@ -125,7 +125,7 @@ class WalletTileMembre extends StatelessWidget {
|
|||
color: defaultWallet.address == repository.address
|
||||
? Colors.white
|
||||
: Colors.black,
|
||||
size: 18),
|
||||
size: 16),
|
||||
),
|
||||
),
|
||||
]),
|
||||
|
@ -155,7 +155,7 @@ class BalanceBuilder extends StatelessWidget {
|
|||
color: isDefault ? orangeC : yellowC,
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsets.only(left: 5, right: 5, top: 45, bottom: 15),
|
||||
const EdgeInsets.only(left: 5, right: 5, top: 37, bottom: 12),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
|
|
|
@ -1298,10 +1298,10 @@ packages:
|
|||
dependency: "direct main"
|
||||
description:
|
||||
name: responsive_framework
|
||||
sha256: e083346029b008335b008274c4d3fac5b9e0ca8796f201ed20884f579101d584
|
||||
sha256: "23aa7be5d5136922df708f6ddccb5ec4e0eb8bc576c3f105f5093f31d6b68e50"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.2.0"
|
||||
version: "1.1.1"
|
||||
rxdart:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
|
@ -5,7 +5,7 @@ description: Pay with G1.
|
|||
# pub.dev using `pub publish`. This is preferred for private packages.
|
||||
publish_to: "none" # Remove this line if you wish to publish to pub.dev
|
||||
|
||||
version: 0.1.2+59
|
||||
version: 0.1.3+60
|
||||
|
||||
environment:
|
||||
sdk: ">=2.12.0 <3.0.0"
|
||||
|
@ -31,7 +31,7 @@ dependencies:
|
|||
git:
|
||||
url: https://github.com/insinfo/qr.flutter.git
|
||||
ref: master
|
||||
responsive_framework: 0.2.0
|
||||
responsive_framework: ^1.1.1
|
||||
sentry_flutter: ^7.4.1
|
||||
truncate: ^3.0.1
|
||||
unorm_dart: ^0.3.0
|
||||
|
|