Cesium+ Pod in global variable; Fix 2 bugs in walletOptions

This commit is contained in:
poka 2021-03-28 21:37:12 +02:00
parent 3c3f0f2280
commit 687e14de3f
5 changed files with 11 additions and 4 deletions

View File

@ -13,6 +13,8 @@ SharedPreferences prefs;
String endPointGVA;
int ramSys;
String cesiumPod = "https://g1.data.le-sou.org";
// Responsive ratios
bool isTall;
double ratio;

View File

@ -51,7 +51,7 @@ class CesiumPlusProvider with ChangeNotifier {
"indices_boost": {"user": 100, "page": 1, "group": 0.01}
});
String cesiumPod = "https://g1.data.le-sou.org";
String requestUrl = "/user,page,group/profile,record/_search";
String podRequest = cesiumPod + requestUrl;

View File

@ -62,3 +62,4 @@ const String getBalance = r'''
}
}
''';

View File

@ -144,7 +144,7 @@ class UnlockingWallet extends StatelessWidget {
pinColor = Colors.green[400];
// await Future.delayed(Duration(milliseconds: 50));
Navigator.push(
context,
formKey.currentContext,
SmoothTransition(
page: WalletOptions(
walletNbr: walletNbr,

View File

@ -12,7 +12,7 @@ import 'package:provider/provider.dart';
import 'package:flutter/services.dart';
// ignore: must_be_immutable
class WalletOptions extends StatelessWidget with ChangeNotifier {
class WalletOptions extends StatelessWidget {
WalletOptions(
{Key keyMyWallets,
@required this.walletNbr,
@ -160,7 +160,7 @@ class WalletOptions extends StatelessWidget with ChangeNotifier {
variables: {
'pubkey': _walletOptions.pubkey.text,
},
pollInterval: Duration(seconds: 1),
// pollInterval: Duration(seconds: 1),
),
builder: (QueryResult result,
{VoidCallback refetch, FetchMore fetchMore}) {
@ -171,6 +171,10 @@ class WalletOptions extends StatelessWidget with ChangeNotifier {
if (result.isLoading) {
return Text('Loading');
}
// TODO: catch links errors
print(result);
// List repositories = result.data['viewer']['repositories']['nodes'];
String wBalanceUD;
if (result.data['balance'] == null) {