forked from axiom-team/gecko
Check network state, try to reconnect if network up, display message if offline
This commit is contained in:
parent
29505ad1be
commit
7c11146278
|
@ -27,7 +27,7 @@ class HomeProvider with ChangeNotifier {
|
|||
Widget appBarTitle = Text('Ğecko', style: TextStyle(color: Colors.grey[850]));
|
||||
Widget appBarExplorer =
|
||||
Text('Explorateur', style: TextStyle(color: Colors.grey[850]));
|
||||
String homeMessage = "y'a pas de lézard ;-)";
|
||||
String homeMessage = "Chargement en cours ...";
|
||||
String defaultMessage = "y'a pas de lézard ;-)";
|
||||
|
||||
Future<void> initHive() async {
|
||||
|
|
|
@ -50,6 +50,12 @@ class SubstrateSdk with ChangeNotifier {
|
|||
List<NetworkParams> node = [];
|
||||
HomeProvider _homeProvider = Provider.of<HomeProvider>(ctx, listen: false);
|
||||
|
||||
// var connectivityResult = await (Connectivity().checkConnectivity());
|
||||
// if (connectivityResult == ConnectivityResult.mobile ||
|
||||
// connectivityResult == ConnectivityResult.wifi) {
|
||||
// _homeProvider.changeMessage("Vous n'êtes pas connecté à internet", 0);
|
||||
// return;
|
||||
// }
|
||||
_homeProvider.changeMessage("Connexion en cours...", 0);
|
||||
|
||||
for (String _endpoint in configBox.get('endpoint')) {
|
||||
|
@ -100,12 +106,17 @@ class SubstrateSdk with ChangeNotifier {
|
|||
// Subscribe bloc number
|
||||
sdk.api.setting.subscribeBestNumber((res) {
|
||||
blocNumber = int.parse(res.toString());
|
||||
// log.d(sdk.api.connectedNode?.endpoint);
|
||||
if (sdk.api.connectedNode?.endpoint == null) {
|
||||
nodeConnected = false;
|
||||
_homeProvider.changeMessage("Le réseau a été perdu...", 0);
|
||||
} else {
|
||||
nodeConnected = true;
|
||||
}
|
||||
|
||||
notifyListeners();
|
||||
});
|
||||
|
||||
// currencyName = await getCurencyName();
|
||||
notifyListeners();
|
||||
_homeProvider.changeMessage(
|
||||
|
@ -250,9 +261,12 @@ class SubstrateSdk with ChangeNotifier {
|
|||
|
||||
Future<double> getBalance(String address, {bool isUd = false}) async {
|
||||
double balance = 0.0;
|
||||
// log.d('nodeConnected: ' + nodeConnected.toString());
|
||||
if (nodeConnected) {
|
||||
final brutBalance = await sdk.api.account.queryBalance(address);
|
||||
balance = int.parse(brutBalance!.freeBalance) / 100;
|
||||
} else {
|
||||
balance = -1;
|
||||
}
|
||||
return balance;
|
||||
}
|
||||
|
|
|
@ -318,7 +318,8 @@ class WalletOptionsProvider with ChangeNotifier {
|
|||
Map<String, double> balanceCache = {};
|
||||
|
||||
Widget balance(BuildContext context, String address, double size,
|
||||
[Color _color = Colors.black]) {
|
||||
[Color _color = Colors.black,
|
||||
Color _loadingColor = const Color(0xffd07316)]) {
|
||||
return Column(children: <Widget>[
|
||||
Consumer<SubstrateSdk>(builder: (context, _sdk, _) {
|
||||
return FutureBuilder(
|
||||
|
@ -326,7 +327,8 @@ Widget balance(BuildContext context, String address, double size,
|
|||
builder: (BuildContext context, AsyncSnapshot<double> _balance) {
|
||||
if (_balance.connectionState != ConnectionState.done ||
|
||||
_balance.hasError) {
|
||||
if (balanceCache[address] != null) {
|
||||
if (balanceCache[address] != null &&
|
||||
balanceCache[address] != -1) {
|
||||
return Text(
|
||||
"${balanceCache[address]!.toString()} $currencyName",
|
||||
style: TextStyle(
|
||||
|
@ -336,20 +338,24 @@ Widget balance(BuildContext context, String address, double size,
|
|||
height: 15,
|
||||
width: 15,
|
||||
child: CircularProgressIndicator(
|
||||
color: orangeC,
|
||||
color: _loadingColor,
|
||||
strokeWidth: 2,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
balanceCache[address] = _balance.data!;
|
||||
return Text(
|
||||
"${balanceCache[address]!.toString()} $currencyName",
|
||||
style: TextStyle(
|
||||
fontSize: isTall ? size : size * 0.9,
|
||||
color: _color,
|
||||
),
|
||||
);
|
||||
if (balanceCache[address] != -1) {
|
||||
return Text(
|
||||
"${balanceCache[address]!.toString()} $currencyName",
|
||||
style: TextStyle(
|
||||
fontSize: isTall ? size : size * 0.9,
|
||||
color: _color,
|
||||
),
|
||||
);
|
||||
} else {
|
||||
return const Text('');
|
||||
}
|
||||
});
|
||||
}),
|
||||
]);
|
||||
|
@ -362,9 +368,9 @@ Widget getCerts(BuildContext context, String address, double size,
|
|||
return FutureBuilder(
|
||||
future: _sdk.getCerts(address),
|
||||
builder: (BuildContext context, AsyncSnapshot<List<int>> _certs) {
|
||||
// log.d(_certs.data);
|
||||
log.d(_certs.data);
|
||||
|
||||
return _certs.data?[0] != 0
|
||||
return _certs.data?[0] != 0 && _certs.data != null
|
||||
? Row(
|
||||
children: [
|
||||
Image.asset('assets/medal.png', height: 20),
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
import 'package:dots_indicator/dots_indicator.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gecko/globals.dart';
|
||||
import 'package:gecko/providers/substrate_sdk.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class CommonElements {
|
||||
// Exemple de Widget
|
||||
|
@ -145,6 +147,33 @@ class CommonElements {
|
|||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget offlineInfo(BuildContext context) {
|
||||
// SubstrateSdk _sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||
final double screenWidth = MediaQuery.of(context).size.width;
|
||||
return Consumer<SubstrateSdk>(builder: (context, _sub, _) {
|
||||
return Visibility(
|
||||
visible: !_sub.nodeConnected,
|
||||
child: Positioned(
|
||||
top: 0,
|
||||
child: Container(
|
||||
height: 30,
|
||||
width: screenWidth,
|
||||
color: Colors.grey[800],
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
"Vous êtes hors ligne...",
|
||||
style: TextStyle(color: Colors.grey[50]),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
],
|
||||
)),
|
||||
),
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
class SmoothTransition extends PageRouteBuilder {
|
||||
|
@ -277,6 +306,7 @@ Future<void> infoPopup(BuildContext context, String title) async {
|
|||
);
|
||||
}
|
||||
|
||||
|
||||
// Widget geckoAppBar() {
|
||||
// return AppBar(
|
||||
// toolbarHeight: 60 * ratio,
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import 'package:bubble/bubble.dart';
|
||||
import 'package:connectivity_plus/connectivity_plus.dart';
|
||||
import 'package:gecko/globals.dart';
|
||||
import 'package:gecko/models/stateful_wrapper.dart';
|
||||
import 'package:gecko/providers/chest_provider.dart';
|
||||
|
@ -118,7 +119,24 @@ class HomeScreen extends StatelessWidget {
|
|||
_myWalletProvider.rebuildWidget();
|
||||
}
|
||||
|
||||
await _sub.connectNode(ctx); //kopa
|
||||
var connectivityResult =
|
||||
await (Connectivity().checkConnectivity());
|
||||
if (connectivityResult != ConnectivityResult.mobile &&
|
||||
connectivityResult != ConnectivityResult.wifi) {
|
||||
HomeProvider _homeProvider =
|
||||
Provider.of<HomeProvider>(ctx, listen: false);
|
||||
_homeProvider.changeMessage(
|
||||
"Vous n'êtes pas connecté à internet", 0);
|
||||
_sub.nodeConnected = false;
|
||||
}
|
||||
|
||||
Connectivity()
|
||||
.onConnectivityChanged
|
||||
.listen((ConnectivityResult result) async {
|
||||
log.d('Network changed: $result');
|
||||
|
||||
await _sub.connectNode(ctx);
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
|
@ -20,6 +20,7 @@ class UnlockingWallet extends StatelessWidget {
|
|||
WalletData? wallet;
|
||||
late int currentChestNumber;
|
||||
late ChestData currentChest;
|
||||
bool canUnlock = true;
|
||||
|
||||
// ignore: close_sinks
|
||||
StreamController<ErrorAnimationType>? errorController;
|
||||
|
@ -101,52 +102,54 @@ class UnlockingWallet extends StatelessWidget {
|
|||
SizedBox(height: 40 * ratio),
|
||||
pinForm(context, _pinLenght),
|
||||
SizedBox(height: 3 * ratio),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
_walletOptions.changePinCacheChoice();
|
||||
},
|
||||
child: Row(children: [
|
||||
const SizedBox(height: 30),
|
||||
const Spacer(),
|
||||
Icon(
|
||||
configBox.get('isCacheChecked')
|
||||
? Icons.check_box
|
||||
: Icons.check_box_outline_blank,
|
||||
color: orangeC,
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
'Garder ce code en mémoire 15 minutes',
|
||||
style:
|
||||
TextStyle(fontSize: 16, color: Colors.grey[700]),
|
||||
),
|
||||
const Spacer()
|
||||
]),
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
InkWell(
|
||||
key: const Key('chooseChest'),
|
||||
if (canUnlock)
|
||||
InkWell(
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) {
|
||||
return const ChooseChest();
|
||||
}),
|
||||
);
|
||||
_walletOptions.changePinCacheChoice();
|
||||
},
|
||||
child: SizedBox(
|
||||
width: 400,
|
||||
height: 50,
|
||||
child: Center(
|
||||
child: Text(
|
||||
'Changer de coffre',
|
||||
style: TextStyle(
|
||||
fontSize: 22,
|
||||
color: orangeC,
|
||||
fontWeight: FontWeight.w600),
|
||||
),
|
||||
child: Row(children: [
|
||||
const SizedBox(height: 30),
|
||||
const Spacer(),
|
||||
Icon(
|
||||
configBox.get('isCacheChecked')
|
||||
? Icons.check_box
|
||||
: Icons.check_box_outline_blank,
|
||||
color: orangeC,
|
||||
),
|
||||
)),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
'Garder ce code en mémoire 15 minutes',
|
||||
style: TextStyle(
|
||||
fontSize: 16, color: Colors.grey[700]),
|
||||
),
|
||||
const Spacer()
|
||||
]),
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
if (canUnlock)
|
||||
InkWell(
|
||||
key: const Key('chooseChest'),
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) {
|
||||
return const ChooseChest();
|
||||
}),
|
||||
);
|
||||
},
|
||||
child: SizedBox(
|
||||
width: 400,
|
||||
height: 50,
|
||||
child: Center(
|
||||
child: Text(
|
||||
'Changer de coffre',
|
||||
style: TextStyle(
|
||||
fontSize: 22,
|
||||
color: orangeC,
|
||||
fontWeight: FontWeight.w600),
|
||||
),
|
||||
),
|
||||
)),
|
||||
]),
|
||||
]),
|
||||
]),
|
||||
|
@ -164,11 +167,21 @@ class UnlockingWallet extends StatelessWidget {
|
|||
MyWalletsProvider _myWalletProvider =
|
||||
Provider.of<MyWalletsProvider>(context);
|
||||
SubstrateSdk _sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||
|
||||
WalletData? defaultWallet = _myWalletProvider.getDefaultWallet();
|
||||
|
||||
FocusNode pinFocus = FocusNode();
|
||||
|
||||
WalletData defaultWallet = _myWalletProvider.getDefaultWallet();
|
||||
|
||||
// defaultWallet.address = null;
|
||||
if (defaultWallet.address == null) {
|
||||
canUnlock = false;
|
||||
return Text(
|
||||
'Impossible de retrouver votre\nportefeuille par défaut.\nID: ${defaultWallet.id()}',
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(
|
||||
color: Colors.redAccent, fontWeight: FontWeight.w500),
|
||||
);
|
||||
}
|
||||
|
||||
return Form(
|
||||
key: formKey,
|
||||
child: Padding(
|
||||
|
|
|
@ -8,6 +8,7 @@ import 'package:gecko/models/wallet_data.dart';
|
|||
import 'package:gecko/providers/substrate_sdk.dart';
|
||||
import 'package:gecko/providers/wallet_options.dart';
|
||||
import 'package:gecko/providers/wallets_profiles.dart';
|
||||
import 'package:gecko/screens/common_elements.dart';
|
||||
import 'package:gecko/screens/myWallets/manage_membership.dart';
|
||||
import 'package:gecko/screens/qrcode_fullscreen.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
@ -70,122 +71,127 @@ class WalletOptions extends StatelessWidget {
|
|||
),
|
||||
),
|
||||
bottomNavigationBar: _homeProvider.bottomAppBar(context),
|
||||
body: Builder(
|
||||
builder: (ctx) => SafeArea(
|
||||
child: Column(children: <Widget>[
|
||||
Container(
|
||||
height: isTall ? 5 : 0,
|
||||
color: yellowC,
|
||||
),
|
||||
Consumer<WalletOptionsProvider>(
|
||||
builder: (context, walletProvider, _) {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
colors: [
|
||||
yellowC,
|
||||
backgroundColor,
|
||||
],
|
||||
)),
|
||||
child: Row(
|
||||
// mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: <Widget>[
|
||||
const Spacer(flex: 1),
|
||||
avatar(walletProvider),
|
||||
const Spacer(flex: 1),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
walletName(walletProvider, _walletOptions),
|
||||
SizedBox(height: isTall ? 5 : 0),
|
||||
// SizedBox(height: isTall ? 5 : 0),
|
||||
balance(context, walletProvider.address.text, 21),
|
||||
const SizedBox(width: 30),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
_walletOptions.idtyStatus(
|
||||
context, _walletOptions.address.text,
|
||||
isOwner: true, color: orangeC),
|
||||
getCerts(context,
|
||||
walletProvider.address.text, 15),
|
||||
]),
|
||||
SizedBox(height: 10 * ratio),
|
||||
]),
|
||||
const Spacer(flex: 2),
|
||||
]),
|
||||
);
|
||||
}),
|
||||
Expanded(
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
InkWell(
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) {
|
||||
return QrCodeFullscreen(
|
||||
_walletOptions.address.text,
|
||||
);
|
||||
}),
|
||||
);
|
||||
},
|
||||
child: QrImageWidget(
|
||||
data: _walletOptions.address.text,
|
||||
version: QrVersions.auto,
|
||||
size: isTall ? 150 : 80,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 15 * ratio),
|
||||
Consumer<WalletOptionsProvider>(
|
||||
builder: (context, walletProvider, _) {
|
||||
return Column(children: [
|
||||
pubkeyWidget(walletProvider, ctx),
|
||||
SizedBox(height: 10 * ratio),
|
||||
historyWidget(
|
||||
context, _historyProvider, walletProvider),
|
||||
SizedBox(height: 12 * ratio),
|
||||
setDefaultWalletWidget(
|
||||
context,
|
||||
walletProvider,
|
||||
_myWalletProvider,
|
||||
_walletOptions,
|
||||
_currentChest),
|
||||
SizedBox(height: 17 * ratio),
|
||||
// walletProvider.isMember(context, _walletOptions.address.text)
|
||||
FutureBuilder(
|
||||
future: walletProvider.isMember(
|
||||
context, _walletOptions.address.text),
|
||||
builder: (BuildContext context,
|
||||
AsyncSnapshot<bool> _isMember) {
|
||||
if (_isMember.connectionState !=
|
||||
ConnectionState.done ||
|
||||
_isMember.hasError) {
|
||||
return const Text('');
|
||||
}
|
||||
return Column(children: [
|
||||
if (!walletProvider.isDefaultWallet &&
|
||||
!_isMember.data!)
|
||||
deleteWallet(context, walletProvider,
|
||||
_currentChest)
|
||||
else
|
||||
const SizedBox(),
|
||||
if (_isMember.data!)
|
||||
manageMemberStatus(context)
|
||||
]);
|
||||
}),
|
||||
]);
|
||||
}),
|
||||
]),
|
||||
body: Stack(children: [
|
||||
Builder(
|
||||
builder: (ctx) => SafeArea(
|
||||
child: Column(children: <Widget>[
|
||||
Container(
|
||||
height: isTall ? 5 : 0,
|
||||
color: yellowC,
|
||||
),
|
||||
),
|
||||
]),
|
||||
Consumer<WalletOptionsProvider>(
|
||||
builder: (context, walletProvider, _) {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
colors: [
|
||||
yellowC,
|
||||
backgroundColor,
|
||||
],
|
||||
)),
|
||||
child: Row(
|
||||
// mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: <Widget>[
|
||||
const Spacer(flex: 1),
|
||||
avatar(walletProvider),
|
||||
const Spacer(flex: 1),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
walletName(walletProvider, _walletOptions),
|
||||
SizedBox(height: isTall ? 5 : 0),
|
||||
// SizedBox(height: isTall ? 5 : 0),
|
||||
balance(
|
||||
context, walletProvider.address.text, 21),
|
||||
const SizedBox(width: 30),
|
||||
Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.center,
|
||||
children: [
|
||||
_walletOptions.idtyStatus(
|
||||
context, _walletOptions.address.text,
|
||||
isOwner: true, color: orangeC),
|
||||
getCerts(context,
|
||||
walletProvider.address.text, 15),
|
||||
]),
|
||||
SizedBox(height: 10 * ratio),
|
||||
]),
|
||||
const Spacer(flex: 2),
|
||||
]),
|
||||
);
|
||||
}),
|
||||
Expanded(
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
InkWell(
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) {
|
||||
return QrCodeFullscreen(
|
||||
_walletOptions.address.text,
|
||||
);
|
||||
}),
|
||||
);
|
||||
},
|
||||
child: QrImageWidget(
|
||||
data: _walletOptions.address.text,
|
||||
version: QrVersions.auto,
|
||||
size: isTall ? 150 : 80,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 15 * ratio),
|
||||
Consumer<WalletOptionsProvider>(
|
||||
builder: (context, walletProvider, _) {
|
||||
return Column(children: [
|
||||
pubkeyWidget(walletProvider, ctx),
|
||||
SizedBox(height: 10 * ratio),
|
||||
historyWidget(
|
||||
context, _historyProvider, walletProvider),
|
||||
SizedBox(height: 12 * ratio),
|
||||
setDefaultWalletWidget(
|
||||
context,
|
||||
walletProvider,
|
||||
_myWalletProvider,
|
||||
_walletOptions,
|
||||
_currentChest),
|
||||
SizedBox(height: 17 * ratio),
|
||||
// walletProvider.isMember(context, _walletOptions.address.text)
|
||||
FutureBuilder(
|
||||
future: walletProvider.isMember(
|
||||
context, _walletOptions.address.text),
|
||||
builder: (BuildContext context,
|
||||
AsyncSnapshot<bool> _isMember) {
|
||||
if (_isMember.connectionState !=
|
||||
ConnectionState.done ||
|
||||
_isMember.hasError) {
|
||||
return const Text('');
|
||||
}
|
||||
return Column(children: [
|
||||
if (!walletProvider.isDefaultWallet &&
|
||||
!_isMember.data!)
|
||||
deleteWallet(context, walletProvider,
|
||||
_currentChest)
|
||||
else
|
||||
const SizedBox(),
|
||||
if (_isMember.data!)
|
||||
manageMemberStatus(context)
|
||||
]);
|
||||
}),
|
||||
]);
|
||||
}),
|
||||
]),
|
||||
),
|
||||
),
|
||||
]),
|
||||
),
|
||||
),
|
||||
),
|
||||
CommonElements().offlineInfo(context),
|
||||
]),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
@ -501,7 +507,7 @@ class WalletOptions extends StatelessWidget {
|
|||
return const Text('');
|
||||
}
|
||||
final double _balance =
|
||||
balanceCache[walletProvider.address.text] ?? 0;
|
||||
balanceCache[walletProvider.address.text] ?? -1;
|
||||
final bool canDelete = !isDefaultWallet &&
|
||||
!_hasConsumers.data! &&
|
||||
(_balance > 2 || _balance == 0);
|
||||
|
|
|
@ -61,7 +61,12 @@ class WalletsHome extends StatelessWidget {
|
|||
),
|
||||
bottomNavigationBar: _homeProvider.bottomAppBar(context),
|
||||
body: SafeArea(
|
||||
child: myWalletsTiles(context, _currentChestNumber!),
|
||||
child: Stack(
|
||||
children: [
|
||||
myWalletsTiles(context, _currentChestNumber!),
|
||||
CommonElements().offlineInfo(context),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
@ -322,7 +327,11 @@ class WalletsHome extends StatelessWidget {
|
|||
// style: TextStyle(color: isDefault ? Colors.white : Colors.black),
|
||||
// ),
|
||||
balance(
|
||||
context, _address, 15, isDefault ? Colors.white : Colors.black)
|
||||
context,
|
||||
_address,
|
||||
15,
|
||||
isDefault ? Colors.white : Colors.black,
|
||||
isDefault ? yellowC : orangeC)
|
||||
]),
|
||||
),
|
||||
);
|
||||
|
|
|
@ -3,6 +3,7 @@ import 'package:gecko/globals.dart';
|
|||
import 'package:flutter/material.dart';
|
||||
// import 'package:gecko/providers/home.dart';
|
||||
import 'package:gecko/providers/search.dart';
|
||||
import 'package:gecko/screens/common_elements.dart';
|
||||
import 'package:gecko/screens/search_result.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
// import 'package:gecko/models/home.dart';
|
||||
|
@ -44,6 +45,7 @@ class SearchScreen extends StatelessWidget {
|
|||
// bottomNavigationBar: _homeProvider.bottomAppBar(context),
|
||||
body: SafeArea(
|
||||
child: Column(children: <Widget>[
|
||||
CommonElements().offlineInfo(context),
|
||||
SizedBox(height: isTall ? 200 : 100),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 17),
|
||||
|
|
|
@ -8,6 +8,7 @@ import 'package:gecko/providers/substrate_sdk.dart';
|
|||
import 'package:gecko/providers/wallet_options.dart';
|
||||
import 'package:gecko/providers/wallets_profiles.dart';
|
||||
import 'package:gecko/providers/search.dart';
|
||||
import 'package:gecko/screens/common_elements.dart';
|
||||
import 'package:gecko/screens/wallet_view.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
|
@ -46,6 +47,7 @@ class SearchResultScreen extends StatelessWidget {
|
|||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
CommonElements().offlineInfo(context),
|
||||
const SizedBox(height: 30),
|
||||
RichText(
|
||||
text: TextSpan(
|
||||
|
|
|
@ -898,6 +898,7 @@ class WalletViewScreen extends StatelessWidget {
|
|||
]),
|
||||
]),
|
||||
),
|
||||
CommonElements().offlineInfo(context),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -205,12 +205,12 @@ packages:
|
|||
source: hosted
|
||||
version: "1.0.1"
|
||||
connectivity_plus:
|
||||
dependency: transitive
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: connectivity_plus
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.3.2"
|
||||
version: "2.3.3"
|
||||
connectivity_plus_linux:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -224,7 +224,7 @@ packages:
|
|||
name: connectivity_plus_macos
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.2.2"
|
||||
version: "1.2.3"
|
||||
connectivity_plus_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -245,7 +245,7 @@ packages:
|
|||
name: connectivity_plus_windows
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.2.1"
|
||||
version: "1.2.2"
|
||||
convert:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
|
@ -70,6 +70,7 @@ dependencies:
|
|||
ref: gecko-work
|
||||
dots_indicator: ^2.1.0
|
||||
web_socket_channel: ^2.2.0
|
||||
connectivity_plus: ^2.3.3
|
||||
|
||||
dev_dependencies:
|
||||
# flutter_launcher_icons: ^0.9.2
|
||||
|
|
Loading…
Reference in New Issue