changed theme
This commit is contained in:
parent
e793bc80a9
commit
47402efd64
|
|
@ -14,7 +14,13 @@ class BoxChecker extends StatelessWidget {
|
|||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
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,
|
||||
home: const MainListPage(title: 'BoxChecker'),
|
||||
);
|
||||
|
|
@ -31,13 +37,15 @@ class MainListPage extends StatefulWidget {
|
|||
|
||||
class _MainListPageState extends State<MainListPage> {
|
||||
int _selectedPage = data.Page.lists.index;
|
||||
List<data.List> lists = [data.List(100, "test")];
|
||||
List<data.List> lists = [];
|
||||
|
||||
void _loadData(data.Page listType) async {
|
||||
lists.clear();
|
||||
var res = await DBHelper.dbHelper.getAllLists(listType);
|
||||
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(
|
||||
builder: (context) =>
|
||||
AddForm(type: data.Page.values[_selectedPage])));
|
||||
}, // TODO Implement add button
|
||||
},
|
||||
tooltip: 'Add List',
|
||||
child: const Icon(Icons.add),
|
||||
),
|
||||
|
|
@ -72,9 +80,10 @@ class _MainListPageState extends State<MainListPage> {
|
|||
return ListTile(
|
||||
title: Text(lists[index].name),
|
||||
subtitle: Text(lists[index].id.toString()),
|
||||
); // TODO Implement tile rendering
|
||||
);
|
||||
}),
|
||||
bottomNavigationBar: BottomNavigationBar(
|
||||
elevation: 4,
|
||||
currentIndex: _selectedPage,
|
||||
onTap: (index) {
|
||||
setState(() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue