GnssService osztály és refraktorálás a app_drawer miatt, shellview bevezetés.
This commit is contained in:
@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:terepi_seged/pages/home/presentation/controllers/home_controller.dart';
|
||||
import 'package:terepi_seged/pages/home/presentation/widgets/big_button_widget.dart';
|
||||
import 'package:terepi_seged/widgets/app_drawer.dart';
|
||||
|
||||
class HomeView extends GetView<HomeViewController> {
|
||||
const HomeView({Key? key}) : super(key: key);
|
||||
@@ -10,195 +11,179 @@ class HomeView extends GetView<HomeViewController> {
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
color: Colors.white,
|
||||
child: Scaffold(
|
||||
extendBody: true,
|
||||
backgroundColor: Colors.black.withOpacity(0.05),
|
||||
appBar: AppBar(
|
||||
elevation: 0.0,
|
||||
title: const Text('Kezdőlap'),
|
||||
leading: IconButton(
|
||||
icon: const Icon(Icons.arrow_back_ios),
|
||||
color: Colors.white,
|
||||
onPressed: () {
|
||||
Get.back();
|
||||
},
|
||||
child: Column(children: [
|
||||
Column(
|
||||
children: const [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(top: 10.0),
|
||||
child: Center(
|
||||
child: Text("Kezdőlap"),
|
||||
),
|
||||
),
|
||||
// TextButton(
|
||||
// onPressed: () async {
|
||||
// Get.toNamed('/map');
|
||||
// },
|
||||
// child: const Text('Map')),
|
||||
// TextButton(
|
||||
// onPressed: () async {
|
||||
// Get.toNamed('/bluetooth_test');
|
||||
// },
|
||||
// child: const Text('Bluetooth test')),
|
||||
// TextButton(
|
||||
// onPressed: () async {
|
||||
// Get.toNamed('/socket_test');
|
||||
// },
|
||||
// child: const Text('Socket teszt')),
|
||||
// TextButton(
|
||||
// onPressed: () async {
|
||||
// Get.toNamed('/rtcm_test');
|
||||
// },
|
||||
// child: const Text('RTCM teszt'))
|
||||
],
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 10.0),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
TextButton(
|
||||
onPressed: () async {
|
||||
Get.toNamed("/field_trip");
|
||||
},
|
||||
child: Text('Field trip')),
|
||||
// TextButton(
|
||||
// onPressed: () async {
|
||||
// Get.toNamed("/tracking");
|
||||
// },
|
||||
// child: Text('Tracking')),
|
||||
TextButton(
|
||||
onPressed: () async {
|
||||
Get.toNamed("/map");
|
||||
},
|
||||
child: Text('Kitűzés'))
|
||||
])),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 10.0),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
// BigButtonWidget(
|
||||
// iconData: Icons.flag,
|
||||
// label: "Kitűzés",
|
||||
// onPressed: () async {
|
||||
// Get.toNamed('/map');
|
||||
// },
|
||||
// ),
|
||||
BigButtonWidget(
|
||||
iconData: Icons.flag,
|
||||
label: "Bemérés",
|
||||
onPressed: () async {
|
||||
Get.toNamed('/map_survey');
|
||||
},
|
||||
),
|
||||
BigButtonWidget(
|
||||
iconData: Icons.monitor_heart,
|
||||
label: "Mérés",
|
||||
onPressed: () async {
|
||||
Get.toNamed("/measured_data");
|
||||
// ScaffoldMessenger.of(context)
|
||||
// .showSnackBar(const SnackBar(
|
||||
// content: Text(
|
||||
// "Fejlesztlés alatt",
|
||||
// style: TextStyle(fontWeight: FontWeight.bold),
|
||||
// ),
|
||||
// backgroundColor: Colors.black54,
|
||||
// ));
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
body: Column(children: [
|
||||
Column(
|
||||
children: const [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(top: 10.0),
|
||||
child: Center(
|
||||
child: Text("Kezdőlap"),
|
||||
),
|
||||
),
|
||||
// TextButton(
|
||||
// onPressed: () async {
|
||||
// Get.toNamed('/map');
|
||||
// },
|
||||
// child: const Text('Map')),
|
||||
// TextButton(
|
||||
// onPressed: () async {
|
||||
// Get.toNamed('/bluetooth_test');
|
||||
// },
|
||||
// child: const Text('Bluetooth test')),
|
||||
// TextButton(
|
||||
// onPressed: () async {
|
||||
// Get.toNamed('/socket_test');
|
||||
// },
|
||||
// child: const Text('Socket teszt')),
|
||||
// TextButton(
|
||||
// onPressed: () async {
|
||||
// Get.toNamed('/rtcm_test');
|
||||
// },
|
||||
// child: const Text('RTCM teszt'))
|
||||
],
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 10.0),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
TextButton(
|
||||
onPressed: () async {
|
||||
Get.toNamed("/field_trip");
|
||||
},
|
||||
child: Text('Field trip')),
|
||||
// TextButton(
|
||||
// onPressed: () async {
|
||||
// Get.toNamed("/tracking");
|
||||
// },
|
||||
// child: Text('Tracking')),
|
||||
TextButton(
|
||||
onPressed: () async {
|
||||
Get.toNamed("/map");
|
||||
},
|
||||
child: Text('Kitűzés'))
|
||||
])),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 10.0),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
// BigButtonWidget(
|
||||
// iconData: Icons.flag,
|
||||
// label: "Kitűzés",
|
||||
// onPressed: () async {
|
||||
// Get.toNamed('/map');
|
||||
// },
|
||||
// ),
|
||||
BigButtonWidget(
|
||||
iconData: Icons.flag,
|
||||
label: "Bemérés",
|
||||
onPressed: () async {
|
||||
Get.toNamed('/map_survey');
|
||||
},
|
||||
),
|
||||
BigButtonWidget(
|
||||
iconData: Icons.monitor_heart,
|
||||
label: "Mérés",
|
||||
onPressed: () async {
|
||||
Get.toNamed("/measured_data");
|
||||
// ScaffoldMessenger.of(context)
|
||||
// .showSnackBar(const SnackBar(
|
||||
// content: Text(
|
||||
// "Fejlesztlés alatt",
|
||||
// style: TextStyle(fontWeight: FontWeight.bold),
|
||||
// ),
|
||||
// backgroundColor: Colors.black54,
|
||||
// ));
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 10.0),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
BigButtonWidget(
|
||||
iconData: Icons.navigation,
|
||||
label: "Navigáció",
|
||||
onPressed: () async {
|
||||
Get.toNamed('/navigation');
|
||||
// ScaffoldMessenger.of(context)
|
||||
// .showSnackBar(const SnackBar(
|
||||
// content: Text(
|
||||
// "Fejlesztlés alatt",
|
||||
// style: TextStyle(fontWeight: FontWeight.bold),
|
||||
// ),
|
||||
// backgroundColor: Colors.black54,
|
||||
// ));
|
||||
},
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 10.0),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
BigButtonWidget(
|
||||
iconData: Icons.navigation,
|
||||
label: "Navigáció",
|
||||
onPressed: () async {
|
||||
Get.toNamed('/navigation');
|
||||
// ScaffoldMessenger.of(context)
|
||||
// .showSnackBar(const SnackBar(
|
||||
// content: Text(
|
||||
// "Fejlesztlés alatt",
|
||||
// style: TextStyle(fontWeight: FontWeight.bold),
|
||||
// ),
|
||||
// backgroundColor: Colors.black54,
|
||||
// ));
|
||||
},
|
||||
),
|
||||
BigButtonWidget(
|
||||
iconData: Icons.message,
|
||||
label: "Üzenetek",
|
||||
onPressed: () async {
|
||||
// Get.toNamed("/navigation");
|
||||
ScaffoldMessenger.of(context)
|
||||
.showSnackBar(const SnackBar(
|
||||
content: Text(
|
||||
"Fejlesztlés alatt",
|
||||
style: TextStyle(fontWeight: FontWeight.bold),
|
||||
),
|
||||
backgroundColor: Colors.black54,
|
||||
));
|
||||
},
|
||||
),
|
||||
],
|
||||
BigButtonWidget(
|
||||
iconData: Icons.message,
|
||||
label: "Üzenetek",
|
||||
onPressed: () async {
|
||||
// Get.toNamed("/navigation");
|
||||
ScaffoldMessenger.of(context).showSnackBar(const SnackBar(
|
||||
content: Text(
|
||||
"Fejlesztlés alatt",
|
||||
style: TextStyle(fontWeight: FontWeight.bold),
|
||||
),
|
||||
backgroundColor: Colors.black54,
|
||||
));
|
||||
},
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 10.0),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
BigButtonWidget(
|
||||
iconData: Icons.house,
|
||||
label: "Ingatlanok",
|
||||
onPressed: () async {
|
||||
// Get.toNamed('/map_test');
|
||||
ScaffoldMessenger.of(context)
|
||||
.showSnackBar(const SnackBar(
|
||||
content: Text(
|
||||
"Fejlesztlés alatt",
|
||||
style: TextStyle(fontWeight: FontWeight.bold),
|
||||
),
|
||||
backgroundColor: Colors.black54,
|
||||
));
|
||||
},
|
||||
),
|
||||
BigButtonWidget(
|
||||
iconData: Icons.edit_road,
|
||||
label: "Track",
|
||||
onPressed: () async {
|
||||
Get.toNamed("/tracking");
|
||||
// ScaffoldMessenger.of(context)
|
||||
// .showSnackBar(const SnackBar(
|
||||
// content: Text(
|
||||
// "Fejlesztlés alatt",
|
||||
// style: TextStyle(fontWeight: FontWeight.bold),
|
||||
// ),
|
||||
// backgroundColor: Colors.black54,
|
||||
// ));
|
||||
},
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 10.0),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
BigButtonWidget(
|
||||
iconData: Icons.house,
|
||||
label: "Ingatlanok",
|
||||
onPressed: () async {
|
||||
// Get.toNamed('/map_test');
|
||||
ScaffoldMessenger.of(context).showSnackBar(const SnackBar(
|
||||
content: Text(
|
||||
"Fejlesztlés alatt",
|
||||
style: TextStyle(fontWeight: FontWeight.bold),
|
||||
),
|
||||
backgroundColor: Colors.black54,
|
||||
));
|
||||
},
|
||||
),
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Obx(
|
||||
() => Text(
|
||||
"Verzió: ${controller.packageInfo.value.version}+${controller.packageInfo.value.buildNumber}",
|
||||
style: const TextStyle(fontSize: 12)),
|
||||
)
|
||||
],
|
||||
BigButtonWidget(
|
||||
iconData: Icons.edit_road,
|
||||
label: "Track",
|
||||
onPressed: () async {
|
||||
Get.toNamed("/tracking");
|
||||
// ScaffoldMessenger.of(context)
|
||||
// .showSnackBar(const SnackBar(
|
||||
// content: Text(
|
||||
// "Fejlesztlés alatt",
|
||||
// style: TextStyle(fontWeight: FontWeight.bold),
|
||||
// ),
|
||||
// backgroundColor: Colors.black54,
|
||||
// ));
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Obx(
|
||||
() => Text(
|
||||
"Verzió: ${controller.packageInfo.value.version}+${controller.packageInfo.value.buildNumber}",
|
||||
style: const TextStyle(fontSize: 12)),
|
||||
)
|
||||
])));
|
||||
],
|
||||
)
|
||||
]));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user