add current bloc number in settings; remove Substrate debug menu
This commit is contained in:
parent
10eeeba601
commit
f44dd4aa76
|
@ -20,7 +20,6 @@ import 'package:gecko/screens/onBoarding/1.dart';
|
||||||
import 'package:gecko/screens/search.dart';
|
import 'package:gecko/screens/search.dart';
|
||||||
import 'package:gecko/screens/settings.dart';
|
import 'package:gecko/screens/settings.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:gecko/screens/substrate_sandbox.dart';
|
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
class HomeScreen extends StatelessWidget {
|
class HomeScreen extends StatelessWidget {
|
||||||
|
@ -74,19 +73,19 @@ class HomeScreen extends StatelessWidget {
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
ListTile(
|
// ListTile(
|
||||||
key: const Key('substrateSandbox'),
|
// key: const Key('substrateSandbox'),
|
||||||
title: const Text('Substrate debug'),
|
// title: const Text('Substrate debug'),
|
||||||
onTap: () {
|
// onTap: () {
|
||||||
Navigator.pop(context);
|
// Navigator.pop(context);
|
||||||
Navigator.push(
|
// Navigator.push(
|
||||||
context,
|
// context,
|
||||||
MaterialPageRoute(builder: (context) {
|
// MaterialPageRoute(builder: (context) {
|
||||||
return const SubstrateSandBox();
|
// return const SubstrateSandBox();
|
||||||
}),
|
// }),
|
||||||
);
|
// );
|
||||||
},
|
// },
|
||||||
),
|
// ),
|
||||||
|
|
||||||
// ListTile(
|
// ListTile(
|
||||||
// title: const Text('A propos'),
|
// title: const Text('A propos'),
|
||||||
|
|
|
@ -194,23 +194,32 @@ class SettingsScreen extends StatelessWidget {
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
Consumer<SubstrateSdk>(builder: (context, _sub, _) {
|
Consumer<SubstrateSdk>(builder: (context, _sub, _) {
|
||||||
return Consumer<SettingsProvider>(builder: (context, _set, _) {
|
return Column(
|
||||||
return Visibility(
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
visible: selectedDuniterEndpoint == 'Auto',
|
children: [
|
||||||
child: SizedBox(
|
Consumer<SettingsProvider>(builder: (context, _set, _) {
|
||||||
width: 250,
|
return Visibility(
|
||||||
height: _sub.getConnectedEndpoint() == null ? 60 : 20,
|
visible: selectedDuniterEndpoint == 'Auto',
|
||||||
child: Text(
|
child: SizedBox(
|
||||||
_sub.getConnectedEndpoint() ??
|
width: 250,
|
||||||
"Un noeud sûr et valide sera choisi automatiquement parmis une liste aléatoire.",
|
height: _sub.getConnectedEndpoint() == null ? 60 : 20,
|
||||||
style: TextStyle(
|
child: Text(
|
||||||
fontSize: 15,
|
_sub.getConnectedEndpoint() ??
|
||||||
fontStyle: FontStyle.italic,
|
"Un noeud sûr et valide sera choisi automatiquement parmis une liste aléatoire.",
|
||||||
color: Colors.grey[700]),
|
style: TextStyle(
|
||||||
),
|
fontSize: 15,
|
||||||
),
|
fontStyle: FontStyle.italic,
|
||||||
);
|
color: Colors.grey[700]),
|
||||||
});
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}),
|
||||||
|
Text(
|
||||||
|
'bloc N°${_sub.blocNumber}',
|
||||||
|
style: TextStyle(fontSize: 14, color: Colors.grey[700]),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
);
|
||||||
}),
|
}),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue