mirror of
https://github.com/dz0ny/meshcore-sar.git
synced 2026-08-11 16:30:28 +00:00
fix: Reset fallback sharing state
This commit is contained in:
@@ -179,7 +179,7 @@ class DrawingMarkersLayer extends StatelessWidget {
|
||||
context: context,
|
||||
builder: (context) => AlertDialog(
|
||||
title: Text(AppLocalizations.of(context)!.deleteDrawing),
|
||||
content: Text('Delete this ${drawing.type.name}?'),
|
||||
content: Text(AppLocalizations.of(context)!.deleteThisDrawing(drawing.type.name)),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () => Navigator.pop(context),
|
||||
|
||||
@@ -398,7 +398,7 @@ class DrawingToolbar extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
},
|
||||
tooltip: 'Share',
|
||||
tooltip: AppLocalizations.of(context)!.share,
|
||||
color: Colors.blue,
|
||||
padding: const EdgeInsets.all(4),
|
||||
constraints: const BoxConstraints(),
|
||||
@@ -415,7 +415,7 @@ class DrawingToolbar extends StatelessWidget {
|
||||
drawing,
|
||||
);
|
||||
},
|
||||
tooltip: 'Delete',
|
||||
tooltip: AppLocalizations.of(context)!.delete,
|
||||
color: Colors.red,
|
||||
padding: const EdgeInsets.all(4),
|
||||
constraints: const BoxConstraints(),
|
||||
|
||||
@@ -5,6 +5,7 @@ import 'package:flutter_map/flutter_map.dart';
|
||||
import 'package:latlong2/latlong.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import '../../l10n/app_localizations.dart';
|
||||
import '../../providers/offline_tiles_provider.dart';
|
||||
|
||||
/// Renders polygon/rectangle drawing interaction on the map.
|
||||
@@ -199,7 +200,7 @@ class DrawingToolbar extends StatelessWidget {
|
||||
children: [
|
||||
_ToolButton(
|
||||
icon: Icons.crop_square,
|
||||
label: 'Rectangle',
|
||||
label: AppLocalizations.of(context)!.rectangle,
|
||||
isActive: provider.drawingMode == DrawingMode.rectangle,
|
||||
onTap: () => provider.setDrawingMode(
|
||||
provider.drawingMode == DrawingMode.rectangle
|
||||
@@ -210,7 +211,7 @@ class DrawingToolbar extends StatelessWidget {
|
||||
const SizedBox(height: 8),
|
||||
_ToolButton(
|
||||
icon: Icons.pentagon_outlined,
|
||||
label: 'Polygon',
|
||||
label: AppLocalizations.of(context)!.polygon,
|
||||
isActive: provider.drawingMode == DrawingMode.polygon,
|
||||
onTap: () => provider.setDrawingMode(
|
||||
provider.drawingMode == DrawingMode.polygon
|
||||
@@ -223,7 +224,7 @@ class DrawingToolbar extends StatelessWidget {
|
||||
const SizedBox(height: 8),
|
||||
_ToolButton(
|
||||
icon: Icons.check,
|
||||
label: 'Finish',
|
||||
label: AppLocalizations.of(context)!.finish,
|
||||
isActive: false,
|
||||
color: Colors.green,
|
||||
onTap: () => provider.finishPolygon(),
|
||||
@@ -234,7 +235,7 @@ class DrawingToolbar extends StatelessWidget {
|
||||
const SizedBox(height: 8),
|
||||
_ToolButton(
|
||||
icon: Icons.undo,
|
||||
label: 'Undo',
|
||||
label: AppLocalizations.of(context)!.undo,
|
||||
isActive: false,
|
||||
onTap: () => provider.undoLastVertex(),
|
||||
),
|
||||
@@ -243,7 +244,7 @@ class DrawingToolbar extends StatelessWidget {
|
||||
const SizedBox(height: 8),
|
||||
_ToolButton(
|
||||
icon: Icons.delete_outline,
|
||||
label: 'Clear',
|
||||
label: AppLocalizations.of(context)!.clear,
|
||||
isActive: false,
|
||||
color: Colors.red,
|
||||
onTap: () => provider.clearPolygons(),
|
||||
|
||||
Reference in New Issue
Block a user