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/settings.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:gecko/screens/substrate_sandbox.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class HomeScreen extends StatelessWidget {
|
||||
|
@ -74,19 +73,19 @@ class HomeScreen extends StatelessWidget {
|
|||
);
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
key: const Key('substrateSandbox'),
|
||||
title: const Text('Substrate debug'),
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) {
|
||||
return const SubstrateSandBox();
|
||||
}),
|
||||
);
|
||||
},
|
||||
),
|
||||
// ListTile(
|
||||
// key: const Key('substrateSandbox'),
|
||||
// title: const Text('Substrate debug'),
|
||||
// onTap: () {
|
||||
// Navigator.pop(context);
|
||||
// Navigator.push(
|
||||
// context,
|
||||
// MaterialPageRoute(builder: (context) {
|
||||
// return const SubstrateSandBox();
|
||||
// }),
|
||||
// );
|
||||
// },
|
||||
// ),
|
||||
|
||||
// ListTile(
|
||||
// title: const Text('A propos'),
|
||||
|
|
|
@ -194,23 +194,32 @@ class SettingsScreen extends StatelessWidget {
|
|||
);
|
||||
}),
|
||||
Consumer<SubstrateSdk>(builder: (context, _sub, _) {
|
||||
return Consumer<SettingsProvider>(builder: (context, _set, _) {
|
||||
return Visibility(
|
||||
visible: selectedDuniterEndpoint == 'Auto',
|
||||
child: SizedBox(
|
||||
width: 250,
|
||||
height: _sub.getConnectedEndpoint() == null ? 60 : 20,
|
||||
child: Text(
|
||||
_sub.getConnectedEndpoint() ??
|
||||
"Un noeud sûr et valide sera choisi automatiquement parmis une liste aléatoire.",
|
||||
style: TextStyle(
|
||||
fontSize: 15,
|
||||
fontStyle: FontStyle.italic,
|
||||
color: Colors.grey[700]),
|
||||
),
|
||||
),
|
||||
);
|
||||
});
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Consumer<SettingsProvider>(builder: (context, _set, _) {
|
||||
return Visibility(
|
||||
visible: selectedDuniterEndpoint == 'Auto',
|
||||
child: SizedBox(
|
||||
width: 250,
|
||||
height: _sub.getConnectedEndpoint() == null ? 60 : 20,
|
||||
child: Text(
|
||||
_sub.getConnectedEndpoint() ??
|
||||
"Un noeud sûr et valide sera choisi automatiquement parmis une liste aléatoire.",
|
||||
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