Bottomexpandableappbar Fluttter how to make it work

Asked

Viewed 37 times

2

Guys good night, I’m having problem that I can not solve, I’m trying to add an expansive menu bar at the bottom of the screen and is not appearing when I run the code

 import 'dart:async';
 import 'package:expandable_bottom_bar/expandable_bottom_bar.dart';
 import 'package:flutter/material.dart';
 import 'package:google_maps_flutter/google_maps_flutter.dart';




  class Mapateste  extends StatefulWidget {
 @override
  State<Mapateste> createState() => MapatesteState();
 }

 class MapatesteState extends State<Mapateste> with 
 SingleTickerProviderStateMixin{
   BottomBarController controller;
   Completer<GoogleMapController> _controller = Completer();

  static final CameraPosition myhome = CameraPosition(
  target: LatLng(-23.195874, -45.883488),
  zoom: 14.4746,


);


 @override
  void initState() {
  super.initState();
  controller = BottomBarController(vsync: this, dragLength: 550, snap: 
  true);
}


@override
Widget build(BuildContext context) {
  return new Scaffold(   



  body: Stack( 

    children:<Widget>[


      GoogleMap(

        onMapCreated: (GoogleMapController controller){
          _controller.complete(controller);
        },
        mapType: MapType.normal,
        myLocationEnabled: true,
        initialCameraPosition: myhome,
        ),



      BottomExpandableAppBar(
        controller: controller, 
        expandedHeight: controller.dragLength,
        horizontalMargin: 16,
        expandedBackColor: Color.fromRGBO(16, 6, 144, 1),
      ),

    ],


   );

  }

 }
  • Welcome to Stack Overflow! Your question seems to have some problems and your experience here in Stack Overflow may not be the best because of this. We want you to do well here and get what you want, but for that we need you to do your part. Here are some guidelines that will help you: Stack Overflow Survival Guide in English.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.