import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:terepi_seged/pages/map_survey/presentations/controllers/map_survey_controller.dart'; class SaveSheetActions extends StatelessWidget { final MapSurveyController ctrl; const SaveSheetActions({required this.ctrl}); @override Widget build(BuildContext context) { return Row(children: [ // ← Vissza — bezárja a sheet-et, folytatja a rajzolást Expanded( child: OutlinedButton.icon( style: OutlinedButton.styleFrom( padding: const EdgeInsets.symmetric(vertical: 14), shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)), ), icon: const Icon(Icons.arrow_back, size: 18), label: const Text('Vissza'), onPressed: () => Navigator.pop(context), ), ), const SizedBox(width: 12), // Mentés — végleges mentés, mindkét sheet bezárása Expanded( flex: 2, child: Obx(() => FilledButton.icon( style: FilledButton.styleFrom( backgroundColor: ctrl.activeEditColor.value, padding: const EdgeInsets.symmetric(vertical: 14), shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(10)), ), icon: const Icon(Icons.check, size: 18), label: const Text( 'Mentés', style: TextStyle(fontWeight: FontWeight.w600, fontSize: 15), ), onPressed: () async { //Navigator.pop(context); // style sheet bezárás Get.back(); await ctrl.finishDraft(); }, )), ), ]); } }