fixed a lot of things after i broke everything. Just the card is not implemented again yet
time
This commit is contained in:
110
lib/home.dart
110
lib/home.dart
@@ -9,7 +9,6 @@ import 'screens/addCam/add_cam_main.dart';
|
||||
|
||||
class HomePage extends StatelessWidget {
|
||||
const HomePage({super.key});
|
||||
|
||||
|
||||
void _sendFile() async {
|
||||
FilePickerResult? result = await FilePicker.platform.pickFiles();
|
||||
@@ -29,69 +28,86 @@ class HomePage extends StatelessWidget {
|
||||
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),
|
||||
),
|
||||
PopupMenuItem(
|
||||
value: '/introScreen',
|
||||
child:
|
||||
Text(AppLocalizations.of(context)!.showloginscreen))
|
||||
])
|
||||
onSelected: (value) {
|
||||
Navigator.pushNamed(context, value.toString());
|
||||
},
|
||||
itemBuilder:
|
||||
(context) => [
|
||||
PopupMenuItem(
|
||||
value: '/settings',
|
||||
child: Text(AppLocalizations.of(context)!.settings),
|
||||
),
|
||||
PopupMenuItem(
|
||||
value: '/introScreen',
|
||||
child: Text(AppLocalizations.of(context)!.showloginscreen),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
body: Column(
|
||||
children: [
|
||||
Image.asset('assets/images/reconix_small.png'),
|
||||
Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
const SizedBox(height: 30,),
|
||||
ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
minimumSize: const Size(250, 40),
|
||||
padding: const EdgeInsets.fromLTRB(10, 5, 10, 5),
|
||||
),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
const SizedBox(height: 30),
|
||||
ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
minimumSize: const Size(250, 40),
|
||||
padding: const EdgeInsets.fromLTRB(10, 5, 10, 5),
|
||||
),
|
||||
onPressed: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => const AddCamMain()));
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => const AddCamMain(),
|
||||
),
|
||||
);
|
||||
},
|
||||
child: Text(AppLocalizations.of(context)!.addplace)),
|
||||
|
||||
const SizedBox(height: 10,),
|
||||
ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
minimumSize: const Size(250, 40)
|
||||
child: Text(AppLocalizations.of(context)!.addplace),
|
||||
),
|
||||
|
||||
const SizedBox(height: 10),
|
||||
ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
minimumSize: const Size(250, 40),
|
||||
),
|
||||
onPressed: () => Navigator.pushNamed(context, '/excursion'),
|
||||
child: Text(AppLocalizations.of(context)!.excursion)), // Excursion
|
||||
child: Text(AppLocalizations.of(context)!.excursion),
|
||||
), // Excursion
|
||||
|
||||
const SizedBox(height: 10,),
|
||||
ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
minimumSize: const Size(250, 40)
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
minimumSize: const Size(250, 40),
|
||||
),
|
||||
onPressed: () => Navigator.pushNamed(context, '/viewCams'),
|
||||
child: Text(AppLocalizations.of(context)!.viewplaces)),
|
||||
|
||||
const SizedBox(height: 10,),
|
||||
ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
minimumSize: const Size(250, 40)
|
||||
child: Text(AppLocalizations.of(context)!.viewplaces),
|
||||
),
|
||||
|
||||
ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
minimumSize: const Size(250, 40),
|
||||
),
|
||||
onPressed: () => Navigator.pushNamed(context, '/viewExcursionen'),
|
||||
child: Text(AppLocalizations.of(context)!.viewplaces),
|
||||
),
|
||||
|
||||
const SizedBox(height: 10),
|
||||
ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
minimumSize: const Size(250, 40),
|
||||
),
|
||||
onPressed: () {
|
||||
_sendFile();
|
||||
},
|
||||
child: Text(AppLocalizations.of(context)!.sendfile)),
|
||||
],
|
||||
)),
|
||||
child: Text(AppLocalizations.of(context)!.sendfile),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user