mirror of
				https://github.com/immich-app/immich.git
				synced 2025-10-31 10:49:11 -04:00 
			
		
		
		
	* chore: maplibre gl pubspec * refactor(wip): maplibre for maps * refactor(wip): dual pane + location button * chore: remove flutter_map and deps * refactor(wip): map zoom to location * refactor: location picker * open gallery_viewer on marker tap * remove detectScaleGesture param * test: debounce and throttle * chore: rename get location method * feat(mobile): Adds gps locator to map prompt for easy geolocation (#6282) * Refactored get gps coords * Use var for linter's sake, should handle errors better * Cleanup * Fix linter issues * chore(dep): update maplibre to official lib --------- Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com> Co-authored-by: Joshua Herrera <joshua.herrera227@gmail.com>
		
			
				
	
	
		
			54 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Dart
		
	
	
	
	
	
			
		
		
	
	
			54 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Dart
		
	
	
	
	
	
| import 'package:flutter/material.dart';
 | |
| import 'package:immich_mobile/extensions/build_context_extensions.dart';
 | |
| 
 | |
| class CustomDraggingHandle extends StatelessWidget {
 | |
|   const CustomDraggingHandle({super.key});
 | |
| 
 | |
|   @override
 | |
|   Widget build(BuildContext context) {
 | |
|     return Container(
 | |
|       height: 4,
 | |
|       width: 30,
 | |
|       decoration: BoxDecoration(
 | |
|         color: context.themeData.dividerColor,
 | |
|         borderRadius: const BorderRadius.all(Radius.circular(20)),
 | |
|       ),
 | |
|     );
 | |
|   }
 | |
| }
 | |
| 
 | |
| class ControlBoxButton extends StatelessWidget {
 | |
|   const ControlBoxButton({
 | |
|     Key? key,
 | |
|     required this.label,
 | |
|     required this.iconData,
 | |
|     this.onPressed,
 | |
|   }) : super(key: key);
 | |
| 
 | |
|   final String label;
 | |
|   final IconData iconData;
 | |
|   final void Function()? onPressed;
 | |
| 
 | |
|   @override
 | |
|   Widget build(BuildContext context) {
 | |
|     return MaterialButton(
 | |
|       padding: const EdgeInsets.all(10),
 | |
|       shape: const CircleBorder(),
 | |
|       onPressed: onPressed,
 | |
|       minWidth: 75.0,
 | |
|       child: Column(
 | |
|         mainAxisAlignment: MainAxisAlignment.center,
 | |
|         crossAxisAlignment: CrossAxisAlignment.center,
 | |
|         children: [
 | |
|           Icon(iconData, size: 24),
 | |
|           const SizedBox(height: 4),
 | |
|           Text(
 | |
|             label,
 | |
|             style: const TextStyle(fontSize: 12.0),
 | |
|           ),
 | |
|         ],
 | |
|       ),
 | |
|     );
 | |
|   }
 | |
| }
 |