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

View File

@ -492,4 +492,4 @@
/* End XCConfigurationList section */
};
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 =
Provider.of<CesiumPlusProvider>(context, listen: false);
log.i('Build pubkey : ' + pubkey!);
WidgetsBinding.instance!.addPostFrameCallback((_) {});
WidgetsBinding.instance?.addPostFrameCallback((_) {});
_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(
// title: const Text('A propos'),
// onTap: () {
@ -86,9 +100,11 @@ class HomeScreen extends StatelessWidget {
body: Builder(
builder: (ctx) => StatefulWrapper(
onInit: () {
WidgetsBinding.instance!.addPostFrameCallback((_) async {
WidgetsBinding.instance?.addPostFrameCallback((_) async {
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);
});
},
@ -186,24 +202,6 @@ Widget geckHome(context) {
]),
),
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(
flex: 1,
child: Container(

View File

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

View File

@ -368,13 +368,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
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:
dependency: "direct main"
description:
@ -572,6 +565,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
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:
dependency: transitive
description:
@ -779,14 +779,14 @@ packages:
name: package_info_plus
url: "https://pub.dartlang.org"
source: hosted
version: "1.4.0"
version: "1.4.2"
package_info_plus_linux:
dependency: transitive
description:
name: package_info_plus_linux
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.3"
version: "1.0.5"
package_info_plus_macos:
dependency: transitive
description:
@ -807,14 +807,14 @@ packages:
name: package_info_plus_web
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.4"
version: "1.0.5"
package_info_plus_windows:
dependency: transitive
description:
name: package_info_plus_windows
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.4"
version: "1.0.5"
path:
dependency: transitive
description:
@ -1295,6 +1295,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
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:
dependency: "direct main"
description:

View File

@ -25,7 +25,6 @@ dependencies:
confirm_dialog: ^1.0.0
crypto: ^3.0.1
fast_base58: ^0.2.0
flutter_launcher_icons: ^0.9.2
flutter_lints: ^1.0.4
flutter_logs: ^2.1.4
flutter_svg: ^0.22.0
@ -71,7 +70,7 @@ dependencies:
dio: ^4.0.4
desktop_window: ^0.4.0
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
# path: ../substrate-sdk
git:
@ -79,13 +78,13 @@ dependencies:
ref: fixAndroidActivityVersion
flutter_icons:
android: "ic_launcher"
android: true
ios: true
image_path: "assets/icon/gecko_flat.png"
cupertino_icons: ^1.0.0
remove_alpha_ios: true
dev_dependencies:
icons_launcher: ^1.1.3
build_runner: ^2.1.2
flutter_test:
sdk: flutter