Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Completer<GoogleMapController> _controller=Completer();
- SnappingSheetController sheetController = SnappingSheetController();
- void onMapCreated(controller) {
- setState(() {
- _controller.complete(controller);
- });
- }
- @override
- Widget build(BuildContext context) {
- return SnappingSheet(grabbingHeight: 60,
- sheetBelow: Container(
- color: Colors.white,
- child: GoogleMap(
- initialCameraPosition: CameraPosition(
- target: LatLng(Location.latitude, Location.longitude),
- zoom: 18),
- // markers: ,
- myLocationEnabled: true,
- onMapCreated: onMapCreated,
- ),
- ),
- grabbing: Container(
- height: 20,
- decoration: ShapeDecoration(
- color: Colors.amber,
- shape: RoundedRectangleBorder(
- borderRadius: BorderRadius.only(
- topLeft: Radius.circular(30),
- topRight: Radius.circular(30)))),
- padding: EdgeInsets.only(top: 10),
- child: Text(
- "See in Map",
- textAlign: TextAlign.center,
- style: TextStyle(
- fontSize: 30,
- color: Colors.white,
- fontWeight: FontWeight.bold,
- ),
- ),
- ),
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement