changed theme
This commit is contained in:
parent
e793bc80a9
commit
47402efd64
|
|
@ -14,7 +14,13 @@ class BoxChecker extends StatelessWidget {
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MaterialApp(
|
return MaterialApp(
|
||||||
title: 'Flutter Demo',
|
title: 'Flutter Demo',
|
||||||
theme: ThemeData(brightness: Brightness.dark),
|
theme: ThemeData.from(colorScheme: ColorScheme.dark()).copyWith(
|
||||||
|
canvasColor: Colors.black,
|
||||||
|
shadowColor: Colors.blueGrey,
|
||||||
|
colorScheme: ColorScheme.fromSwatch(
|
||||||
|
primarySwatch: Colors.blue,
|
||||||
|
),
|
||||||
|
),
|
||||||
themeMode: ThemeMode.dark,
|
themeMode: ThemeMode.dark,
|
||||||
home: const MainListPage(title: 'BoxChecker'),
|
home: const MainListPage(title: 'BoxChecker'),
|
||||||
);
|
);
|
||||||
|
|
@ -31,13 +37,15 @@ class MainListPage extends StatefulWidget {
|
||||||
|
|
||||||
class _MainListPageState extends State<MainListPage> {
|
class _MainListPageState extends State<MainListPage> {
|
||||||
int _selectedPage = data.Page.lists.index;
|
int _selectedPage = data.Page.lists.index;
|
||||||
List<data.List> lists = [data.List(100, "test")];
|
List<data.List> lists = [];
|
||||||
|
|
||||||
void _loadData(data.Page listType) async {
|
void _loadData(data.Page listType) async {
|
||||||
lists.clear();
|
lists.clear();
|
||||||
var res = await DBHelper.dbHelper.getAllLists(listType);
|
var res = await DBHelper.dbHelper.getAllLists(listType);
|
||||||
setState(() {
|
setState(() {
|
||||||
for (var row in res) lists.add(data.List.fromMap(row));
|
for (var row in res) {
|
||||||
|
lists.add(data.List.fromMap(row));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -62,7 +70,7 @@ class _MainListPageState extends State<MainListPage> {
|
||||||
MaterialPageRoute(
|
MaterialPageRoute(
|
||||||
builder: (context) =>
|
builder: (context) =>
|
||||||
AddForm(type: data.Page.values[_selectedPage])));
|
AddForm(type: data.Page.values[_selectedPage])));
|
||||||
}, // TODO Implement add button
|
},
|
||||||
tooltip: 'Add List',
|
tooltip: 'Add List',
|
||||||
child: const Icon(Icons.add),
|
child: const Icon(Icons.add),
|
||||||
),
|
),
|
||||||
|
|
@ -72,9 +80,10 @@ class _MainListPageState extends State<MainListPage> {
|
||||||
return ListTile(
|
return ListTile(
|
||||||
title: Text(lists[index].name),
|
title: Text(lists[index].name),
|
||||||
subtitle: Text(lists[index].id.toString()),
|
subtitle: Text(lists[index].id.toString()),
|
||||||
); // TODO Implement tile rendering
|
);
|
||||||
}),
|
}),
|
||||||
bottomNavigationBar: BottomNavigationBar(
|
bottomNavigationBar: BottomNavigationBar(
|
||||||
|
elevation: 4,
|
||||||
currentIndex: _selectedPage,
|
currentIndex: _selectedPage,
|
||||||
onTap: (index) {
|
onTap: (index) {
|
||||||
setState(() {
|
setState(() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue