build method
dynamic
build
(- dynamic context
)
Implementation
@override
Widget build(BuildContext context) {
return Stack(alignment: Alignment.topCenter, children: <Widget>[
// Actual map
googleMap,
// Location Button
Positioned(
right: 20.0,
bottom: 120.0,
child: FloatingActionButton(
child: Icon(
Icons.gps_fixed,
color: Theme.of(context).brightness == Brightness.light
? Colors.black87
: Colors.white70,
),
backgroundColor: Theme.of(context).brightness == Brightness.light
? Colors.white
: null,
onPressed: () {
BlocProvider.of<MapBloc>(context).scrollToCurrentLocation();
},
),
),
]);
}