fix: show no data message if history profile is empty

This commit is contained in:
poka 2022-07-08 23:23:05 +02:00
parent d25ad55b02
commit 39d87c765a
11 changed files with 65 additions and 10 deletions

View File

@ -1,10 +1,30 @@
# This file tracks properties of this Flutter project. # This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc. # Used by Flutter tool to assess capabilities and perform upgrades etc.
# #
# This file should be version controlled and should not be manually edited. # This file should be version controlled.
version: version:
revision: 1aafb3a8b9b0c36241c5f5b34ee914770f015818 revision: 85684f9300908116a78138ea4c6036c35c9a1236
channel: stable channel: stable
project_type: app project_type: app
# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: 85684f9300908116a78138ea4c6036c35c9a1236
base_revision: 85684f9300908116a78138ea4c6036c35c9a1236
- platform: android
create_revision: 85684f9300908116a78138ea4c6036c35c9a1236
base_revision: 85684f9300908116a78138ea4c6036c35c9a1236
# User provided section
# List of Local paths (relative to this file) that should be
# ignored by the migrate tool.
#
# Files that are not part of the templates will be ignored by default.
unmanaged_files:
- 'lib/main.dart'
- 'ios/Runner.xcodeproj/project.pbxproj'

View File

@ -0,0 +1,6 @@
package gecko.axiomteam.gecko
import io.flutter.embedding.android.FlutterActivity
class MainActivity: FlutterActivity() {
}

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="?android:colorBackground" />
<!-- You can insert your own image assets here -->
<!-- <item>
<bitmap
android:gravity="center"
android:src="@mipmap/launch_image" />
</item> -->
</layer-list>

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
the Flutter engine draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
Flutter UI initializes, as well as behind your Flutter UI while its
running.
This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item>
</style>
</resources>

View File

@ -109,7 +109,7 @@
"accountActivity": "Account activity", "accountActivity": "Account activity",
"noNetworkNoHistory": "Network state does not allow\nto display account history", "noNetworkNoHistory": "Network state does not allow\nto display account history",
"noDataToDisplay": "No data to be displayed.", "noDataToDisplay": "No data to be displayed.",
"noTranscationToDisplay": "No transaction to display", "noTransactionToDisplay": "No transaction to display",
"month1": "January", "month1": "January",
"month2": "February", "month2": "February",
"month3": "March", "month3": "March",

View File

@ -109,7 +109,7 @@
"accountActivity": "Account activity", "accountActivity": "Account activity",
"noNetworkNoHistory": "Network state does not allow\nto display account history", "noNetworkNoHistory": "Network state does not allow\nto display account history",
"noDataToDisplay": "No data to be displayed.", "noDataToDisplay": "No data to be displayed.",
"noTranscationToDisplay": "No transaction to display", "noTransactionToDisplay": "No transaction to display",
"month1": "January", "month1": "January",
"month2": "February", "month2": "February",
"month3": "March", "month3": "March",

View File

@ -110,7 +110,7 @@
"accountActivity": "Activité du compte", "accountActivity": "Activité du compte",
"noNetworkNoHistory": "L'état du réseau ne permet pas\nd'afficher l'historique du compte", "noNetworkNoHistory": "L'état du réseau ne permet pas\nd'afficher l'historique du compte",
"noDataToDisplay": "Aucune donnée à afficher.", "noDataToDisplay": "Aucune donnée à afficher.",
"noTranscationToDisplay": "Aucune transaction à afficher", "noTransactionToDisplay": "Aucune transaction à afficher",
"month1": "Janvier", "month1": "Janvier",
"month2": "Février", "month2": "Février",
"month3": "Mars", "month3": "Mars",

View File

@ -106,7 +106,7 @@ Future<void> main() async {
}, },
appRunner: () => runApp( appRunner: () => runApp(
EasyLocalization( EasyLocalization(
supportedLocales: const [Locale('en'), Locale('fr')], supportedLocales: const [Locale('en'), Locale('fr'), Locale('es')],
path: 'assets/translations', path: 'assets/translations',
fallbackLocale: const Locale('en'), fallbackLocale: const Locale('en'),
child: Gecko(indexerEndpoint), child: Gecko(indexerEndpoint),

View File

@ -369,7 +369,6 @@ class GenerateWalletsProvider with ChangeNotifier {
Future<bool> scanDerivations(BuildContext context, Future<bool> scanDerivations(BuildContext context,
{int numberScan = 20}) async { {int numberScan = 20}) async {
SubstrateSdk _sub = Provider.of<SubstrateSdk>(context, listen: false); SubstrateSdk _sub = Provider.of<SubstrateSdk>(context, listen: false);
final ss58 = _sub.ss58;
final currentChestNumber = configBox.get('currentChest'); final currentChestNumber = configBox.get('currentChest');
bool isAlive = false; bool isAlive = false;
scanedWalletNumber = 0; scanedWalletNumber = 0;

View File

@ -19,8 +19,6 @@ import 'package:truncate/truncate.dart';
// import 'package:web_socket_channel/io.dart'; // import 'package:web_socket_channel/io.dart';
class SubstrateSdk with ChangeNotifier { class SubstrateSdk with ChangeNotifier {
final int ss58 = 42;
final WalletSDK sdk = WalletSDK(); final WalletSDK sdk = WalletSDK();
final Keyring keyring = Keyring(); final Keyring keyring = Keyring();
String generatedMnemonic = ''; String generatedMnemonic = '';
@ -262,6 +260,7 @@ class SubstrateSdk with ChangeNotifier {
Future<double> getBalance(String address, {bool isUd = false}) async { Future<double> getBalance(String address, {bool isUd = false}) async {
double balance = 0.0; double balance = 0.0;
// log.d('nodeConnected: ' + nodeConnected.toString()); // log.d('nodeConnected: ' + nodeConnected.toString());
if (nodeConnected) { if (nodeConnected) {
final brutBalance = await sdk.api.account.queryBalance(address); final brutBalance = await sdk.api.account.queryBalance(address);

View File

@ -111,7 +111,8 @@ class ActivityScreen extends StatelessWidget with ChangeNotifier {
style: const TextStyle(fontSize: 18), style: const TextStyle(fontSize: 18),
) )
]); ]);
} else if (result.data == null) { } else if (result
.data?['transaction_connection']?['edges'].isEmpty) {
return Column(children: <Widget>[ return Column(children: <Widget>[
const SizedBox(height: 50), const SizedBox(height: 50),
Text( Text(