"content/git@git.duniter.org:Processus42/monnaie-libre-fr.git" did not exist on "fbf726906dd03b857f4906857a7c94e940a0fa85"
Newer
Older
import 'package:gecko/models/history.dart';

poka
committed
import 'package:flutter/material.dart';
import 'package:gecko/screens/settings.dart';
@override
Widget build(BuildContext context) {
HomeProvider _homeProvider = Provider.of<HomeProvider>(context);
HistoryProvider _historyProvider = Provider.of<HistoryProvider>(context);

poka
committed
return Scaffold(

poka
committed
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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,

poka
committed
SizedBox(height: 20)
],
),
),
appBar: AppBar(
leading: Builder(
builder: (context) => IconButton(
icon: new Icon(Icons.menu, color: Colors.grey[850]),
onPressed: () => Scaffold.of(context).openDrawer(),
)),

poka
committed
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) {
_homeProvider.searchIcon = Icon(
Icons.close,
color: Colors.grey[850],
);
_homeProvider.appBarTitle = TextField(
autofocus: true,
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(
Icon(Icons.search, color: Colors.grey[850]),
hintText: "Rechercher ...",
hintStyle: TextStyle(color: Colors.grey[850])),
);
_homeProvider.handleSearchStart();
} else {
_homeProvider.handleSearchEnd();
}
}))

poka
committed
],
backgroundColor: Color(0xffFFD58D),
),

poka
committed
backgroundColor: Color(0xffF9F9F1),
body: _homeProvider.currentTab[_homeProvider.currentIndex],
bottomNavigationBar: BottomNavigationBar(

poka
committed
backgroundColor: Color(0xffFFD58D),
fixedColor: Colors.grey[850],

poka
committed
unselectedItemColor: Color(0xffBD935C),
onTap: (index) {
_homeProvider.currentIndex = index;
},
currentIndex: _homeProvider.currentIndex,
icon: Padding(
padding: EdgeInsets.symmetric(horizontal: 86),
child: Image.asset('assets/blockchain.png')),
activeIcon: Padding(
padding: EdgeInsets.symmetric(horizontal: 86),
child: Image.asset('assets/blockchain.png')),
label: 'Explorateur',
icon: Icon(Icons.lock),
),

poka
committed
);