2026-06-16 14:12:44 +02:00
|
|
|
import 'package:flutter/material.dart';
|
2026-06-19 12:53:50 +02:00
|
|
|
import 'package:get/get.dart';
|
2026-06-16 14:12:44 +02:00
|
|
|
import 'package:terepi_seged/enums/map_edit_tool.dart';
|
|
|
|
|
import 'package:terepi_seged/pages/map_survey/presentations/controllers/map_survey_controller.dart';
|
2026-06-20 22:29:15 +02:00
|
|
|
import 'package:terepi_seged/widgets/map_edit_tools/note_audio_widget.dart';
|
|
|
|
|
import 'package:terepi_seged/widgets/map_edit_tools/note_photo_gallery.dart';
|
2026-06-16 14:12:44 +02:00
|
|
|
|
|
|
|
|
import 'color_row.dart';
|
|
|
|
|
import 'label_field.dart';
|
|
|
|
|
import 'opacity_slider.dart';
|
|
|
|
|
import 'save_sheet_actions.dart';
|
|
|
|
|
import 'sheet_handle.dart';
|
|
|
|
|
import 'stroke_slider.dart';
|
|
|
|
|
|
|
|
|
|
class MapFeatureSaveSheet extends StatelessWidget {
|
|
|
|
|
final MapSurveyController ctrl;
|
|
|
|
|
final ScrollController scrollCtrl;
|
|
|
|
|
const MapFeatureSaveSheet({
|
|
|
|
|
required this.ctrl,
|
|
|
|
|
required this.scrollCtrl,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
return Container(
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Theme.of(context).colorScheme.surface,
|
|
|
|
|
borderRadius: const BorderRadius.vertical(top: Radius.circular(16)),
|
|
|
|
|
boxShadow: [
|
|
|
|
|
BoxShadow(
|
|
|
|
|
color: Colors.black.withOpacity(0.15),
|
|
|
|
|
blurRadius: 16,
|
|
|
|
|
offset: const Offset(0, -4),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
child: CustomScrollView(
|
|
|
|
|
controller: scrollCtrl,
|
|
|
|
|
slivers: [
|
|
|
|
|
SliverToBoxAdapter(
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
// Handle
|
|
|
|
|
SheetHandle(),
|
|
|
|
|
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.fromLTRB(20, 0, 20, 0),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
const Text(
|
|
|
|
|
'Stílus',
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 18, fontWeight: FontWeight.w600),
|
|
|
|
|
),
|
|
|
|
|
const SizedBox(height: 16),
|
|
|
|
|
ColorRow(ctrl: ctrl),
|
|
|
|
|
const SizedBox(height: 18),
|
|
|
|
|
OpacitySlider(ctrl: ctrl),
|
|
|
|
|
const SizedBox(height: 10),
|
2026-06-19 12:53:50 +02:00
|
|
|
Obx(() => ctrl.activeEditTool.value != MapEditTool.point
|
|
|
|
|
? Column(children: [
|
|
|
|
|
StrokeSlider(ctrl: ctrl),
|
|
|
|
|
const SizedBox(
|
|
|
|
|
height: 1,
|
|
|
|
|
)
|
|
|
|
|
])
|
|
|
|
|
: const SizedBox.shrink()),
|
2026-06-16 14:12:44 +02:00
|
|
|
LabelField(ctrl: ctrl),
|
2026-06-20 22:29:15 +02:00
|
|
|
const SizedBox(height: 16),
|
|
|
|
|
NotePhotoGallery(noteItemId: ctrl.editingNoteItemId),
|
|
|
|
|
const SizedBox(height: 16),
|
|
|
|
|
NoteAudioWidget(noteItemId: ctrl.editingNoteItemId),
|
2026-06-16 14:12:44 +02:00
|
|
|
const SizedBox(height: 24),
|
|
|
|
|
SaveSheetActions(ctrl: ctrl),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: MediaQuery.of(context).padding.bottom + 12),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|