Térkép refraktorálás

This commit is contained in:
2026-05-17 00:35:21 +02:00
parent d50a324e44
commit ee0f90e247
5 changed files with 499 additions and 98 deletions
@@ -12,6 +12,7 @@ import 'package:terepi_seged/pages/map_survey/presentations/controllers/map_surv
import 'package:terepi_seged/pages/map_survey/presentations/views/settings_dialog.dart';
import 'package:terepi_seged/utils/rive_utils.dart';
import 'package:terepi_seged/widgets/coordinate_panel.dart';
import 'package:terepi_seged/widgets/map_bottom_panel.dart';
import 'package:terepi_seged/widgets/save_point_fab.dart';
import 'package:terepi_seged/widgets/shared_map_widgets.dart';
@@ -26,26 +27,31 @@ class MapSurveyView extends GetView<MapSurveyController> {
const SharedMapWidget(),
Positioned(
top: 8,
right: 8,
right: 60,
left: 8,
child: CoordinatePanel.fromController(controller),
),
Positioned(top: 8, left: 0, right: 0, child: _ModeSelector()),
// Positioned(top: 8, left: 0, right: 0, child: _ModeSelector()),
// Positioned(
// bottom: 80,
// left: 8,
// right: 8,
// child: Obx(
// () => controller.mode.value == MapSurveyMode.stakeout
// ? _StakeoutPanel() // ΔY, ΔX, távolság, irányszög
// : const SizedBox.shrink(),
// ),
// ),
// Positioned(
// bottom: 16,
// right: 16,
// child: SavePointFab(controller: controller),
// ),
Positioned(
bottom: 80,
left: 8,
right: 8,
child: Obx(
() => controller.mode.value == MapSurveyMode.stakeout
? _StakeoutPanel() // ΔY, ΔX, távolság, irányszög
: const SizedBox.shrink(),
),
),
Positioned(
bottom: 16,
right: 16,
child: SavePointFab(controller: controller),
),
bottom: 0,
left: 0,
right: 0,
child: MapBottomPanel(controller: controller))
]);
}
}
@@ -4,6 +4,7 @@ class ShellController extends GetxController {
static ShellController get to => Get.find();
final currentIndex = 0.obs;
final isNavBarVisible = true.obs;
static const titles = [
'Térkép',
@@ -24,4 +25,8 @@ class ShellController extends GetxController {
void goToSurvey() => goToTab(1);
void goToTracking() => goToTab(2);
void goToData() => goToTab(3);
void showNavBar() => isNavBarVisible.value = true;
void hideNavBar() => isNavBarVisible.value = false;
void toggleNavBar() => isNavBarVisible.value = !isNavBarVisible.value;
}
@@ -46,30 +46,37 @@ class ShellView extends GetView<ShellController> {
index: controller.currentIndex.value,
children: _pages,
)),
bottomNavigationBar: Obx(() => NavigationBar(
selectedIndex: controller.currentIndex.value,
onDestinationSelected: controller.goToTab,
destinations: const [
NavigationDestination(
icon: Icon(Icons.map_outlined),
selectedIcon: Icon(Icons.map),
label: 'Térkép',
),
NavigationDestination(
icon: Icon(Icons.gps_fixed),
label: 'Mérés',
),
NavigationDestination(
icon: Icon(Icons.route),
label: 'Track',
),
NavigationDestination(
icon: Icon(Icons.table_chart_outlined),
selectedIcon: Icon(Icons.table_chart),
label: 'Adatok',
),
],
)),
bottomNavigationBar: Obx(
() => AnimatedSize(
duration: const Duration(milliseconds: 250),
curve: Curves.easeInOut,
child: controller.isNavBarVisible.value
? NavigationBar(
selectedIndex: controller.currentIndex.value,
onDestinationSelected: controller.goToTab,
destinations: const [
NavigationDestination(
icon: Icon(Icons.map_outlined),
selectedIcon: Icon(Icons.map),
label: 'Térkép',
),
NavigationDestination(
icon: Icon(Icons.gps_fixed),
label: 'Mérés',
),
NavigationDestination(
icon: Icon(Icons.route),
label: 'Track',
),
NavigationDestination(
icon: Icon(Icons.table_chart_outlined),
selectedIcon: Icon(Icons.table_chart),
label: 'Adatok',
),
],
)
: const SizedBox.shrink()),
),
);
}
}