mirror of
https://github.com/FoggedLens/deflock-app.git
synced 2026-09-30 13:09:35 +02:00
add zoom in/out buttons
This commit is contained in:
1 parent
a73605cc53
commit
e5d00803f7
1 file changed
+28
@@ -71,6 +71,34 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||
if (_followMe) setState(() => _followMe = false);
|
||||
},
|
||||
),
|
||||
// Zoom buttons
|
||||
Positioned(
|
||||
right: 10,
|
||||
bottom: MediaQuery.of(context).padding.bottom + kBottomButtonBarMargin + 120,
|
||||
child: Column(
|
||||
children: [
|
||||
FloatingActionButton(
|
||||
mini: true,
|
||||
onPressed: () {
|
||||
final currentZoom = _mapController.camera.zoom;
|
||||
_mapController.move(_mapController.camera.center, currentZoom + 0.5);
|
||||
},
|
||||
child: Icon(Icons.add),
|
||||
heroTag: 'zoom_in',
|
||||
),
|
||||
SizedBox(height: 8),
|
||||
FloatingActionButton(
|
||||
mini: true,
|
||||
onPressed: () {
|
||||
final currentZoom = _mapController.camera.zoom;
|
||||
_mapController.move(_mapController.camera.center, currentZoom - 0.5);
|
||||
},
|
||||
child: Icon(Icons.remove),
|
||||
heroTag: 'zoom_out',
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: Padding(
|
||||
|
||||
Reference in new issue
Block a user