2022-09-12 07:26:13 +02:00
|
|
|
// ignore_for_file: use_build_context_synchronously
|
|
|
|
|
2022-06-17 01:13:14 +02:00
|
|
|
import 'package:easy_localization/easy_localization.dart';
|
2022-09-12 07:26:13 +02:00
|
|
|
import 'package:flutter_markdown/flutter_markdown.dart';
|
2021-03-11 07:08:45 +01:00
|
|
|
import 'package:gecko/globals.dart';
|
2021-11-14 19:21:20 +01:00
|
|
|
import 'package:gecko/models/chest_data.dart';
|
2022-08-23 00:25:16 +02:00
|
|
|
import 'package:gecko/models/widgets_keys.dart';
|
2023-11-19 13:41:24 +01:00
|
|
|
import 'package:gecko/providers/duniter_indexer.dart';
|
2021-12-23 15:13:58 +01:00
|
|
|
import 'package:gecko/providers/my_wallets.dart';
|
2021-11-14 19:21:20 +01:00
|
|
|
import 'package:gecko/models/wallet_data.dart';
|
2021-01-13 00:00:11 +01:00
|
|
|
import 'package:flutter/material.dart';
|
2022-06-12 19:20:15 +02:00
|
|
|
import 'package:gecko/providers/substrate_sdk.dart';
|
2021-11-18 04:41:45 +01:00
|
|
|
import 'package:gecko/screens/myWallets/chest_options.dart';
|
2022-08-18 01:31:47 +02:00
|
|
|
import 'package:gecko/screens/myWallets/import_g1_v1.dart';
|
2022-05-31 18:23:56 +02:00
|
|
|
import 'package:gecko/screens/myWallets/unlocking_wallet.dart';
|
2022-12-07 23:10:28 +01:00
|
|
|
import 'package:gecko/widgets/bottom_app_bar.dart';
|
2022-12-10 08:16:38 +01:00
|
|
|
import 'package:gecko/widgets/commons/offline_info.dart';
|
2023-11-26 17:14:40 +01:00
|
|
|
import 'package:gecko/widgets/drag_tule_action.dart';
|
2023-11-19 13:41:24 +01:00
|
|
|
import 'package:gecko/widgets/wallet_tile.dart';
|
2023-11-19 21:55:10 +01:00
|
|
|
import 'package:gecko/widgets/wallet_tile_membre.dart';
|
2021-01-28 15:10:09 +01:00
|
|
|
import 'package:provider/provider.dart';
|
2022-12-02 10:23:21 +01:00
|
|
|
import 'package:flutter_svg/flutter_svg.dart';
|
2023-04-09 20:17:17 +02:00
|
|
|
import 'package:tutorial_coach_mark/tutorial_coach_mark.dart';
|
2021-01-13 00:00:11 +01:00
|
|
|
|
2022-12-23 01:59:21 +01:00
|
|
|
class WalletsHome extends StatefulWidget {
|
2021-12-23 12:36:09 +01:00
|
|
|
const WalletsHome({Key? key}) : super(key: key);
|
2021-11-14 19:21:20 +01:00
|
|
|
|
2022-12-23 01:59:21 +01:00
|
|
|
@override
|
|
|
|
State<WalletsHome> createState() => _WalletsHomeState();
|
|
|
|
}
|
|
|
|
|
|
|
|
class _WalletsHomeState extends State<WalletsHome> {
|
|
|
|
@override
|
|
|
|
void initState() {
|
|
|
|
super.initState();
|
|
|
|
}
|
|
|
|
|
2021-01-13 00:00:11 +01:00
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
2023-11-24 18:21:53 +01:00
|
|
|
final myWalletProvider =
|
|
|
|
Provider.of<MyWalletsProvider>(context, listen: false);
|
2021-03-19 06:33:48 +01:00
|
|
|
|
2022-12-02 10:23:21 +01:00
|
|
|
final currentChestNumber = myWalletProvider.getCurrentChest();
|
2022-08-06 02:22:41 +02:00
|
|
|
final ChestData currentChest = chestBox.get(currentChestNumber)!;
|
2021-01-26 21:00:26 +01:00
|
|
|
|
2021-04-03 00:07:03 +02:00
|
|
|
return WillPopScope(
|
2021-11-09 04:22:04 +01:00
|
|
|
onWillPop: () {
|
|
|
|
Navigator.popUntil(
|
|
|
|
context,
|
|
|
|
ModalRoute.withName('/'),
|
|
|
|
);
|
|
|
|
return Future<bool>.value(true);
|
|
|
|
},
|
|
|
|
child: Scaffold(
|
2022-05-29 00:00:57 +02:00
|
|
|
backgroundColor: backgroundColor,
|
2021-11-09 04:22:04 +01:00
|
|
|
appBar: AppBar(
|
2022-05-28 00:04:37 +02:00
|
|
|
elevation: 1,
|
2021-11-15 04:16:25 +01:00
|
|
|
toolbarHeight: 60 * ratio,
|
2021-11-09 04:22:04 +01:00
|
|
|
leading: IconButton(
|
2021-11-14 19:21:20 +01:00
|
|
|
icon: const Icon(Icons.arrow_back, color: Colors.black),
|
2021-11-09 04:22:04 +01:00
|
|
|
onPressed: () {
|
|
|
|
Navigator.popUntil(
|
|
|
|
context,
|
|
|
|
ModalRoute.withName('/'),
|
|
|
|
);
|
|
|
|
}),
|
2022-12-08 09:51:08 +01:00
|
|
|
title: Row(
|
|
|
|
children: [
|
|
|
|
Image.asset(
|
|
|
|
'assets/chests/${currentChest.imageName}',
|
2022-12-09 03:36:46 +01:00
|
|
|
height: 32,
|
2022-12-08 09:51:08 +01:00
|
|
|
),
|
|
|
|
const SizedBox(width: 17),
|
|
|
|
Text(currentChest.name!,
|
|
|
|
style: TextStyle(color: Colors.grey[850])),
|
|
|
|
],
|
|
|
|
),
|
2021-11-14 19:21:20 +01:00
|
|
|
backgroundColor: const Color(0xffFFD58D),
|
2021-11-09 04:22:04 +01:00
|
|
|
),
|
2023-11-26 17:14:40 +01:00
|
|
|
bottomNavigationBar:
|
|
|
|
Consumer<MyWalletsProvider>(builder: (context, _, __) {
|
|
|
|
return myWalletProvider.lastFlyBy == ''
|
|
|
|
? const GeckoBottomAppBar(
|
|
|
|
actualRoute: 'safeHome',
|
|
|
|
)
|
|
|
|
: dragInfo(context);
|
|
|
|
}),
|
2023-11-24 02:17:33 +01:00
|
|
|
body: FutureBuilder(
|
|
|
|
future: myWalletProvider.readAllWallets(currentChestNumber),
|
|
|
|
builder: (context, snapshot) {
|
|
|
|
if (snapshot.connectionState != ConnectionState.done ||
|
|
|
|
snapshot.hasError) {
|
|
|
|
return const Center(
|
|
|
|
child: SizedBox(
|
|
|
|
height: 50,
|
|
|
|
width: 50,
|
|
|
|
child: CircularProgressIndicator(
|
|
|
|
color: orangeC,
|
|
|
|
strokeWidth: 3,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
return SafeArea(
|
|
|
|
child: Stack(children: [
|
|
|
|
myWalletsTiles(context, currentChestNumber),
|
|
|
|
const OfflineInfo(),
|
|
|
|
]),
|
|
|
|
);
|
|
|
|
}),
|
2021-11-09 04:22:04 +01:00
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2022-09-12 07:26:13 +02:00
|
|
|
Widget dragInfo(BuildContext context) {
|
|
|
|
final myWalletProvider =
|
|
|
|
Provider.of<MyWalletsProvider>(context, listen: false);
|
2023-11-19 13:41:24 +01:00
|
|
|
final duniterIndexer = Provider.of<DuniterIndexer>(context, listen: false);
|
2022-09-12 07:26:13 +02:00
|
|
|
|
|
|
|
final walletDataFrom =
|
|
|
|
myWalletProvider.getWalletDataByAddress(myWalletProvider.dragAddress);
|
|
|
|
final walletDataTo =
|
|
|
|
myWalletProvider.getWalletDataByAddress(myWalletProvider.lastFlyBy);
|
|
|
|
|
|
|
|
final bool isSameAddress =
|
|
|
|
myWalletProvider.dragAddress == myWalletProvider.lastFlyBy;
|
|
|
|
|
2022-12-02 10:23:21 +01:00
|
|
|
final screenWidth = MediaQuery.of(homeContext).size.width;
|
2023-11-19 13:41:24 +01:00
|
|
|
|
|
|
|
final fromName =
|
|
|
|
duniterIndexer.walletNameIndexer[walletDataFrom!.address] ??
|
|
|
|
walletDataFrom.name;
|
|
|
|
|
|
|
|
final toName = duniterIndexer.walletNameIndexer[walletDataTo!.address] ??
|
|
|
|
walletDataTo.name;
|
|
|
|
|
2022-09-12 07:26:13 +02:00
|
|
|
return Container(
|
|
|
|
color: yellowC,
|
|
|
|
width: screenWidth,
|
|
|
|
height: 80,
|
|
|
|
child: Center(
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
const SizedBox(height: 5),
|
|
|
|
Text('${'executeATransfer'.tr()}:'),
|
2023-11-19 13:41:24 +01:00
|
|
|
MarkdownBody(data: '${'from'.tr()} **$fromName**'),
|
2022-09-12 07:26:13 +02:00
|
|
|
if (isSameAddress) Text('chooseATargetWallet'.tr()),
|
2023-11-19 13:41:24 +01:00
|
|
|
if (!isSameAddress) MarkdownBody(data: 'Vers: **$toName**'),
|
2022-09-12 07:26:13 +02:00
|
|
|
],
|
|
|
|
)),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2022-11-30 05:42:08 +01:00
|
|
|
Widget chestOptions(BuildContext context, final myWalletProvider) {
|
2021-11-09 04:22:04 +01:00
|
|
|
return Column(children: [
|
2021-11-14 19:21:20 +01:00
|
|
|
const SizedBox(height: 50),
|
2021-11-09 04:22:04 +01:00
|
|
|
SizedBox(
|
2022-08-18 01:31:47 +02:00
|
|
|
height: 80,
|
2021-12-23 21:44:24 +01:00
|
|
|
width: 420,
|
2021-11-11 14:45:12 +01:00
|
|
|
child: ElevatedButton.icon(
|
|
|
|
icon: Image.asset(
|
|
|
|
'assets/chests/config.png',
|
2021-12-23 21:44:24 +01:00
|
|
|
height: 60,
|
2021-11-11 14:45:12 +01:00
|
|
|
),
|
|
|
|
style: ElevatedButton.styleFrom(
|
2022-09-05 08:12:24 +02:00
|
|
|
foregroundColor: Colors.black, elevation: 2,
|
|
|
|
backgroundColor: floattingYellow, // foreground
|
2021-11-11 14:45:12 +01:00
|
|
|
),
|
2021-11-18 04:41:45 +01:00
|
|
|
onPressed: () => Navigator.push(
|
|
|
|
context,
|
|
|
|
MaterialPageRoute(builder: (context) {
|
2022-08-06 02:22:41 +02:00
|
|
|
return ChestOptions(walletProvider: myWalletProvider);
|
2021-11-18 04:41:45 +01:00
|
|
|
}),
|
|
|
|
),
|
2022-06-17 01:13:14 +02:00
|
|
|
label: Text(
|
2022-08-06 02:22:41 +02:00
|
|
|
" ${"manageChest".tr()}",
|
2022-06-17 01:13:14 +02:00
|
|
|
style: const TextStyle(
|
2021-12-23 21:44:24 +01:00
|
|
|
fontSize: 22,
|
2021-11-11 14:45:12 +01:00
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
color: Color(0xff8a3c0f),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
)),
|
2021-11-14 19:21:20 +01:00
|
|
|
const SizedBox(height: 30),
|
2022-12-02 10:23:21 +01:00
|
|
|
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,
|
|
|
|
height: 60,
|
|
|
|
child: Center(
|
|
|
|
child: Text('importG1v1'.tr(),
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: 22,
|
|
|
|
color: Colors.blue[900],
|
|
|
|
fontWeight: FontWeight.w500))),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
2022-08-20 20:40:33 +02:00
|
|
|
),
|
2022-12-02 10:23:21 +01:00
|
|
|
const SizedBox(height: 20),
|
2022-06-01 21:00:17 +02:00
|
|
|
InkWell(
|
2022-08-23 00:25:16 +02:00
|
|
|
key: keyChangeChest,
|
2023-02-03 11:47:55 +01:00
|
|
|
onTap: () {
|
2023-02-19 19:35:11 +01:00
|
|
|
// Navigator.push(
|
|
|
|
// context,
|
|
|
|
// MaterialPageRoute(builder: (context) {
|
|
|
|
// return const ChooseChest();
|
|
|
|
// }),
|
|
|
|
// );
|
2023-02-02 15:45:01 +01:00
|
|
|
},
|
2022-06-01 21:00:17 +02:00
|
|
|
child: SizedBox(
|
|
|
|
width: 400,
|
2022-08-20 20:40:33 +02:00
|
|
|
height: 60,
|
2022-06-01 21:00:17 +02:00
|
|
|
child: Center(
|
2022-06-17 01:13:14 +02:00
|
|
|
child: Text('changeChest'.tr(),
|
2023-02-02 15:45:01 +01:00
|
|
|
style: const TextStyle(
|
2022-06-01 21:00:17 +02:00
|
|
|
fontSize: 22,
|
2023-02-19 19:35:11 +01:00
|
|
|
color: Colors.grey, //orangeC
|
2022-06-01 21:00:17 +02:00
|
|
|
fontWeight: FontWeight.w500))),
|
|
|
|
),
|
|
|
|
),
|
2021-11-14 19:21:20 +01:00
|
|
|
const SizedBox(height: 30)
|
2021-11-09 04:22:04 +01:00
|
|
|
]);
|
2021-03-10 15:41:56 +01:00
|
|
|
}
|
|
|
|
|
2022-08-06 02:22:41 +02:00
|
|
|
Widget myWalletsTiles(BuildContext context, int currentChestNumber) {
|
2022-11-30 05:42:08 +01:00
|
|
|
final myWalletProvider = Provider.of<MyWalletsProvider>(context);
|
2022-08-06 02:22:41 +02:00
|
|
|
final bool isWalletsExists = myWalletProvider.checkIfWalletExist();
|
2021-03-10 15:41:56 +01:00
|
|
|
|
|
|
|
if (!isWalletsExists) {
|
2021-11-14 19:21:20 +01:00
|
|
|
return const Text('');
|
2021-03-10 15:41:56 +01:00
|
|
|
}
|
|
|
|
|
2022-08-06 02:22:41 +02:00
|
|
|
if (myWalletProvider.listWallets.isEmpty) {
|
2023-05-24 14:37:28 +02:00
|
|
|
return const Expanded(
|
|
|
|
child: Column(children: <Widget>[
|
2021-03-21 00:35:32 +01:00
|
|
|
Center(
|
|
|
|
child: Text(
|
|
|
|
'Veuillez générer votre premier portefeuille',
|
|
|
|
style: TextStyle(fontSize: 17, fontWeight: FontWeight.w500),
|
|
|
|
)),
|
|
|
|
]));
|
2021-03-10 15:41:56 +01:00
|
|
|
}
|
|
|
|
|
2022-12-07 23:10:28 +01:00
|
|
|
// Get wallet list and sort by derivation number
|
|
|
|
List<WalletData> listWallets = myWalletProvider.listWallets;
|
|
|
|
listWallets.sort((p1, p2) {
|
|
|
|
return Comparable.compare(p1.number!, p2.number!);
|
|
|
|
});
|
|
|
|
|
2023-11-19 21:55:10 +01:00
|
|
|
// Get first wallet with identity
|
|
|
|
final idtyWallet = listWallets.firstWhere(
|
|
|
|
(w) => w.hasIdentity(),
|
|
|
|
orElse: () => WalletData(address: ''),
|
|
|
|
);
|
2023-11-20 19:45:56 +01:00
|
|
|
|
|
|
|
List<WalletData> listWalletsWithoutIdty = listWallets.toList();
|
|
|
|
listWalletsWithoutIdty.removeWhere((w) => w.address == idtyWallet.address);
|
2023-11-19 21:55:10 +01:00
|
|
|
|
2022-12-02 10:23:21 +01:00
|
|
|
final screenWidth = MediaQuery.of(context).size.width;
|
2022-12-23 01:58:44 +01:00
|
|
|
int nTule;
|
2021-12-23 21:44:24 +01:00
|
|
|
|
|
|
|
if (screenWidth >= 900) {
|
|
|
|
nTule = 4;
|
|
|
|
} else if (screenWidth >= 650) {
|
|
|
|
nTule = 3;
|
2022-12-23 01:58:44 +01:00
|
|
|
} else {
|
|
|
|
nTule = 2;
|
2021-12-23 21:44:24 +01:00
|
|
|
}
|
2021-03-10 15:41:56 +01:00
|
|
|
|
2023-04-09 20:17:17 +02:00
|
|
|
final tutorialCoachMark = TutorialCoachMark(
|
|
|
|
targets: [
|
|
|
|
TargetFocus(
|
|
|
|
identify: "drag_and_drop",
|
|
|
|
keyTarget: keyDragAndDrop,
|
|
|
|
contents: [
|
|
|
|
TargetContent(
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
Image.asset('assets/drag-and-drop.png', height: 140),
|
|
|
|
const SizedBox(height: 15),
|
|
|
|
Text(
|
|
|
|
'explainDraggableWallet'.tr(),
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
style: const TextStyle(
|
|
|
|
fontSize: 22, fontWeight: FontWeight.w500),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
))
|
|
|
|
],
|
|
|
|
alignSkip: Alignment.bottomRight,
|
|
|
|
enableOverlayTab: true,
|
|
|
|
),
|
|
|
|
],
|
|
|
|
colorShadow: orangeC,
|
|
|
|
textSkip: "skip".tr(),
|
|
|
|
paddingFocus: 10,
|
|
|
|
opacityShadow: 0.8,
|
|
|
|
);
|
|
|
|
|
|
|
|
// configBox.delete('showDraggableTutorial');
|
|
|
|
final bool showDraggableTutorial =
|
|
|
|
configBox.get('showDraggableTutorial') ?? true;
|
|
|
|
|
|
|
|
if (listWallets.length > 1 && showDraggableTutorial) {
|
|
|
|
tutorialCoachMark.show(context: context);
|
|
|
|
configBox.put('showDraggableTutorial', false);
|
|
|
|
}
|
2022-12-23 01:58:44 +01:00
|
|
|
|
2021-11-09 04:22:04 +01:00
|
|
|
return CustomScrollView(slivers: <Widget>[
|
2021-11-14 19:21:20 +01:00
|
|
|
const SliverToBoxAdapter(child: SizedBox(height: 20)),
|
2023-11-19 21:55:10 +01:00
|
|
|
if (idtyWallet.address != '')
|
|
|
|
SliverToBoxAdapter(
|
2023-11-26 17:14:40 +01:00
|
|
|
child: DragTuleAction(
|
|
|
|
wallet: idtyWallet,
|
|
|
|
child: WalletTileMembre(repository: idtyWallet),
|
|
|
|
),
|
|
|
|
),
|
2021-11-09 04:22:04 +01:00
|
|
|
SliverGrid.count(
|
2022-08-23 00:25:16 +02:00
|
|
|
key: keyListWallets,
|
2021-12-23 21:44:24 +01:00
|
|
|
crossAxisCount: nTule,
|
2021-11-09 04:22:04 +01:00
|
|
|
childAspectRatio: 1,
|
|
|
|
crossAxisSpacing: 0,
|
|
|
|
mainAxisSpacing: 0,
|
|
|
|
children: <Widget>[
|
2023-11-20 19:45:56 +01:00
|
|
|
for (WalletData repository in listWalletsWithoutIdty)
|
2023-11-26 17:14:40 +01:00
|
|
|
DragTuleAction(
|
|
|
|
wallet: repository,
|
|
|
|
child: WalletTile(repository: repository),
|
2022-09-12 04:52:34 +02:00
|
|
|
),
|
2022-08-06 02:22:41 +02:00
|
|
|
Consumer<SubstrateSdk>(builder: (context, sub, _) {
|
2023-11-17 17:33:57 +01:00
|
|
|
return sub.nodeConnected &&
|
2023-11-19 13:41:24 +01:00
|
|
|
myWalletProvider.listWallets.length < maxWalletsInSafe
|
2022-06-12 19:20:15 +02:00
|
|
|
? addNewDerivation(context)
|
|
|
|
: const Text('');
|
|
|
|
}),
|
2021-11-09 04:22:04 +01:00
|
|
|
]),
|
2022-08-06 02:22:41 +02:00
|
|
|
SliverToBoxAdapter(child: chestOptions(context, myWalletProvider)),
|
2021-11-09 04:22:04 +01:00
|
|
|
]);
|
|
|
|
}
|
2021-04-03 00:07:03 +02:00
|
|
|
|
2021-11-09 04:22:04 +01:00
|
|
|
Widget addNewDerivation(context) {
|
2022-11-30 05:42:08 +01:00
|
|
|
final myWalletProvider = Provider.of<MyWalletsProvider>(context);
|
2021-11-15 21:04:06 +01:00
|
|
|
|
2022-08-06 02:22:41 +02:00
|
|
|
String newDerivationName =
|
|
|
|
'${'wallet'.tr()} ${myWalletProvider.listWallets.last.number! + 2}';
|
2021-11-09 04:22:04 +01:00
|
|
|
return Padding(
|
2023-11-26 17:14:40 +01:00
|
|
|
padding: const EdgeInsets.all(16),
|
|
|
|
child: ClipRRect(
|
|
|
|
borderRadius: const BorderRadius.all(Radius.circular(12)),
|
|
|
|
child: Column(children: <Widget>[
|
|
|
|
Expanded(
|
|
|
|
child: InkWell(
|
|
|
|
key: keyAddDerivation,
|
|
|
|
onTap: () async {
|
|
|
|
if (!myWalletProvider.isNewDerivationLoading) {
|
|
|
|
WalletData? defaultWallet =
|
|
|
|
myWalletProvider.getDefaultWallet();
|
|
|
|
String? pin;
|
|
|
|
if (myWalletProvider.pinCode == '') {
|
|
|
|
pin = await Navigator.push(
|
|
|
|
context,
|
|
|
|
MaterialPageRoute(
|
|
|
|
builder: (homeContext) {
|
|
|
|
return UnlockingWallet(wallet: defaultWallet);
|
|
|
|
},
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
if (pin != null || myWalletProvider.pinCode != '') {
|
|
|
|
await myWalletProvider.generateNewDerivation(
|
|
|
|
context, newDerivationName);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
width: double.infinity,
|
|
|
|
height: double.infinity,
|
|
|
|
decoration: const BoxDecoration(color: floattingYellow),
|
|
|
|
child: Center(
|
|
|
|
child: myWalletProvider.isNewDerivationLoading
|
|
|
|
? const SizedBox(
|
|
|
|
height: 60,
|
|
|
|
width: 60,
|
|
|
|
child: CircularProgressIndicator(
|
|
|
|
color: orangeC,
|
|
|
|
strokeWidth: 7,
|
|
|
|
),
|
|
|
|
)
|
|
|
|
: const Text(
|
|
|
|
'+',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: 150,
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
color: Color(0xFFFCB437)),
|
|
|
|
)),
|
|
|
|
)),
|
|
|
|
),
|
|
|
|
]),
|
|
|
|
),
|
|
|
|
);
|
2021-01-13 00:00:11 +01:00
|
|
|
}
|
|
|
|
}
|