Newer
Older

poka
committed
import 'package:gecko/ui/historyScreen.dart';
import 'package:gecko/ui/generateWallets.dart';

poka
committed
import 'package:flutter/material.dart';
4
5
6
7
8
9
10
11
12
13
14
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
import 'dart:typed_data';
import 'dart:ui';
//ignore: must_be_immutable
class HomeScreen extends StatefulWidget {
HomeScreen({this.screens});
final List<Widget> screens;
@override
_HomeScreenState createState() => _HomeScreenState();
}
class _HomeScreenState extends State<HomeScreen> {
GlobalKey<HistoryScreenState> _keyHistory = GlobalKey();
int _currentIndex = 0;
Widget currentScreen;
void onTabTapped(int index) {
setState(() {
_currentIndex = index;
});
}
Uint8List bytes = Uint8List(0);
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
backgroundColor: Colors.grey[300],
body: SafeArea(
child: IndexedStack(
index: _currentIndex,
children: <Widget>[
HistoryScreen(
keyHistory: _keyHistory,
),
GenerateWalletScreen(),
],
),
),
floatingActionButton: Container(
height: 80.0,
width: 80.0,
child: FittedBox(
child: FloatingActionButton(
child: Container(
height: 40.0,
width: 40.0,
child: Image.asset('images/scanner.png')),
backgroundColor: Color.fromARGB(500, 204, 255, 255),
),
),
),
bottomNavigationBar: BottomNavigationBar(
fixedColor: Colors.black,
type: BottomNavigationBarType.fixed,
onTap: onTabTapped,
currentIndex: _currentIndex,
items: [
BottomNavigationBarItem(
icon: new Icon(Icons.format_list_bulleted),
label: 'HOME',
),
BottomNavigationBarItem(
icon: new Icon(Icons.settings),
label: 'GENERATE WALLET',
)
],
),
));
}
}