Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2020
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 1.51 KB | None | 0 0
  1. Completer<GoogleMapController> _controller=Completer();
  2.   SnappingSheetController sheetController = SnappingSheetController();
  3.  void onMapCreated(controller) {
  4.     setState(() {
  5.       _controller.complete(controller);
  6.     });
  7.   }
  8.   @override
  9.   Widget build(BuildContext context) {
  10.  return SnappingSheet(grabbingHeight: 60,
  11.  sheetBelow: Container(
  12.                 color: Colors.white,
  13.                 child: GoogleMap(
  14.                   initialCameraPosition: CameraPosition(
  15.                       target: LatLng(Location.latitude, Location.longitude),
  16.                       zoom: 18),
  17. //                  markers: ,
  18.                   myLocationEnabled: true,
  19.                   onMapCreated: onMapCreated,
  20.                 ),
  21.               ),
  22.               grabbing: Container(
  23.                 height: 20,
  24.                 decoration: ShapeDecoration(
  25.                     color: Colors.amber,
  26.                     shape: RoundedRectangleBorder(
  27.                         borderRadius: BorderRadius.only(
  28.                             topLeft: Radius.circular(30),
  29.                             topRight: Radius.circular(30)))),
  30.                 padding: EdgeInsets.only(top: 10),
  31.                 child: Text(
  32.                   "See in Map",
  33.                   textAlign: TextAlign.center,
  34.                   style: TextStyle(
  35.                     fontSize: 30,
  36.                     color: Colors.white,
  37.                     fontWeight: FontWeight.bold,
  38.                   ),
  39.                 ),
  40.               ),
  41.             );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement