Move sandbox button on setting tab

This commit is contained in:
poka 2022-05-04 16:41:08 +02:00
parent 4389f65ee0
commit 370dabc01b
13 changed files with 44 additions and 39 deletions

View File

@ -23,7 +23,8 @@
android:theme="@style/LaunchTheme" android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true" android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize"> android:windowSoftInputMode="adjustResize"
android:exported="true">
<!-- Specifies an Android theme to apply to this Activity as soon as <!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues while the Flutter UI initializes. After that, this theme continues

View File

@ -492,4 +492,4 @@
/* End XCConfigurationList section */ /* End XCConfigurationList section */
}; };
rootObject = 97C146E61CF9000F007C117D /* Project object */; rootObject = 97C146E61CF9000F007C117D /* Project object */;
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@ -33,7 +33,7 @@ class HistoryScreen extends StatelessWidget with ChangeNotifier {
CesiumPlusProvider _cesiumPlusProvider = CesiumPlusProvider _cesiumPlusProvider =
Provider.of<CesiumPlusProvider>(context, listen: false); Provider.of<CesiumPlusProvider>(context, listen: false);
log.i('Build pubkey : ' + pubkey!); log.i('Build pubkey : ' + pubkey!);
WidgetsBinding.instance!.addPostFrameCallback((_) {}); WidgetsBinding.instance?.addPostFrameCallback((_) {});
_historyProvider.balance = _historyProvider.transBC = null; _historyProvider.balance = _historyProvider.transBC = null;

View File

@ -69,6 +69,20 @@ class HomeScreen extends StatelessWidget {
); );
}, },
), ),
ListTile(
key: const Key('substrateSandbox'),
title: const Text('SUBSTRATE SANDBOX'),
onTap: () {
Navigator.pop(context);
Navigator.push(
context,
MaterialPageRoute(builder: (context) {
return const SubstrateSandBox();
}),
);
},
),
// ListTile( // ListTile(
// title: const Text('A propos'), // title: const Text('A propos'),
// onTap: () { // onTap: () {
@ -86,9 +100,11 @@ class HomeScreen extends StatelessWidget {
body: Builder( body: Builder(
builder: (ctx) => StatefulWrapper( builder: (ctx) => StatefulWrapper(
onInit: () { onInit: () {
WidgetsBinding.instance!.addPostFrameCallback((_) async { WidgetsBinding.instance?.addPostFrameCallback((_) async {
if (!_sub.sdkReady && !_sub.sdkLoading) await _sub.initApi(); if (!_sub.sdkReady && !_sub.sdkLoading) await _sub.initApi();
if (_sub.sdkReady && !_sub.nodeConnected) await _sub.connectNode(); if (_sub.sdkReady && !_sub.nodeConnected) {
await _sub.connectNode();
}
if (isWalletsExists) homeClass.snackNode(ctx); if (isWalletsExists) homeClass.snackNode(ctx);
}); });
}, },
@ -186,24 +202,6 @@ Widget geckHome(context) {
]), ]),
), ),
const SizedBox(height: 15), const SizedBox(height: 15),
Row(mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[
ElevatedButton(
style: ElevatedButton.styleFrom(
primary: yellowC, // background
onPrimary: Colors.black, // foreground
),
onPressed: () => Navigator.push(
context,
MaterialPageRoute(builder: (context) {
return const SubstrateSandBox();
}),
),
child: const Text(
'SUBSTRATE SANDBOX',
style: TextStyle(fontSize: 20),
),
),
]),
Expanded( Expanded(
flex: 1, flex: 1,
child: Container( child: Container(

View File

@ -422,7 +422,7 @@ class WalletOptions extends StatelessWidget {
onTap: !walletProvider.isDefaultWallet onTap: !walletProvider.isDefaultWallet
? () async { ? () async {
await walletProvider.deleteWallet(context, wallet); await walletProvider.deleteWallet(context, wallet);
WidgetsBinding.instance!.addPostFrameCallback((_) { WidgetsBinding.instance?.addPostFrameCallback((_) {
_myWalletProvider.listWallets = _myWalletProvider.listWallets =
_myWalletProvider.readAllWallets(_currentChest); _myWalletProvider.readAllWallets(_currentChest);
_myWalletProvider.rebuildWidget(); _myWalletProvider.rebuildWidget();

View File

@ -368,13 +368,6 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "5.3.2" version: "5.3.2"
flutter_launcher_icons:
dependency: "direct main"
description:
name: flutter_launcher_icons
url: "https://pub.dartlang.org"
source: hosted
version: "0.9.2"
flutter_lints: flutter_lints:
dependency: "direct main" dependency: "direct main"
description: description:
@ -572,6 +565,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.0.0" version: "1.0.0"
icons_launcher:
dependency: "direct dev"
description:
name: icons_launcher
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.3"
image: image:
dependency: transitive dependency: transitive
description: description:
@ -779,14 +779,14 @@ packages:
name: package_info_plus name: package_info_plus
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.4.0" version: "1.4.2"
package_info_plus_linux: package_info_plus_linux:
dependency: transitive dependency: transitive
description: description:
name: package_info_plus_linux name: package_info_plus_linux
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.0.3" version: "1.0.5"
package_info_plus_macos: package_info_plus_macos:
dependency: transitive dependency: transitive
description: description:
@ -807,14 +807,14 @@ packages:
name: package_info_plus_web name: package_info_plus_web
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.0.4" version: "1.0.5"
package_info_plus_windows: package_info_plus_windows:
dependency: transitive dependency: transitive
description: description:
name: package_info_plus_windows name: package_info_plus_windows
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.0.4" version: "1.0.5"
path: path:
dependency: transitive dependency: transitive
description: description:
@ -1295,6 +1295,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.3.0" version: "1.3.0"
universal_io:
dependency: transitive
description:
name: universal_io
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.4"
unorm_dart: unorm_dart:
dependency: "direct main" dependency: "direct main"
description: description:

View File

@ -25,7 +25,6 @@ dependencies:
confirm_dialog: ^1.0.0 confirm_dialog: ^1.0.0
crypto: ^3.0.1 crypto: ^3.0.1
fast_base58: ^0.2.0 fast_base58: ^0.2.0
flutter_launcher_icons: ^0.9.2
flutter_lints: ^1.0.4 flutter_lints: ^1.0.4
flutter_logs: ^2.1.4 flutter_logs: ^2.1.4
flutter_svg: ^0.22.0 flutter_svg: ^0.22.0
@ -71,7 +70,7 @@ dependencies:
dio: ^4.0.4 dio: ^4.0.4
desktop_window: ^0.4.0 desktop_window: ^0.4.0
durt: ^0.1.6 durt: ^0.1.6
package_info_plus: ^1.3.0 package_info_plus: ^1.4.2
polkawallet_sdk: #^0.4.1 ## Wait for merging PR: https://github.com/polkawallet-io/sdk/pull/19 polkawallet_sdk: #^0.4.1 ## Wait for merging PR: https://github.com/polkawallet-io/sdk/pull/19
# path: ../substrate-sdk # path: ../substrate-sdk
git: git:
@ -79,13 +78,13 @@ dependencies:
ref: fixAndroidActivityVersion ref: fixAndroidActivityVersion
flutter_icons: flutter_icons:
android: "ic_launcher" android: true
ios: true ios: true
image_path: "assets/icon/gecko_flat.png" image_path: "assets/icon/gecko_flat.png"
cupertino_icons: ^1.0.0
remove_alpha_ios: true remove_alpha_ios: true
dev_dependencies: dev_dependencies:
icons_launcher: ^1.1.3
build_runner: ^2.1.2 build_runner: ^2.1.2
flutter_test: flutter_test:
sdk: flutter sdk: flutter