Make routes for new home page buttons; Change Sentry alertes catching again
This commit is contained in:
parent
497e28e865
commit
a2a85ce8bb
|
@ -1,3 +1,5 @@
|
||||||
|
import 'dart:async';
|
||||||
|
|
||||||
import 'package:dubp/dubp.dart';
|
import 'package:dubp/dubp.dart';
|
||||||
import 'package:gecko/globals.dart';
|
import 'package:gecko/globals.dart';
|
||||||
import 'package:gecko/models/cesiumPlus.dart';
|
import 'package:gecko/models/cesiumPlus.dart';
|
||||||
|
@ -17,32 +19,11 @@ import 'package:shared_preferences/shared_preferences.dart';
|
||||||
import 'package:sentry_flutter/sentry_flutter.dart';
|
import 'package:sentry_flutter/sentry_flutter.dart';
|
||||||
import 'package:catcher/catcher.dart';
|
import 'package:catcher/catcher.dart';
|
||||||
|
|
||||||
// import 'dart:io';
|
|
||||||
// import 'package:flutter_logs/flutter_logs.dart';
|
|
||||||
// import 'package:downloads_path_provider/downloads_path_provider.dart';
|
|
||||||
|
|
||||||
final bool enableSentry = true;
|
final bool enableSentry = true;
|
||||||
|
|
||||||
Future<void> main() async {
|
Future<void> main() async {
|
||||||
WidgetsFlutterBinding.ensureInitialized();
|
WidgetsFlutterBinding.ensureInitialized();
|
||||||
|
|
||||||
// var downloadsDirectory = DownloadsPathProvider.downloadsDirectory;
|
|
||||||
// File logFile = File(downloadsDirectory.toString() + '/gecko.log');
|
|
||||||
|
|
||||||
// await FlutterLogs.initLogs(
|
|
||||||
// logLevelsEnabled: [
|
|
||||||
// LogLevel.INFO,
|
|
||||||
// LogLevel.WARNING,
|
|
||||||
// LogLevel.ERROR,
|
|
||||||
// LogLevel.SEVERE
|
|
||||||
// ],
|
|
||||||
// timeStampFormat: TimeStampFormat.TIME_FORMAT_READABLE,
|
|
||||||
// directoryStructure: DirectoryStructure.FOR_EVENT,
|
|
||||||
// logTypesEnabled: ["Locations", "APIs"],
|
|
||||||
// logFileExtension: LogFileExtension.LOG,
|
|
||||||
// logsWriteDirectoryName: downloadsDirectory.toString(),
|
|
||||||
// logsExportDirectoryName: downloadsDirectory.toString());
|
|
||||||
|
|
||||||
HomeProvider _homeProvider = HomeProvider();
|
HomeProvider _homeProvider = HomeProvider();
|
||||||
await _homeProvider.getAppPath();
|
await _homeProvider.getAppPath();
|
||||||
await _homeProvider.createDefaultAvatar();
|
await _homeProvider.createDefaultAvatar();
|
||||||
|
@ -55,23 +36,33 @@ Future<void> main() async {
|
||||||
endPointGVA = await _homeProvider.getValidEndpoint();
|
endPointGVA = await _homeProvider.getValidEndpoint();
|
||||||
|
|
||||||
if (kReleaseMode && enableSentry) {
|
if (kReleaseMode && enableSentry) {
|
||||||
CatcherOptions debugOptions = CatcherOptions(DialogReportMode(), [
|
// CatcherOptions debugOptions = CatcherOptions(DialogReportMode(), [
|
||||||
SentryHandler(SentryClient(SentryOptions(
|
// SentryHandler(SentryClient(SentryOptions(
|
||||||
dsn:
|
// dsn:
|
||||||
"https://c09587b46eaa42e8b9fda28d838ed180@o496840.ingest.sentry.io/5572110")))
|
// "https://c09587b46eaa42e8b9fda28d838ed180@o496840.ingest.sentry.io/5572110")))
|
||||||
]);
|
|
||||||
// CatcherOptions releaseOptions = CatcherOptions(NotificationReportMode(), [
|
|
||||||
// EmailManualHandler(["poka@p2p.legal"])
|
|
||||||
// ]);
|
// ]);
|
||||||
Catcher(rootWidget: Gecko(endPointGVA, _store), debugConfig: debugOptions);
|
// // CatcherOptions releaseOptions = CatcherOptions(NotificationReportMode(), [
|
||||||
|
// // EmailManualHandler(["poka@p2p.legal"])
|
||||||
|
// // ]);
|
||||||
|
// Catcher(rootWidget: Gecko(endPointGVA, _store), debugConfig: debugOptions);
|
||||||
|
|
||||||
// await SentryFlutter.init(
|
await SentryFlutter.init((options) {
|
||||||
// (options) {
|
options.dsn =
|
||||||
// options.dsn =
|
'https://c09587b46eaa42e8b9fda28d838ed180@o496840.ingest.sentry.io/5572110';
|
||||||
// 'https://c09587b46eaa42e8b9fda28d838ed180@o496840.ingest.sentry.io/5572110';
|
}, appRunner: () => runApp(Gecko(endPointGVA, _store)));
|
||||||
// },
|
|
||||||
// appRunner: () => runApp(Gecko(endPointGVA, _store)),
|
// runZoned<Future<void>>(
|
||||||
// );
|
// () async {
|
||||||
|
// runApp(Gecko(endPointGVA, _store));
|
||||||
|
// },
|
||||||
|
// onError: (dynamic error, StackTrace stackTrace) {
|
||||||
|
// print("=================== CAUGHT DART ERROR");
|
||||||
|
// // Sentry.captureException(
|
||||||
|
// // error,
|
||||||
|
// // stackTrace: stackTrace,
|
||||||
|
// // );
|
||||||
|
// },
|
||||||
|
// ));
|
||||||
} else {
|
} else {
|
||||||
print('Debug mode enabled: No sentry alerte');
|
print('Debug mode enabled: No sentry alerte');
|
||||||
|
|
||||||
|
@ -108,6 +99,8 @@ class Gecko extends StatelessWidget {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// HistoryProvider _historyProvider = Provider.of<HistoryProvider>(context);
|
||||||
|
// HistoryProvider('').snackNode(context);
|
||||||
return MultiProvider(
|
return MultiProvider(
|
||||||
providers: [
|
providers: [
|
||||||
// Provider(create: (context) => HistoryProvider()),
|
// Provider(create: (context) => HistoryProvider()),
|
||||||
|
|
|
@ -2,6 +2,7 @@ import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:gecko/globals.dart';
|
import 'package:gecko/globals.dart';
|
||||||
import 'package:gecko/models/home.dart';
|
import 'package:gecko/models/home.dart';
|
||||||
|
import 'package:gecko/screens/history.dart';
|
||||||
import 'package:graphql_flutter/graphql_flutter.dart';
|
import 'package:graphql_flutter/graphql_flutter.dart';
|
||||||
import 'package:permission_handler/permission_handler.dart';
|
import 'package:permission_handler/permission_handler.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
@ -64,6 +65,12 @@ class HistoryProvider with ChangeNotifier {
|
||||||
isHistoryScreen = false;
|
isHistoryScreen = false;
|
||||||
historySwitchButtun = "Voir l'historique";
|
historySwitchButtun = "Voir l'historique";
|
||||||
_homeProvider.handleSearchEnd();
|
_homeProvider.handleSearchEnd();
|
||||||
|
Navigator.push(
|
||||||
|
context,
|
||||||
|
MaterialPageRoute(builder: (context) {
|
||||||
|
return HistoryScreen();
|
||||||
|
}),
|
||||||
|
);
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
|
|
||||||
return pubkey;
|
return pubkey;
|
||||||
|
@ -202,8 +209,8 @@ class HistoryProvider with ChangeNotifier {
|
||||||
}
|
}
|
||||||
final snackBar =
|
final snackBar =
|
||||||
SnackBar(content: Text(_message), duration: Duration(seconds: 2));
|
SnackBar(content: Text(_message), duration: Duration(seconds: 2));
|
||||||
Scaffold.of(context).showSnackBar(snackBar);
|
|
||||||
isFirstBuild = false;
|
isFirstBuild = false;
|
||||||
|
Scaffold.of(context).showSnackBar(snackBar);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,9 @@ class HomeProvider with ChangeNotifier {
|
||||||
Icon searchIcon = Icon(Icons.search);
|
Icon searchIcon = Icon(Icons.search);
|
||||||
final TextEditingController searchQuery = new TextEditingController();
|
final TextEditingController searchQuery = new TextEditingController();
|
||||||
Widget appBarTitle = Text('Ğecko', style: TextStyle(color: Colors.grey[850]));
|
Widget appBarTitle = Text('Ğecko', style: TextStyle(color: Colors.grey[850]));
|
||||||
|
Widget appBarExplorer =
|
||||||
|
Text('Explorateur', style: TextStyle(color: Colors.grey[850]));
|
||||||
|
|
||||||
List currentTab = [HistoryScreen(), WalletsHome()];
|
List currentTab = [HistoryScreen(), WalletsHome()];
|
||||||
|
|
||||||
get currentIndex => _currentIndex;
|
get currentIndex => _currentIndex;
|
||||||
|
@ -124,6 +127,8 @@ class HomeProvider with ChangeNotifier {
|
||||||
color: Colors.grey[850],
|
color: Colors.grey[850],
|
||||||
);
|
);
|
||||||
appBarTitle = Text('Ğecko', style: TextStyle(color: Colors.grey[850]));
|
appBarTitle = Text('Ğecko', style: TextStyle(color: Colors.grey[850]));
|
||||||
|
appBarExplorer =
|
||||||
|
Text('Explorateur', style: TextStyle(color: Colors.grey[850]));
|
||||||
isSearching = false;
|
isSearching = false;
|
||||||
searchQuery.clear();
|
searchQuery.clear();
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@ import 'dart:io';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:gecko/globals.dart';
|
import 'package:gecko/globals.dart';
|
||||||
import 'package:gecko/models/cesiumPlus.dart';
|
import 'package:gecko/models/cesiumPlus.dart';
|
||||||
|
import 'package:gecko/models/home.dart';
|
||||||
import 'package:gecko/models/queries.dart';
|
import 'package:gecko/models/queries.dart';
|
||||||
import 'package:gecko/models/history.dart';
|
import 'package:gecko/models/history.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
@ -28,14 +29,55 @@ class HistoryScreen extends StatelessWidget with ChangeNotifier {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
HistoryProvider _historyProvider = Provider.of<HistoryProvider>(context);
|
HistoryProvider _historyProvider = Provider.of<HistoryProvider>(context);
|
||||||
|
HomeProvider _homeProvider = Provider.of<HomeProvider>(context);
|
||||||
this._outputPubkey.text = _historyProvider.pubkey;
|
this._outputPubkey.text = _historyProvider.pubkey;
|
||||||
print('Build pubkey : ' + _historyProvider.pubkey);
|
print('Build pubkey : ' + _historyProvider.pubkey);
|
||||||
// _historyProvider.snackNode(context);
|
// _historyProvider.snackNode(context);
|
||||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
WidgetsBinding.instance.addPostFrameCallback((_) {});
|
||||||
_historyProvider.snackNode(context);
|
|
||||||
});
|
|
||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
|
appBar: AppBar(
|
||||||
|
title: _homeProvider.appBarExplorer,
|
||||||
|
actions: [
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 16),
|
||||||
|
child: IconButton(
|
||||||
|
icon: _homeProvider.searchIcon,
|
||||||
|
color: Colors.grey[850],
|
||||||
|
onPressed: () {
|
||||||
|
if (_homeProvider.searchIcon.icon == Icons.search) {
|
||||||
|
_homeProvider.searchIcon = Icon(
|
||||||
|
Icons.close,
|
||||||
|
color: Colors.grey[850],
|
||||||
|
);
|
||||||
|
_homeProvider.appBarExplorer = TextField(
|
||||||
|
autofocus: true,
|
||||||
|
controller: _homeProvider.searchQuery,
|
||||||
|
onChanged: (text) {
|
||||||
|
print("Clé tappé: $text");
|
||||||
|
final String searchResult =
|
||||||
|
_historyProvider.isPubkey(context, text);
|
||||||
|
if (searchResult != '') {
|
||||||
|
_homeProvider.currentIndex = 0;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.grey[850],
|
||||||
|
),
|
||||||
|
decoration: InputDecoration(
|
||||||
|
prefixIcon:
|
||||||
|
Icon(Icons.search, color: Colors.grey[850]),
|
||||||
|
hintText: "Rechercher ...",
|
||||||
|
hintStyle: TextStyle(color: Colors.grey[850])),
|
||||||
|
);
|
||||||
|
_homeProvider.handleSearchStart();
|
||||||
|
} else {
|
||||||
|
_homeProvider.handleSearchEnd();
|
||||||
|
}
|
||||||
|
}))
|
||||||
|
],
|
||||||
|
backgroundColor: Color(0xffFFD58D),
|
||||||
|
),
|
||||||
floatingActionButton: Container(
|
floatingActionButton: Container(
|
||||||
height: 80.0,
|
height: 80.0,
|
||||||
width: 80.0,
|
width: 80.0,
|
||||||
|
|
|
@ -2,6 +2,7 @@ import 'package:gecko/globals.dart';
|
||||||
import 'package:gecko/models/history.dart';
|
import 'package:gecko/models/history.dart';
|
||||||
import 'package:gecko/models/home.dart';
|
import 'package:gecko/models/home.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:gecko/screens/myWallets/walletsHome.dart';
|
||||||
import 'dart:ui';
|
import 'dart:ui';
|
||||||
import 'package:gecko/screens/settings.dart';
|
import 'package:gecko/screens/settings.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
@ -11,230 +12,248 @@ class HomeScreen extends StatelessWidget {
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
HomeProvider _homeProvider = Provider.of<HomeProvider>(context);
|
HomeProvider _homeProvider = Provider.of<HomeProvider>(context);
|
||||||
HistoryProvider _historyProvider = Provider.of<HistoryProvider>(context);
|
HistoryProvider _historyProvider = Provider.of<HistoryProvider>(context);
|
||||||
return Scaffold(
|
// _historyProvider.snackNode(context);
|
||||||
drawer: Drawer(
|
|
||||||
child: Column(
|
|
||||||
children: <Widget>[
|
|
||||||
Expanded(
|
|
||||||
child: ListView(padding: EdgeInsets.zero, children: <Widget>[
|
|
||||||
DrawerHeader(
|
|
||||||
child: Column(children: <Widget>[
|
|
||||||
SizedBox(height: 0),
|
|
||||||
Image(
|
|
||||||
image: AssetImage('assets/icon/gecko_final.png'),
|
|
||||||
height: 130),
|
|
||||||
]),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: Color(0xffD28928),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
ListTile(
|
|
||||||
title: Text('Paramètres'),
|
|
||||||
onTap: () {
|
|
||||||
Navigator.pop(context);
|
|
||||||
Navigator.push(
|
|
||||||
context,
|
|
||||||
MaterialPageRoute(builder: (context) {
|
|
||||||
return SettingsScreen();
|
|
||||||
}),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
ListTile(
|
|
||||||
title: Text('A propos'),
|
|
||||||
onTap: () {
|
|
||||||
// Update the state of the app.
|
|
||||||
// ...
|
|
||||||
},
|
|
||||||
),
|
|
||||||
])),
|
|
||||||
Container(
|
|
||||||
child: Align(
|
|
||||||
alignment: FractionalOffset.bottomCenter,
|
|
||||||
child: Text('Ğecko v$appVersion'))),
|
|
||||||
SizedBox(height: 20)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
appBar: AppBar(
|
|
||||||
leading: Builder(
|
|
||||||
builder: (context) => IconButton(
|
|
||||||
icon: new Icon(Icons.menu, color: Colors.grey[850]),
|
|
||||||
onPressed: () => Scaffold.of(context).openDrawer(),
|
|
||||||
)),
|
|
||||||
title: _homeProvider.appBarTitle,
|
|
||||||
actions: [
|
|
||||||
Padding(
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 16),
|
|
||||||
child: IconButton(
|
|
||||||
icon: _homeProvider.searchIcon,
|
|
||||||
color: Colors.grey[850],
|
|
||||||
onPressed: () {
|
|
||||||
// Navigator.push(
|
|
||||||
// context,
|
|
||||||
// MaterialPageRoute(builder: (context) {
|
|
||||||
// return SearchList();
|
|
||||||
// }),
|
|
||||||
// );
|
|
||||||
|
|
||||||
if (_homeProvider.searchIcon.icon == Icons.search) {
|
return Scaffold(
|
||||||
_homeProvider.searchIcon = Icon(
|
resizeToAvoidBottomInset: false,
|
||||||
Icons.close,
|
drawer: Drawer(
|
||||||
color: Colors.grey[850],
|
child: Column(
|
||||||
);
|
children: <Widget>[
|
||||||
_homeProvider.appBarTitle = TextField(
|
Expanded(
|
||||||
autofocus: true,
|
child: ListView(padding: EdgeInsets.zero, children: <Widget>[
|
||||||
controller: _homeProvider.searchQuery,
|
DrawerHeader(
|
||||||
onChanged: (text) {
|
child: Column(children: <Widget>[
|
||||||
print("Clé tappé: $text");
|
SizedBox(height: 0),
|
||||||
final String searchResult =
|
Image(
|
||||||
_historyProvider.isPubkey(context, text);
|
image: AssetImage('assets/icon/gecko_final.png'),
|
||||||
if (searchResult != '') {
|
height: 130),
|
||||||
_homeProvider.currentIndex = 0;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
style: TextStyle(
|
|
||||||
color: Colors.grey[850],
|
|
||||||
),
|
|
||||||
decoration: InputDecoration(
|
|
||||||
prefixIcon:
|
|
||||||
Icon(Icons.search, color: Colors.grey[850]),
|
|
||||||
hintText: "Rechercher ...",
|
|
||||||
hintStyle: TextStyle(color: Colors.grey[850])),
|
|
||||||
);
|
|
||||||
_homeProvider.handleSearchStart();
|
|
||||||
} else {
|
|
||||||
_homeProvider.handleSearchEnd();
|
|
||||||
}
|
|
||||||
}))
|
|
||||||
],
|
|
||||||
backgroundColor: Color(0xffFFD58D),
|
|
||||||
),
|
|
||||||
backgroundColor: Color(0xffF9F9F1),
|
|
||||||
body: // _homeProvider.currentTab[_homeProvider.currentIndex],
|
|
||||||
Column(children: <Widget>[
|
|
||||||
Padding(
|
|
||||||
padding: EdgeInsets.only(top: 22),
|
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: <Widget>[
|
|
||||||
Image(
|
|
||||||
image: AssetImage('assets/icon/gecko_final.png'),
|
|
||||||
height: 180),
|
|
||||||
])),
|
|
||||||
Padding(
|
|
||||||
padding: EdgeInsets.only(top: 15),
|
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: <Widget>[
|
|
||||||
Text(
|
|
||||||
"L’application de paiement Ğ1\nplus mobile qu’un lésard du Vietnam",
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: TextStyle(color: Colors.black, fontSize: 15),
|
|
||||||
)
|
|
||||||
])),
|
|
||||||
Padding(
|
|
||||||
padding: EdgeInsets.only(top: 60),
|
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: <Widget>[
|
|
||||||
Column(children: <Widget>[
|
|
||||||
ClipOval(
|
|
||||||
child: Material(
|
|
||||||
color: Color(0xffFFD58D), // button color
|
|
||||||
child: Padding(
|
|
||||||
padding: EdgeInsets.all(17),
|
|
||||||
child: InkWell(
|
|
||||||
splashColor: Colors.black, // inkwell color
|
|
||||||
child: Image(
|
|
||||||
image: AssetImage('assets/qrcode-scan.png'),
|
|
||||||
height: 58),
|
|
||||||
onTap: () {},
|
|
||||||
)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(height: 5),
|
|
||||||
Text(
|
|
||||||
"Payer par QR-Code",
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: TextStyle(color: Colors.black, fontSize: 13),
|
|
||||||
)
|
|
||||||
])
|
|
||||||
])),
|
|
||||||
Padding(
|
|
||||||
padding: EdgeInsets.only(top: 60),
|
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: <Widget>[
|
|
||||||
Column(children: <Widget>[
|
|
||||||
ClipOval(
|
|
||||||
child: Material(
|
|
||||||
color: Color(0xffFFD58D), // button color
|
|
||||||
child: Padding(
|
|
||||||
padding: EdgeInsets.symmetric(
|
|
||||||
horizontal: 18, vertical: 14),
|
|
||||||
child: InkWell(
|
|
||||||
splashColor: Colors.black, // inkwell color
|
|
||||||
child: Image(
|
|
||||||
image: AssetImage('assets/blockchain.png'),
|
|
||||||
height: 65),
|
|
||||||
onTap: () {},
|
|
||||||
)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(height: 5),
|
|
||||||
Text(
|
|
||||||
"Explorer\n",
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: TextStyle(color: Colors.black, fontSize: 13),
|
|
||||||
)
|
|
||||||
]),
|
]),
|
||||||
SizedBox(width: 160),
|
decoration: BoxDecoration(
|
||||||
Column(children: <Widget>[
|
color: Color(0xffD28928),
|
||||||
ClipOval(
|
),
|
||||||
child: Material(
|
),
|
||||||
color: Color(0xffFFD58D), // button color
|
ListTile(
|
||||||
child: Padding(
|
title: Text('Paramètres'),
|
||||||
padding: EdgeInsets.all(20),
|
onTap: () {
|
||||||
child: InkWell(
|
Navigator.pop(context);
|
||||||
splashColor: Colors.black, // inkwell color
|
Navigator.push(
|
||||||
child: Image(
|
context,
|
||||||
image: AssetImage('assets/lock.png'),
|
MaterialPageRoute(builder: (context) {
|
||||||
height: 50),
|
return SettingsScreen();
|
||||||
onTap: () {},
|
}),
|
||||||
)),
|
);
|
||||||
),
|
},
|
||||||
),
|
),
|
||||||
SizedBox(height: 5),
|
ListTile(
|
||||||
Text(
|
title: Text('A propos'),
|
||||||
"Gérer mes\nportefeuilles",
|
onTap: () {
|
||||||
textAlign: TextAlign.center,
|
// Update the state of the app.
|
||||||
style: TextStyle(color: Colors.black, fontSize: 13),
|
// ...
|
||||||
)
|
},
|
||||||
])
|
),
|
||||||
]))
|
])),
|
||||||
]),
|
Container(
|
||||||
// bottomNavigationBar: BottomNavigationBar(
|
child: Align(
|
||||||
// backgroundColor: Color(0xffFFD58D),
|
alignment: FractionalOffset.bottomCenter,
|
||||||
// fixedColor: Colors.grey[850],
|
child: Text('Ğecko v$appVersion'))),
|
||||||
// unselectedItemColor: Color(0xffBD935C),
|
SizedBox(height: 20)
|
||||||
// type: BottomNavigationBarType.fixed,
|
],
|
||||||
// onTap: (index) {
|
),
|
||||||
// _homeProvider.currentIndex = index;
|
),
|
||||||
// },
|
appBar: AppBar(
|
||||||
// currentIndex: _homeProvider.currentIndex,
|
leading: Builder(
|
||||||
// items: [
|
builder: (context) => IconButton(
|
||||||
// BottomNavigationBarItem(
|
icon: new Icon(Icons.menu, color: Colors.grey[850]),
|
||||||
// icon: Image.asset('assets/block-space-disabled.png', height: 26),
|
onPressed: () => Scaffold.of(context).openDrawer(),
|
||||||
// activeIcon: Image.asset('assets/blockchain.png', height: 26),
|
)),
|
||||||
// label: 'Explorateur',
|
title: _homeProvider.appBarTitle,
|
||||||
// ),
|
actions: [
|
||||||
// BottomNavigationBarItem(
|
Padding(
|
||||||
// icon: Icon(Icons.lock),
|
padding: EdgeInsets.symmetric(horizontal: 16),
|
||||||
// label: 'Mes portefeuilles',
|
child: IconButton(
|
||||||
// ),
|
icon: _homeProvider.searchIcon,
|
||||||
// ],
|
color: Colors.grey[850],
|
||||||
// ),
|
onPressed: () {
|
||||||
);
|
// Navigator.push(
|
||||||
|
// context,
|
||||||
|
// MaterialPageRoute(builder: (context) {
|
||||||
|
// return SearchList();
|
||||||
|
// }),
|
||||||
|
// );
|
||||||
|
|
||||||
|
if (_homeProvider.searchIcon.icon == Icons.search) {
|
||||||
|
_homeProvider.searchIcon = Icon(
|
||||||
|
Icons.close,
|
||||||
|
color: Colors.grey[850],
|
||||||
|
);
|
||||||
|
_homeProvider.appBarTitle = TextField(
|
||||||
|
autofocus: true,
|
||||||
|
controller: _homeProvider.searchQuery,
|
||||||
|
onChanged: (text) {
|
||||||
|
print("Clé tappé: $text");
|
||||||
|
final String searchResult =
|
||||||
|
_historyProvider.isPubkey(context, text);
|
||||||
|
if (searchResult != '') {
|
||||||
|
_homeProvider.currentIndex = 0;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.grey[850],
|
||||||
|
),
|
||||||
|
decoration: InputDecoration(
|
||||||
|
prefixIcon:
|
||||||
|
Icon(Icons.search, color: Colors.grey[850]),
|
||||||
|
hintText: "Rechercher ...",
|
||||||
|
hintStyle: TextStyle(color: Colors.grey[850])),
|
||||||
|
);
|
||||||
|
_homeProvider.handleSearchStart();
|
||||||
|
} else {
|
||||||
|
_homeProvider.handleSearchEnd();
|
||||||
|
}
|
||||||
|
}))
|
||||||
|
],
|
||||||
|
backgroundColor: Color(0xffFFD58D),
|
||||||
|
),
|
||||||
|
backgroundColor: Color(0xffF9F9F1),
|
||||||
|
body: // _homeProvider.currentTab[_homeProvider.currentIndex],
|
||||||
|
Builder(
|
||||||
|
builder: (context) => Column(children: <Widget>[
|
||||||
|
// _historyProvider.snackNode(context),
|
||||||
|
// SnackBar(content: Text('tataaa')),
|
||||||
|
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.only(top: 22),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: <Widget>[
|
||||||
|
Image(
|
||||||
|
image: AssetImage('assets/icon/gecko_final.png'),
|
||||||
|
height: 180),
|
||||||
|
])),
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.only(top: 15),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: <Widget>[
|
||||||
|
Text(
|
||||||
|
"L’application de paiement Ğ1\nplus mobile qu’un lésard du Vietnam",
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: TextStyle(color: Colors.black, fontSize: 15),
|
||||||
|
)
|
||||||
|
])),
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.only(top: 60),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: <Widget>[
|
||||||
|
Column(children: <Widget>[
|
||||||
|
ClipOval(
|
||||||
|
child: Material(
|
||||||
|
color: Color(0xffFFD58D), // button color
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsets.all(17),
|
||||||
|
child: InkWell(
|
||||||
|
splashColor: Colors.black, // inkwell color
|
||||||
|
child: Image(
|
||||||
|
image:
|
||||||
|
AssetImage('assets/qrcode-scan.png'),
|
||||||
|
height: 58),
|
||||||
|
onTap: () async {
|
||||||
|
await _historyProvider.scan(context);
|
||||||
|
},
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height: 5),
|
||||||
|
Text(
|
||||||
|
"Payer par QR-Code",
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: TextStyle(color: Colors.black, fontSize: 13),
|
||||||
|
)
|
||||||
|
])
|
||||||
|
])),
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.only(top: 60),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: <Widget>[
|
||||||
|
Column(children: <Widget>[
|
||||||
|
ClipOval(
|
||||||
|
child: Material(
|
||||||
|
color: Color(0xffFFD58D), // button color
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsets.symmetric(
|
||||||
|
horizontal: 18, vertical: 14),
|
||||||
|
child: InkWell(
|
||||||
|
splashColor: Colors.black, // inkwell color
|
||||||
|
child: Image(
|
||||||
|
image:
|
||||||
|
AssetImage('assets/blockchain.png'),
|
||||||
|
height: 65),
|
||||||
|
onTap: () {},
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height: 5),
|
||||||
|
Text(
|
||||||
|
"Explorer\n",
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: TextStyle(color: Colors.black, fontSize: 13),
|
||||||
|
)
|
||||||
|
]),
|
||||||
|
SizedBox(width: 140),
|
||||||
|
Column(children: <Widget>[
|
||||||
|
ClipOval(
|
||||||
|
child: Material(
|
||||||
|
color: Color(0xffFFD58D), // button color
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsets.all(20),
|
||||||
|
child: InkWell(
|
||||||
|
splashColor: Colors.black, // inkwell color
|
||||||
|
child: Image(
|
||||||
|
image: AssetImage('assets/lock.png'),
|
||||||
|
height: 50),
|
||||||
|
onTap: () {
|
||||||
|
Navigator.push(
|
||||||
|
context,
|
||||||
|
MaterialPageRoute(builder: (context) {
|
||||||
|
return WalletsHome();
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height: 5),
|
||||||
|
Text(
|
||||||
|
"Gérer mes\nportefeuilles",
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: TextStyle(color: Colors.black, fontSize: 13),
|
||||||
|
)
|
||||||
|
])
|
||||||
|
]))
|
||||||
|
]),
|
||||||
|
// bottomNavigationBar: BottomNavigationBar(
|
||||||
|
// backgroundColor: Color(0xffFFD58D),
|
||||||
|
// fixedColor: Colors.grey[850],
|
||||||
|
// unselectedItemColor: Color(0xffBD935C),
|
||||||
|
// type: BottomNavigationBarType.fixed,
|
||||||
|
// onTap: (index) {
|
||||||
|
// _homeProvider.currentIndex = index;
|
||||||
|
// },
|
||||||
|
// currentIndex: _homeProvider.currentIndex,
|
||||||
|
// items: [
|
||||||
|
// BottomNavigationBarItem(
|
||||||
|
// icon: Image.asset('assets/block-space-disabled.png', height: 26),
|
||||||
|
// activeIcon: Image.asset('assets/blockchain.png', height: 26),
|
||||||
|
// label: 'Explorateur',
|
||||||
|
// ),
|
||||||
|
// BottomNavigationBarItem(
|
||||||
|
// icon: Icon(Icons.lock),
|
||||||
|
// label: 'Mes portefeuilles',
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,11 @@ class WalletsHome extends StatelessWidget {
|
||||||
}
|
}
|
||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
|
appBar: AppBar(
|
||||||
|
title: Text('Mes portefeuilles',
|
||||||
|
style: TextStyle(color: Colors.grey[850])),
|
||||||
|
backgroundColor: Color(0xffFFD58D),
|
||||||
|
),
|
||||||
floatingActionButton: Visibility(
|
floatingActionButton: Visibility(
|
||||||
visible: (isWalletsExists && firstWalletDerivation != -1),
|
visible: (isWalletsExists && firstWalletDerivation != -1),
|
||||||
child: Container(
|
child: Container(
|
||||||
|
|
|
@ -5,7 +5,7 @@ description: A new Flutter project.
|
||||||
# pub.dev using `pub publish`. This is preferred for private packages.
|
# pub.dev using `pub publish`. This is preferred for private packages.
|
||||||
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
||||||
|
|
||||||
version: 0.0.1+13
|
version: 0.0.1+14
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=2.7.0 <3.0.0"
|
sdk: ">=2.7.0 <3.0.0"
|
||||||
|
|
Loading…
Reference in New Issue