switched to local git instance
This commit is contained in:
49
lib/home.dart
Normal file
49
lib/home.dart
Normal file
@@ -0,0 +1,49 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'addCam/add_cam_main.dart';
|
||||
|
||||
// * The homepage where you can choose to add something or view the database entries
|
||||
|
||||
|
||||
class HomePage extends StatelessWidget {
|
||||
const HomePage({super.key});
|
||||
|
||||
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(title: Text(AppLocalizations.of(context)!.homePageTitle),
|
||||
actions: [
|
||||
PopupMenuButton(
|
||||
onSelected: (value) {
|
||||
Navigator.pushNamed(context, value.toString());
|
||||
},
|
||||
itemBuilder: (context) => [
|
||||
PopupMenuItem(
|
||||
value: '/settings',
|
||||
child: Text(AppLocalizations.of(context)!.settings),
|
||||
)
|
||||
])
|
||||
],
|
||||
),
|
||||
body: Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
ElevatedButton(
|
||||
onPressed: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => const AddCamMain()));
|
||||
},
|
||||
child: Text(AppLocalizations.of(context)!.addCam)),
|
||||
ElevatedButton(onPressed: () => Navigator.pushNamed(context, '/viewCams'),
|
||||
child: const Text('view Cams')),
|
||||
|
||||
],
|
||||
)),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user