fix: resolve 2 remaining strict analysis errors
- introPage.dart: Convert fireItems to proper static function closure - mainDrawer.dart: Convert unreadCount int to String for Text widget
This commit is contained in:
parent
1864e5b105
commit
7a4c9fb3bc
61 changed files with 1386 additions and 1202 deletions
|
|
@ -1,20 +1,23 @@
|
|||
import 'package:comunes_flutter/comunes_flutter.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_map/flutter_map.dart';
|
||||
import 'package:latlong2/latlong.dart';
|
||||
|
||||
/// Zoom control widget for flutter_map v6+
|
||||
class ZoomMapPluginWidget extends StatelessWidget {
|
||||
const ZoomMapPluginWidget({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return LayoutBuilder(
|
||||
builder: (context, constraints) =>
|
||||
builder: (BuildContext context, BoxConstraints constraints) =>
|
||||
Stack(fit: StackFit.expand, children: <Widget>[
|
||||
Positioned(
|
||||
top: constraints.maxHeight - 100,
|
||||
right: 10.0,
|
||||
child: new CenteredRow(
|
||||
child: CenteredRow(
|
||||
children: <Widget>[
|
||||
new Column(
|
||||
Column(
|
||||
children: <Widget>[
|
||||
_zoomButton(context, Icons.zoom_in, 1),
|
||||
_zoomButton(context, Icons.zoom_out, -1)
|
||||
|
|
@ -27,12 +30,12 @@ class ZoomMapPluginWidget extends StatelessWidget {
|
|||
}
|
||||
|
||||
IconButton _zoomButton(BuildContext context, IconData zoomIcon, int inc) {
|
||||
return new IconButton(
|
||||
return IconButton(
|
||||
icon: Icon(zoomIcon),
|
||||
onPressed: () {
|
||||
final controller = MapController.of(context);
|
||||
var currentZoom = controller.camera.zoom;
|
||||
var currentCenter = controller.camera.center;
|
||||
final MapController controller = MapController.of(context);
|
||||
final double currentZoom = controller.camera.zoom;
|
||||
final LatLng currentCenter = controller.camera.center;
|
||||
controller.move(currentCenter, currentZoom + inc);
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue