Skip to content

Instantly share code, notes, and snippets.

@kenzieschmoll
Created February 28, 2019 01:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kenzieschmoll/298993419c20707a60aa79cdd715f008 to your computer and use it in GitHub Desktop.
Save kenzieschmoll/298993419c20707a60aa79cdd715f008 to your computer and use it in GitHub Desktop.
Maps Sample V2 - add widget on top of map
body: Stack(
children: <Widget>[
GoogleMap(
onMapCreated: _onMapCreated,
initialCameraPosition: CameraPosition(
target: _center,
zoom: 11.0,
),
),
Padding(
padding: const EdgeInsets.all(16.0),
child: Align(
alignment: Alignment.topRight,
child: FloatingActionButton(
onPressed: () => print('button pressed'),
materialTapTargetSize: MaterialTapTargetSize.padded,
backgroundColor: Colors.green,
child: const Icon(Icons.map, size: 36.0),
),
),
),
],
),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment