added new pages
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
import 'package:briessenchecker/pages/edit_checklist_page.dart';
|
||||||
import 'package:briessenchecker/services/dbhelper.dart';
|
import 'package:briessenchecker/services/dbhelper.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
||||||
@@ -28,6 +29,7 @@ class MyApp extends StatelessWidget {
|
|||||||
LandingPage.routeName: (context) => const LandingPage(),
|
LandingPage.routeName: (context) => const LandingPage(),
|
||||||
LoginPage.routeName: (context) => const LoginPage(),
|
LoginPage.routeName: (context) => const LoginPage(),
|
||||||
DashboardPage.routeName: (context) => const DashboardPage(),
|
DashboardPage.routeName: (context) => const DashboardPage(),
|
||||||
|
EditChecklistPage.routeName: (context) => const EditChecklistPage(),
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,10 @@ class _DashboardPageState extends State<DashboardPage> {
|
|||||||
future: checklistFuture,
|
future: checklistFuture,
|
||||||
builder: _futureBuilder,
|
builder: _futureBuilder,
|
||||||
),
|
),
|
||||||
|
floatingActionButton: FloatingActionButton(
|
||||||
|
onPressed: _onAddTapped,
|
||||||
|
child: const Icon(Icons.add),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -43,4 +47,8 @@ class _DashboardPageState extends State<DashboardPage> {
|
|||||||
subtitle: Text(cl.description),
|
subtitle: Text(cl.description),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void _onAddTapped() {
|
||||||
|
DbHelper.addChecklist().then((id) {});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
10
lib/pages/detail_checklist_page.dart
Normal file
10
lib/pages/detail_checklist_page.dart
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class DetailChecklistPage extends StatelessWidget {
|
||||||
|
const DetailChecklistPage({super.key});
|
||||||
|
static const routeName = '/detail';
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return const Placeholder();
|
||||||
|
}
|
||||||
|
}
|
||||||
10
lib/pages/edit_checklist_page.dart
Normal file
10
lib/pages/edit_checklist_page.dart
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class EditChecklistPage extends StatelessWidget {
|
||||||
|
const EditChecklistPage({super.key});
|
||||||
|
static const routeName = '/edit';
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return const Placeholder();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -28,6 +28,12 @@ class DbHelper {
|
|||||||
return ed.checklists;
|
return ed.checklists;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// returns id of newly created checklist
|
||||||
|
static Future<int> addChecklist() async {
|
||||||
|
//TODO Add checklist
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static Stream<AuthState> get authChangeEventStream =>
|
static Stream<AuthState> get authChangeEventStream =>
|
||||||
_client.auth.onAuthStateChange;
|
_client.auth.onAuthStateChange;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user