Files
Immich/mobile/lib/presentation/pages/map.page.dart
T
Adam Gastineau c04c81a979 chore(mobile): remove Drift* prefixes from classes and variables (#31038)
* chore(mobile): remove Drift* prefixes from classes and variables

* Remove *Drift* from related mocks
2026-08-26 19:11:12 +00:00

68 lines
2.0 KiB
Dart

import 'dart:async';
import 'package:auto_route/auto_route.dart';
import 'package:flutter/material.dart';
import 'package:immich_mobile/extensions/build_context_extensions.dart';
import 'package:immich_mobile/presentation/widgets/map/map.widget.dart';
import 'package:immich_mobile/presentation/widgets/map/map_settings_sheet.dart';
import 'package:maplibre_gl/maplibre_gl.dart';
@RoutePage()
class MapPage extends StatelessWidget {
final LatLng? initialLocation;
const MapPage({super.key, this.initialLocation});
Future<void> onSettingsPressed(BuildContext context) {
return showModalBottomSheet(
elevation: 0.0,
showDragHandle: true,
isScrollControlled: true,
context: context,
builder: (_) => const MapSettingsSheet(),
);
}
@override
Widget build(BuildContext context) {
return Scaffold(
extendBodyBehindAppBar: true,
body: Stack(
children: [
MapView(initialLocation: initialLocation),
Positioned(
left: 20,
top: 70,
child: IconButton.filled(
color: Colors.white,
onPressed: () => ContextHelper(context).pop(),
icon: const Icon(Icons.arrow_back_ios_new_rounded),
style: IconButton.styleFrom(
padding: const EdgeInsets.all(8),
backgroundColor: Colors.indigo,
shadowColor: Colors.black26,
elevation: 4,
),
),
),
Positioned(
right: 20,
top: 70,
child: IconButton.filled(
color: Colors.white,
onPressed: () => onSettingsPressed(context),
icon: const Icon(Icons.more_vert_rounded),
style: IconButton.styleFrom(
padding: const EdgeInsets.all(8),
backgroundColor: Colors.indigo,
shadowColor: Colors.black26,
elevation: 4,
),
),
),
],
),
);
}
}