Fix pubkey derivations and few things
This commit is contained in:
parent
7bdd564a91
commit
cd71b0eb3d
Binary file not shown.
Before Width: | Height: | Size: 9.2 KiB |
Binary file not shown.
Before Width: | Height: | Size: 12 KiB |
Binary file not shown.
Before Width: | Height: | Size: 11 KiB |
|
@ -14,6 +14,7 @@ late String appVersion;
|
||||||
late SharedPreferences prefs;
|
late SharedPreferences prefs;
|
||||||
late String endPointGVA;
|
late String endPointGVA;
|
||||||
const int pinLength = 5;
|
const int pinLength = 5;
|
||||||
|
const String appLang = 'french';
|
||||||
|
|
||||||
late Box<WalletData> walletBox;
|
late Box<WalletData> walletBox;
|
||||||
late Box<ChestData> chestBox;
|
late Box<ChestData> chestBox;
|
||||||
|
|
|
@ -60,11 +60,11 @@ class CesiumPlusProvider with ChangeNotifier {
|
||||||
return [podRequest, queryGetAvatar, headers];
|
return [podRequest, queryGetAvatar, headers];
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<String?> getName(String? _pubkey) async {
|
Future<String> getName(String? _pubkey) async {
|
||||||
String? _name;
|
String? _name;
|
||||||
|
|
||||||
if (g1WalletsBox.get(_pubkey)!.csName != null) {
|
if (g1WalletsBox.get(_pubkey)!.csName != null) {
|
||||||
return g1WalletsBox.get(_pubkey)!.csName;
|
return g1WalletsBox.get(_pubkey)!.csName!;
|
||||||
}
|
}
|
||||||
|
|
||||||
List queryOptions = await _buildQuery(_pubkey);
|
List queryOptions = await _buildQuery(_pubkey);
|
||||||
|
@ -97,6 +97,7 @@ class CesiumPlusProvider with ChangeNotifier {
|
||||||
}
|
}
|
||||||
_name = response.data['hits']['hits'][0]['_source']['title'];
|
_name = response.data['hits']['hits'][0]['_source']['title'];
|
||||||
|
|
||||||
|
_name ??= '';
|
||||||
g1WalletsBox.get(_pubkey)!.csName = _name;
|
g1WalletsBox.get(_pubkey)!.csName = _name;
|
||||||
|
|
||||||
return _name;
|
return _name;
|
||||||
|
|
|
@ -157,7 +157,7 @@ class GenerateWalletsProvider with ChangeNotifier {
|
||||||
try {
|
try {
|
||||||
actualWallet = await Dewif().generateDewif(
|
actualWallet = await Dewif().generateDewif(
|
||||||
generatedMnemonic, randomSecretCode(pinLength),
|
generatedMnemonic, randomSecretCode(pinLength),
|
||||||
lang: 'french');
|
lang: appLang);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
log.e(e);
|
log.e(e);
|
||||||
}
|
}
|
||||||
|
@ -294,7 +294,7 @@ class GenerateWalletsProvider with ChangeNotifier {
|
||||||
}
|
}
|
||||||
|
|
||||||
List<String> generateWordList() {
|
List<String> generateWordList() {
|
||||||
generatedMnemonic = generateMnemonic(lang: 'french');
|
generatedMnemonic = generateMnemonic(lang: appLang);
|
||||||
List<String> _wordsList = [];
|
List<String> _wordsList = [];
|
||||||
String word;
|
String word;
|
||||||
int _nbr = 1;
|
int _nbr = 1;
|
||||||
|
@ -333,8 +333,8 @@ class GenerateWalletsProvider with ChangeNotifier {
|
||||||
cellController0.text = cellController1.text = cellController2.text =
|
cellController0.text = cellController1.text = cellController2.text =
|
||||||
cellController3.text = cellController4.text = cellController5.text =
|
cellController3.text = cellController4.text = cellController5.text =
|
||||||
cellController6.text = cellController7.text = cellController8.text =
|
cellController6.text = cellController7.text = cellController8.text =
|
||||||
cellController9.text =
|
cellController9.text = cellController10.text =
|
||||||
cellController10.text = cellController11.text = '';
|
cellController11.text = '';
|
||||||
isFirstTimeSentenceComplete = true;
|
isFirstTimeSentenceComplete = true;
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@ class WalletOptionsProvider with ChangeNotifier {
|
||||||
}
|
}
|
||||||
if (derivation != -1) {
|
if (derivation != -1) {
|
||||||
try {
|
try {
|
||||||
final _wallet = HdWallet.fromDewif(_dewif!, _pin);
|
final _wallet = HdWallet.fromDewif(_dewif!, _pin, lang: appLang);
|
||||||
pubkey.text = _wallet.getPubkey(derivation!);
|
pubkey.text = _wallet.getPubkey(derivation!);
|
||||||
log.d(pubkey.text);
|
log.d(pubkey.text);
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
|
@ -66,15 +66,23 @@ class WalletOptionsProvider with ChangeNotifier {
|
||||||
}
|
}
|
||||||
|
|
||||||
String? readLocalWallet(
|
String? readLocalWallet(
|
||||||
context, WalletData _wallet, String _pin, int _pinLenght) {
|
context, WalletData _wallet, String _pin, int _pinLenght,
|
||||||
|
{String? mnemonic}) {
|
||||||
isWalletUnlock = false;
|
isWalletUnlock = false;
|
||||||
|
final String _localPubkey;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
String? _localDewif = chestBox.get(_wallet.chest)!.dewif;
|
String? _localDewif = chestBox.get(_wallet.chest)!.dewif;
|
||||||
String _localPubkey;
|
|
||||||
|
|
||||||
if ((_localPubkey = _getPubkeyFromDewif(
|
if (mnemonic == null) {
|
||||||
_localDewif, _pin, _pinLenght, _wallet.derivation)) !=
|
_localPubkey = _getPubkeyFromDewif(
|
||||||
'false') {
|
_localDewif, _pin.toUpperCase(), _pinLenght, _wallet.derivation);
|
||||||
|
} else {
|
||||||
|
final _hdwallet = HdWallet.fromMnemonic(mnemonic);
|
||||||
|
_localPubkey = _hdwallet.getPubkey(_wallet.derivation!);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_localPubkey != 'false') {
|
||||||
pubkey.text = _localPubkey;
|
pubkey.text = _localPubkey;
|
||||||
isWalletUnlock = true;
|
isWalletUnlock = true;
|
||||||
log.d(pubkey.text);
|
log.d(pubkey.text);
|
||||||
|
|
|
@ -295,11 +295,11 @@ class HistoryScreen extends StatelessWidget with ChangeNotifier {
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
if (_avatar.hasData) {
|
if (_avatar.hasData) {
|
||||||
g1WalletsBox.get(repository[2])!.avatar =
|
g1WalletsBox.get(repository[2])?.avatar =
|
||||||
_avatar.data;
|
_avatar.data;
|
||||||
return ClipOval(child: _avatar.data);
|
return ClipOval(child: _avatar.data);
|
||||||
} else {
|
} else {
|
||||||
g1WalletsBox.get(repository[2])!.avatar =
|
g1WalletsBox.get(repository[2])?.avatar =
|
||||||
_cesiumPlusProvider
|
_cesiumPlusProvider
|
||||||
.defaultAvatar(repository[2]);
|
.defaultAvatar(repository[2]);
|
||||||
return _cesiumPlusProvider
|
return _cesiumPlusProvider
|
||||||
|
@ -308,7 +308,8 @@ class HistoryScreen extends StatelessWidget with ChangeNotifier {
|
||||||
})
|
})
|
||||||
: ClipOval(
|
: ClipOval(
|
||||||
child: Image(
|
child: Image(
|
||||||
image: g1WalletsBox.get(repository[2])!.avatar!.image,
|
image:
|
||||||
|
g1WalletsBox.get(repository[2])!.avatar!.image,
|
||||||
height: _avatarSize,
|
height: _avatarSize,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -411,19 +411,21 @@ Widget welcomeHome(context) {
|
||||||
]),
|
]),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 1,
|
flex: 1,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
gradient: LinearGradient(
|
gradient: LinearGradient(
|
||||||
begin: Alignment.topCenter,
|
begin: Alignment.topCenter,
|
||||||
end: Alignment.bottomCenter,
|
end: Alignment.bottomCenter,
|
||||||
colors: [
|
colors: [
|
||||||
Colors.transparent,
|
Colors.transparent,
|
||||||
Colors.black.withOpacity(0.9),
|
Colors.black.withOpacity(0.9),
|
||||||
],
|
],
|
||||||
),
|
|
||||||
),
|
),
|
||||||
child: Center(
|
),
|
||||||
|
child: Center(
|
||||||
|
child: ConstrainedBox(
|
||||||
|
constraints: const BoxConstraints(maxWidth: 480),
|
||||||
child: Column(children: <Widget>[
|
child: Column(children: <Widget>[
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
Row(children: <Widget>[
|
Row(children: <Widget>[
|
||||||
|
@ -505,7 +507,9 @@ Widget welcomeHome(context) {
|
||||||
SizedBox(height: isTall ? 100 : 50)
|
SizedBox(height: isTall ? 100 : 50)
|
||||||
]),
|
]),
|
||||||
),
|
),
|
||||||
))
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
]),
|
]),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -120,7 +120,7 @@ class GenerateFastChestScreen extends StatelessWidget {
|
||||||
_generateWalletProvider
|
_generateWalletProvider
|
||||||
.generatedMnemonic!,
|
.generatedMnemonic!,
|
||||||
_generateWalletProvider.pin.text,
|
_generateWalletProvider.pin.text,
|
||||||
lang: 'french');
|
lang: appLang);
|
||||||
await Navigator.push(
|
await Navigator.push(
|
||||||
context,
|
context,
|
||||||
MaterialPageRoute(builder: (context) {
|
MaterialPageRoute(builder: (context) {
|
||||||
|
|
|
@ -8,6 +8,7 @@ import 'package:gecko/providers/wallet_options.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:gecko/screens/myWallets/cesium_wallet_options.dart';
|
import 'package:gecko/screens/myWallets/cesium_wallet_options.dart';
|
||||||
import 'package:gecko/screens/myWallets/choose_chest.dart';
|
import 'package:gecko/screens/myWallets/choose_chest.dart';
|
||||||
|
import 'package:gecko/screens/myWallets/wallets_home.dart';
|
||||||
import 'package:pin_code_fields/pin_code_fields.dart';
|
import 'package:pin_code_fields/pin_code_fields.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:gecko/globals.dart';
|
import 'package:gecko/globals.dart';
|
||||||
|
@ -223,8 +224,12 @@ class UnlockingWallet extends StatelessWidget {
|
||||||
cesiumWallet: currentChest);
|
cesiumWallet: currentChest);
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
: Navigator.pushNamed(
|
: Navigator.push(
|
||||||
formKey.currentContext!, '/mywallets');
|
context,
|
||||||
|
MaterialPageRoute(builder: (context) {
|
||||||
|
return const WalletsHome();
|
||||||
|
}),
|
||||||
|
);
|
||||||
} else if (action == "pay") {
|
} else if (action == "pay") {
|
||||||
resultPay =
|
resultPay =
|
||||||
await _historyProvider.pay(context, _pin.toUpperCase());
|
await _historyProvider.pay(context, _pin.toUpperCase());
|
||||||
|
|
|
@ -27,8 +27,6 @@ class WalletOptions extends StatelessWidget {
|
||||||
MyWalletsProvider _myWalletProvider =
|
MyWalletsProvider _myWalletProvider =
|
||||||
Provider.of<MyWalletsProvider>(context);
|
Provider.of<MyWalletsProvider>(context);
|
||||||
|
|
||||||
|
|
||||||
_walletOptions.pubkey.text =
|
|
||||||
log.d(_walletOptions.pubkey.text);
|
log.d(_walletOptions.pubkey.text);
|
||||||
|
|
||||||
final int _currentChest = _myWalletProvider.getCurrentChest()!;
|
final int _currentChest = _myWalletProvider.getCurrentChest()!;
|
||||||
|
@ -39,10 +37,7 @@ class WalletOptions extends StatelessWidget {
|
||||||
onWillPop: () {
|
onWillPop: () {
|
||||||
_walletOptions.isEditing = false;
|
_walletOptions.isEditing = false;
|
||||||
_walletOptions.isBalanceBlur = true;
|
_walletOptions.isBalanceBlur = true;
|
||||||
Navigator.popUntil(
|
Navigator.pop(context);
|
||||||
context,
|
|
||||||
ModalRoute.withName('/mywallets'),
|
|
||||||
);
|
|
||||||
return Future<bool>.value(true);
|
return Future<bool>.value(true);
|
||||||
},
|
},
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
|
@ -55,10 +50,7 @@ class WalletOptions extends StatelessWidget {
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
_walletOptions.isEditing = false;
|
_walletOptions.isEditing = false;
|
||||||
_walletOptions.isBalanceBlur = true;
|
_walletOptions.isBalanceBlur = true;
|
||||||
Navigator.popUntil(
|
Navigator.pop(context);
|
||||||
context,
|
|
||||||
ModalRoute.withName('/mywallets'),
|
|
||||||
);
|
|
||||||
}),
|
}),
|
||||||
title: SizedBox(
|
title: SizedBox(
|
||||||
height: 22,
|
height: 22,
|
||||||
|
@ -88,6 +80,7 @@ class WalletOptions extends StatelessWidget {
|
||||||
],
|
],
|
||||||
)),
|
)),
|
||||||
child: Row(
|
child: Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
|
@ -138,8 +131,7 @@ class WalletOptions extends StatelessWidget {
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
InkWell(
|
InkWell(
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
File newAvatar =
|
File newAvatar = await (walletProvider.changeAvatar());
|
||||||
await (walletProvider.changeAvatar());
|
|
||||||
wallet.imageFile = newAvatar;
|
wallet.imageFile = newAvatar;
|
||||||
walletProvider.reloadBuild();
|
walletProvider.reloadBuild();
|
||||||
},
|
},
|
||||||
|
@ -155,10 +147,10 @@ class WalletOptions extends StatelessWidget {
|
||||||
),
|
),
|
||||||
Positioned(
|
Positioned(
|
||||||
right: 0,
|
right: 0,
|
||||||
|
top: 0,
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
File newAvatar =
|
File newAvatar = await (walletProvider.changeAvatar());
|
||||||
await (walletProvider.changeAvatar());
|
|
||||||
wallet.imageFile = newAvatar;
|
wallet.imageFile = newAvatar;
|
||||||
walletProvider.reloadBuild();
|
walletProvider.reloadBuild();
|
||||||
},
|
},
|
||||||
|
@ -174,13 +166,6 @@ class WalletOptions extends StatelessWidget {
|
||||||
|
|
||||||
Widget walletName(WalletOptionsProvider walletProvider,
|
Widget walletName(WalletOptionsProvider walletProvider,
|
||||||
WalletOptionsProvider _walletOptions) {
|
WalletOptionsProvider _walletOptions) {
|
||||||
int _nbrLinesName = 1;
|
|
||||||
_walletOptions.nameController.text.length >= 15
|
|
||||||
? _nbrLinesName = 2
|
|
||||||
: _nbrLinesName = 1;
|
|
||||||
if (_walletOptions.nameController.text.length >= 26 && isTall) {
|
|
||||||
_nbrLinesName = 3;
|
|
||||||
}
|
|
||||||
bool _isNewNameValid = false;
|
bool _isNewNameValid = false;
|
||||||
if (_isNewNameValid == false) {
|
if (_isNewNameValid == false) {
|
||||||
_walletOptions.nameController.text = wallet.name!;
|
_walletOptions.nameController.text = wallet.name!;
|
||||||
|
@ -197,7 +182,8 @@ class WalletOptions extends StatelessWidget {
|
||||||
focusNode: walletProvider.walletNameFocus,
|
focusNode: walletProvider.walletNameFocus,
|
||||||
enabled: walletProvider.isEditing,
|
enabled: walletProvider.isEditing,
|
||||||
controller: walletProvider.nameController,
|
controller: walletProvider.nameController,
|
||||||
maxLines: _nbrLinesName,
|
minLines: 1,
|
||||||
|
maxLines: 3,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
decoration: const InputDecoration(
|
decoration: const InputDecoration(
|
||||||
border: InputBorder.none,
|
border: InputBorder.none,
|
||||||
|
@ -207,10 +193,10 @@ class WalletOptions extends StatelessWidget {
|
||||||
contentPadding: EdgeInsets.all(15.0),
|
contentPadding: EdgeInsets.all(15.0),
|
||||||
),
|
),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: isTall ? 27 : 23,
|
fontSize: isTall ? 27 : 23,
|
||||||
color: Colors.black,
|
color: Colors.black,
|
||||||
fontWeight: FontWeight.w400,
|
fontWeight: FontWeight.w400,
|
||||||
fontFamily: 'Monospace'),
|
),
|
||||||
),
|
),
|
||||||
Positioned(
|
Positioned(
|
||||||
right: 0,
|
right: 0,
|
||||||
|
@ -253,7 +239,7 @@ class WalletOptions extends StatelessWidget {
|
||||||
sigmaX: walletProvider.isBalanceBlur ? 6 : 0,
|
sigmaX: walletProvider.isBalanceBlur ? 6 : 0,
|
||||||
sigmaY: walletProvider.isBalanceBlur ? 5 : 0),
|
sigmaY: walletProvider.isBalanceBlur ? 5 : 0),
|
||||||
child: Text(
|
child: Text(
|
||||||
_balance.data.toString() + ' DU',
|
_balance.data.toString() + ' Ğ1',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: isTall ? 20 : 18,
|
fontSize: isTall ? 20 : 18,
|
||||||
),
|
),
|
||||||
|
|
|
@ -5,6 +5,7 @@ import 'package:gecko/providers/my_wallets.dart';
|
||||||
import 'package:gecko/models/queries.dart';
|
import 'package:gecko/models/queries.dart';
|
||||||
import 'package:gecko/models/wallet_data.dart';
|
import 'package:gecko/models/wallet_data.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:gecko/providers/wallet_options.dart';
|
||||||
import 'package:gecko/screens/common_elements.dart';
|
import 'package:gecko/screens/common_elements.dart';
|
||||||
import 'package:gecko/screens/myWallets/chest_options.dart';
|
import 'package:gecko/screens/myWallets/chest_options.dart';
|
||||||
import 'package:gecko/screens/myWallets/choose_chest.dart';
|
import 'package:gecko/screens/myWallets/choose_chest.dart';
|
||||||
|
@ -131,7 +132,8 @@ class WalletsHome extends StatelessWidget {
|
||||||
Widget myWalletsTiles(BuildContext context) {
|
Widget myWalletsTiles(BuildContext context) {
|
||||||
MyWalletsProvider _myWalletProvider =
|
MyWalletsProvider _myWalletProvider =
|
||||||
Provider.of<MyWalletsProvider>(context);
|
Provider.of<MyWalletsProvider>(context);
|
||||||
|
WalletOptionsProvider _walletOptions =
|
||||||
|
Provider.of<WalletOptionsProvider>(context, listen: false);
|
||||||
final bool isWalletsExists = _myWalletProvider.checkIfWalletExist();
|
final bool isWalletsExists = _myWalletProvider.checkIfWalletExist();
|
||||||
|
|
||||||
if (!isWalletsExists) {
|
if (!isWalletsExists) {
|
||||||
|
@ -175,6 +177,8 @@ class WalletsHome extends StatelessWidget {
|
||||||
padding: const EdgeInsets.all(16),
|
padding: const EdgeInsets.all(16),
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
|
_walletOptions.readLocalWallet(context, _repository,
|
||||||
|
_myWalletProvider.pinCode, pinLength);
|
||||||
Navigator.push(
|
Navigator.push(
|
||||||
context,
|
context,
|
||||||
SmoothTransition(
|
SmoothTransition(
|
||||||
|
@ -260,6 +264,11 @@ class WalletsHome extends StatelessWidget {
|
||||||
),
|
),
|
||||||
// dense: true,
|
// dense: true,
|
||||||
onTap: () {
|
onTap: () {
|
||||||
|
_walletOptions.readLocalWallet(
|
||||||
|
context,
|
||||||
|
_repository,
|
||||||
|
_myWalletProvider.pinCode,
|
||||||
|
pinLength);
|
||||||
Navigator.push(
|
Navigator.push(
|
||||||
context,
|
context,
|
||||||
SmoothTransition(
|
SmoothTransition(
|
||||||
|
|
|
@ -120,16 +120,15 @@ class OnboardingStepFourteen extends StatelessWidget {
|
||||||
NewWallet generatedWallet = await Dewif().generateDewif(
|
NewWallet generatedWallet = await Dewif().generateDewif(
|
||||||
_generateWalletProvider.generatedMnemonic!,
|
_generateWalletProvider.generatedMnemonic!,
|
||||||
_generateWalletProvider.pin.text,
|
_generateWalletProvider.pin.text,
|
||||||
lang: 'french');
|
lang: appLang);
|
||||||
await _generateWalletProvider.storeHDWChest(
|
await _generateWalletProvider.storeHDWChest(
|
||||||
generatedWallet, 'Mon portefeuille courant', context);
|
generatedWallet, 'Mon portefeuille courant', context);
|
||||||
_myWalletProvider.readAllWallets(_currentChest);
|
_myWalletProvider.readAllWallets(_currentChest);
|
||||||
// scheduleMicrotask(() {
|
// scheduleMicrotask(() {
|
||||||
_walletOptions.reloadBuild();
|
// _walletOptions.reloadBuild();
|
||||||
// _myWalletProvider.rebuildWidget();
|
_myWalletProvider.rebuildWidget();
|
||||||
// });
|
// });
|
||||||
_generateWalletProvider.generatedMnemonic =
|
_generateWalletProvider.generatedMnemonic = '';
|
||||||
_generateWalletProvider.pin.text = '';
|
|
||||||
Navigator.push(
|
Navigator.push(
|
||||||
context,
|
context,
|
||||||
FaderTransition(
|
FaderTransition(
|
||||||
|
|
|
@ -4,6 +4,7 @@ import 'package:flutter/services.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:gecko/globals.dart';
|
import 'package:gecko/globals.dart';
|
||||||
import 'package:gecko/screens/common_elements.dart';
|
import 'package:gecko/screens/common_elements.dart';
|
||||||
|
import 'package:gecko/screens/myWallets/wallets_home.dart';
|
||||||
|
|
||||||
// ignore: must_be_immutable
|
// ignore: must_be_immutable
|
||||||
class OnboardingStepFiveteen extends StatelessWidget {
|
class OnboardingStepFiveteen extends StatelessWidget {
|
||||||
|
@ -33,28 +34,32 @@ class OnboardingStepFiveteen extends StatelessWidget {
|
||||||
height: isTall ? 400 : 300,
|
height: isTall ? 400 : 300,
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Align(
|
child: Align(
|
||||||
alignment: Alignment.bottomCenter,
|
alignment: Alignment.bottomCenter,
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: 400,
|
width: 400,
|
||||||
height: 62,
|
height: 62,
|
||||||
child: ElevatedButton(
|
child: ElevatedButton(
|
||||||
key: const Key('goWalletHome'),
|
key: const Key('goWalletHome'),
|
||||||
style: ElevatedButton.styleFrom(
|
style: ElevatedButton.styleFrom(
|
||||||
elevation: 5,
|
elevation: 5,
|
||||||
primary: orangeC,
|
primary: orangeC,
|
||||||
onPrimary: Colors.white, // foreground
|
onPrimary: Colors.white, // foreground
|
||||||
),
|
),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Navigator.pushNamedAndRemoveUntil(
|
Navigator.pushAndRemoveUntil(
|
||||||
context,
|
context,
|
||||||
'/mywallets',
|
MaterialPageRoute(builder: (context) {
|
||||||
ModalRoute.withName('/'),
|
return const WalletsHome();
|
||||||
);
|
}),
|
||||||
},
|
ModalRoute.withName('/'),
|
||||||
child: const Text("Accéder à mes portefeuilles",
|
);
|
||||||
style: TextStyle(fontSize: 20))),
|
},
|
||||||
))),
|
child: const Text("Accéder à mes portefeuilles",
|
||||||
|
style: TextStyle(fontSize: 20))),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
const SizedBox(height: 80),
|
const SizedBox(height: 80),
|
||||||
]),
|
]),
|
||||||
));
|
));
|
||||||
|
|
|
@ -248,7 +248,7 @@ class WalletViewScreen extends StatelessWidget {
|
||||||
// onChanged: (v) => _searchProvider.rebuildWidget(),
|
// onChanged: (v) => _searchProvider.rebuildWidget(),
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
hintText: '0.00',
|
hintText: '0.00',
|
||||||
suffix: const Text('DU/Ğ1'),
|
suffix: const Text('Ğ1'),
|
||||||
filled: true,
|
filled: true,
|
||||||
fillColor: Colors.transparent,
|
fillColor: Colors.transparent,
|
||||||
// border: OutlineInputBorder(
|
// border: OutlineInputBorder(
|
||||||
|
|
|
@ -301,7 +301,7 @@ packages:
|
||||||
name: durt
|
name: durt
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.1.5"
|
version: "0.1.5+2"
|
||||||
fake_async:
|
fake_async:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
|
@ -5,7 +5,7 @@ description: Pay with G1.
|
||||||
# pub.dev using `pub publish`. This is preferred for private packages.
|
# 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
|
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
||||||
|
|
||||||
version: 0.0.4+5
|
version: 0.0.4+6
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=2.12.0 <3.0.0'
|
sdk: '>=2.12.0 <3.0.0'
|
||||||
|
@ -62,7 +62,7 @@ dependencies:
|
||||||
pull_to_refresh: ^2.0.0
|
pull_to_refresh: ^2.0.0
|
||||||
dio: ^4.0.4
|
dio: ^4.0.4
|
||||||
desktop_window: ^0.4.0
|
desktop_window: ^0.4.0
|
||||||
durt: ^0.1.5
|
durt: ^0.1.5+2
|
||||||
package_info_plus: ^1.3.0
|
package_info_plus: ^1.3.0
|
||||||
|
|
||||||
flutter_icons:
|
flutter_icons:
|
||||||
|
|
Loading…
Reference in New Issue