Skip to content

Instantly share code, notes, and snippets.

@kenzieschmoll
Created December 3, 2018 17:32
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/436d1a04d483296eec07a500094f23a5 to your computer and use it in GitHub Desktop.
Save kenzieschmoll/436d1a04d483296eec07a500094f23a5 to your computer and use it in GitHub Desktop.
maps sample - add widget on top of map
body: Stack(
children: <Widget>[
GoogleMap(
onMapCreated: _onMapCreated,
options: GoogleMapOptions(
cameraPosition: 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