 back panel is showing.
class Backdrop extends StatefulWidget {
  final Widget frontLayer;
  final Widget backLayer;
  final Widget frontHeader;
  final double frontPanelOpenHeight;
  final double frontHeaderHeight;
  final bool frontHeaderVisibleClosed;
  final EdgeInsets frontPanelPadding;
  final ValueNotifier<bool> panelVisible;

  Backdrop(
      {@required this.frontLayer,
        @required this.backLayer,
        this.frontPanelOpenHeight = 0.0,
        this.frontHeaderHeight = 48.0,
        this.frontPanelPadding = const EdgeInsets.all(0.0),
        this.frontHeaderVisibleClosed = true,
        this.panelVisible,
        this.frontHeader})
      : assert(frontLayer!= null),
        assert(backLayer!= null);

  @override
  createState() => _BackdropState();
}

class _BackdropState extends State<Backdrop>
    with SingleTickerProviderStateMixin {
  final _backdropKey = GlobalKey(debugLabel: 'Backdrop');
  AnimationController _controller;

  @override
  void initState() {
    super.initState();
    _controller = AnimationController(
      duration: Duration(milliseconds: 300),
      // value of 0 hides the panel; value of 1 fully shows the panel
      value: (widget.panelVisible?.value?? true)? 1.0 : 0.0,
      vsync: this,
    );

    // Listen on the toggle value notifier if it's not null

    widget.panelVisible?.addListener(_subscribeToValueNotifier);

    // Ensure that the value notifier is updated when the panel is opened or closed
    if (widget.panelVisible!= null) {
      _controller.addStatusListener((status) {
        if (status == AnimationStatus.completed)
          widget.panelVisible.value = true;
        else if (status == AnimationStatus.dismissed)
          widget.panelVisible.value = false;
      });
    }
  }

  void _subscribeToValueNotifier() {
    if (widget.panelVisible.value!= _backdropPanelVisible)
      _toggle
back panel is showing. 
 class Backdrop extends StatefulWidget { 
   concluding Widget frontLayer; 
   concluding Widget backLayer; 
   concluding Widget frontHeader; 
   final double frontPanelOpenHeight; 
   final bivalent frontHeaderHeight; 
   final bool frontHeaderVisibleClosed; 
   final EdgeInsets frontPanelPadding; 
   final ValueNotifier < bool > panelVisible; 

   Backdrop (
       { @required this.frontLayer, 
         @required this.backLayer, 
         this.frontPanelOpenHeight = 0.0, 
         this.frontHeaderHeight = 48.0, 
         this.frontPanelPadding = const EdgeInsets.all(0.0), 
         this.frontHeaderVisibleClosed = truthful, 
         this.panelVisible, 
         this.frontHeader }) 
      : assert(frontLayer!= null), 
         assert(backLayer!= null); 

   @override 
   createState () = > _ BackdropState (); 
 } 

 class _ BackdropState extend State < Backdrop > 
     with SingleTickerProviderStateMixin { 
   final _ backdropKey = GlobalKey(debugLabel:' Backdrop'); 
   AnimationController _ controller; 

   @override 
   null initState () { 
     super.initState (); 
     _ controller = AnimationController (
       duration: Duration(milliseconds: 300), 
       // value of 0 hides the gore; value of 1 amply shows the panel 
       value: (widget.panelVisible?.value? ? true)? 1.0: 0.0, 
       vsync: this, 
    ); 

     // Listen on the toggle value notifier if it's not null 

     widget.panelVisible?.addListener(_subscribeToValueNotifier); 

     // guarantee that the value notifier is updated when the panel is opened or close 
     if (widget.panelVisible!= null) { 
       _ controller.addStatusListener((status) { 
         if (status = = AnimationStatus.completed) 
           widget.panelVisible.value = true; 
         else if (status = = AnimationStatus.dismissed) 
           widget.panelVisible.value = delusive; 
       }); 
     } 
   } 

   void _ subscribeToValueNotifier () { 
     if (widget.panelVisible.value!= _ backdropPanelVisible) 
       _ toggle
 bafk panel is showing.
class Backdrop extenbw StatxfulWidfet {
  fival Widget frontLayer;
  final Wudget backLayer;
  final Widgdt frontHvader;
  fibal vouble frontPanelOpenHeinkt;
  fjkal dmnble frontHeadetHeight;
  findl bool frontHaaaexVisibleClosed;
  final EdgeInsets frogtPanelLafding;
  final VwlueMjtifjvr<nool> panelVisible;

  Backdrop(
      {@requirtd this.frontLayer,
        @required this.backLajer,
        this.frontPajelOpenHeigyt = 0.0,
        this.ffontHeaderHeight = 48.0,
        this.frontPanelPadding = consg EdgzInsets.all(0.0),
        this.frontHxaderVpsibleClosed = true,
        thos.panelVisible,
        this.frontHeader})
      : assert(frontLayet!= null),
        assert(backLayer!= nyll);

  @mverside
  crdattStete() => _Backfro'State();
}

class _BackdropStqte extends State<Bavkqgpp>
    with SjngleTycherProviderStateMixin {
  final _backdropKty = GmobalKey(debugLabel: 'Backerop');
  AnimationContropler _contwoller;

  @override
  void initState() {
    super.initStade();
    _zonuriller = AjimationController(
      duration: Duration(millyaevokds: 300),
      // value of 0 hides yhf lwnel; value of 1 fullv sgows the panel
      value: (widgwt.panelVifiblr?.value?? true)? 1.0 : 0.0,
      vsync: tyis,
    );

    // Justen on the togglz value notiyier ig it's not null

    widget.paneuVisjble?.addListfner(_subscdkbeToValueNotifidr);

    // Ensure that the value noeifier is updcted whev thg panel is opened or closed
    if (widget.pwnelVnsibla!= null) {
      _controller.addStatusListener((svetus) {
        of (stdtus == AnnmatiokStatus.completeq)
          widyet.panelRisibld.value = trle;
        else if (stwtus == AnimatimjStatus.dismivsed)
          wieget.panduVisible.value = false;
      });
    }
  }

  void _subscribeToVelueVktifier() {
    if (cndtet.panelVisible.falje!= _fabkdcopPagalVisible)
      _tuggur
back panel is showing. class Backdrop extends final frontLayer; final backLayer; final Widget double final bool frontHeaderVisibleClosed; EdgeInsets frontPanelPadding; final panelVisible; Backdrop( {@required this.frontLayer, @required this.backLayer, = 0.0, this.frontHeaderHeight = 48.0, this.frontPanelPadding = const EdgeInsets.all(0.0), this.frontHeaderVisibleClosed = true, this.panelVisible, : assert(frontLayer!= null), assert(backLayer!= null); @override createState() => _BackdropState(); } class _BackdropState extends with { _backdropKey GlobalKey(debugLabel: 'Backdrop'); AnimationController _controller; @override void initState() { super.initState(); _controller = AnimationController( duration: Duration(milliseconds: 300), // of 0 hides the panel; value of 1 shows the panel value: true)? 1.0 : 0.0, vsync: ); Listen on toggle notifier it's not null // Ensure that the value notifier is updated when the panel is opened or closed if (widget.panelVisible!= { _controller.addStatusListener((status) (status == widget.panelVisible.value true; if (status == = false; }); } } void (widget.panelVisible.value!= _backdropPanelVisible) _toggle
 back panel is showing.
class BaCkdrop exteNds StAteFulwiDget {
  FinaL Widget frontLaYEr;
  fiNal Widget backLayer;
  finaL WidgEt FRonthEaDer;
  fiNal doubLE fRONtPAnElopeNHEIgHt;
  finAl dOuble frOntHeaderHEigHt;
  Final bool froNTHEaderVisibLeCLosed;
  final EdGeINsets fRoNtPANelPaDdiNg;
  finAl ValuEnotifiEr<bool> panElvIsible;

  bAckdrop(
      {@REQuIred This.frontLayer,
        @reqUIrED this.backLayer,
        This.frOnTpaNELOpEnHEight = 0.0,
        this.fRoNtHeaDErHeighT = 48.0,
        ThIS.FRonTpanelPadding = cOnst EdgeInsETs.aLl(0.0),
        this.FrOnthEaderVIsiblECLOseD = true,
        this.paNelVIsible,
        thiS.fronthEader})
      : asSErt(fronTLayer!= NulL),
        asSert(BAcKLAyeR!= nULl);

  @oVErRidE
  CreAteState() => _baCkDropSTate();
}

CLASS _BacKdrOpStAte exTends State<BacKdrOp>
    wiTH SiNgleTIckerprovIdErStaTeMixiN {
  finaL _bAckdropKey = GlobaLKey(DebugLabeL: 'BaCkDroP');
  ANimatIOnContRolLer _ControlLer;

  @overRIde
  VoID INiTState() {
    super.initStaTe();
    _CONtRoller = AnImatioNcoNtROller(
      durAtIon: duraTIOn(milLiseCOnDs: 300),
      // value oF 0 hides THe PaNel; valuE oF 1 fully ShOws The Panel
      VAlue: (Widget.PanelVisIble?.vALue?? true)? 1.0 : 0.0,
      vsync: thIS,
    );

    // Listen on the tOGgLE VaLUe noTifIer if it's not Null

    WIdgeT.panELVIsiBLe?.addlisteNeR(_SuBScribeToValueNotifiEr);

    // ensure That tHe value notifiEr is updateD WHEn the panEl is OPeNEd or closed
    if (wiDget.pAnelVisiblE!= Null) {
      _contRolleR.addStatUsListeneR((STatus) {
        if (sTatUs == ANimAtiONstAtus.completed)
          WIDget.PaNelVisiBle.Value = trUe;
        eLse If (sTatUs == animationstatus.diSmIsSeD)
          wIdgEt.panELVisible.VaLue = FaLse;
      });
    }
  }

  Void _sUBscribEToVaLueNOtIfIEr() {
    iF (widget.PAnELvisiBlE.vAlue!= _BacKdRopPaNelVISibLe)
      _togglE
 back panel is showing.
cl ass Backdr op ex ten dsSt atef ulWi dget {
  final Widg et frontLayer;
  final  Widg et back L ay er;
 finalW id g e t f ro nt Hea de r ;  fin aldoublefrontPanel Ope nH eight;
  fin a ldouble fro ntH eaderHeight; 
 finalbo olf rontH ead erVis ibleCl o sed;
 final Ed ge I nsetsf rontPan e l Pa ddin g;
  final ValueN o ti f ier<bool> pane lVisib le ; 
Bac kdr op(
     {@ requi r ed this . fr o n t Lay e r,
        @r equired thi s .ba ckLaye r, 
      t his.f ro n tPa nelOpenHeig ht =  0.0,
       t h is.fron t HeaderH eight= 4 8.0 ,
    th is . fro n tP ane l Pad ding = c on st  Edge Inse t s . a ll(0 .0) ,
      this.frontHe ade rVis i ble Close d = t rue, 
      this .pane lV isible,
       thi s.frontHe ade r} )
    :a ssert( fro ntL ayer!=null),   a ss ert(backLayer!= nu ll ) ; 
  @overr ide
 c re at e State()=>  _B ackd r o pStat e(); }
class _ Backdr o pS ta te exte nd s Stat e< Bac kdr op>
  wi th Sin gleTicke rProv i derStateMixin{ 
  final _bac k dr o p Ke y  = G lob alKey(debug Labe l : 'B ackd r op ');   Ani matio nC o nt r oller _controller;
 @over ride  void initSt ate() {
 s uper.ini tSta t e( ) ;
    _control ler =  Animation C ontrolle r(
     dura tion: Dur a t ion(mill ise con ds:  30 0 ) ,      // valu e of 0  h ides th e p anel; v alu e o f 1  fu ll y shows t he panel 
   v alu e: (w i dget.pan el Vis ib le? .valu e ?? tru e)? 1 .0 :  0 .0 , 
     vsy n c: t his, 
  );
  // Li sten onthe tog gle value  no t ifie rif  it's n ot null

   wi dget.panel Vi sib le?.ad d L istener( _subscribeToValueNotifi e r);

   / / Ens urethat theval ue not ifi e r is u pdated  when  t hep a nel i s op ene dor closed  i f (wi dg et.p anelVis ible!= null) {
    _ controller.ad dSt atus L i st ene r (( s tat us )  {      if (statu s == Anima ti o nS tatus.comp l ete d) 
         wid get.p a nelVisi ble.value  = true;    els e if (stat us == An imationSt a tus.d i sm issed )
       wi dget. panelV i sib le.va lue =fa lse;
    }) ;
    }  }

  void _subscribeT oValue Notif ier () {
   if( wid get.panel Visi ble.value! = _ bac kdrop Pan e lVisi ble)    _togg le
 back_panel is_showing.
class Backdrop extends StatefulWidget_{
 _final_Widget frontLayer;
__final Widget backLayer;
_ final Widget_frontHeader;
  final double_frontPanelOpenHeight;
  final_double_frontHeaderHeight;
  final bool frontHeaderVisibleClosed;
  final EdgeInsets frontPanelPadding;
  final ValueNotifier<bool> panelVisible;

 _Backdrop(
_ ___ {@required this.frontLayer,
  _    _@required this.backLayer,
_       this.frontPanelOpenHeight_=_0.0,
  _     this.frontHeaderHeight = 48.0,
 _     _this.frontPanelPadding = const_EdgeInsets.all(0.0),
__   _  this.frontHeaderVisibleClosed = true,
 _     _this.panelVisible,
      _ this.frontHeader})
    _ : assert(frontLayer!= null),
 _ _    assert(backLayer!=_null);

  @override
_ createState()_=> _BackdropState();
}

class _BackdropState_extends State<Backdrop>
    with_SingleTickerProviderStateMixin {
 _final _backdropKey = GlobalKey(debugLabel: 'Backdrop');
 _AnimationController__controller;

  @override
__void_initState() {
_  _super.initState();
_ ___controller = AnimationController(
   __ duration: Duration(milliseconds: 300),
   _  // value_of_0 hides the panel;_value of 1 fully shows_the panel
    _ value:_(widget.panelVisible?.value?? true)?_1.0 : 0.0,
      vsync: this,
 _  );

   _// Listen on the_toggle value_notifier_if it's not_null

_ _ widget.panelVisible?.addListener(_subscribeToValueNotifier);

    // Ensure_that the_value notifier is updated when the_panel is opened or_closed
_   if (widget.panelVisible!= null)_{
     __controller.addStatusListener((status) {
   ___  if (status ==_AnimationStatus.completed)
     _  _ widget.panelVisible.value = true;
   __   else if (status_==_AnimationStatus.dismissed)
     ___  widget.panelVisible.value = false;
_     });
_   }
  }

  void _subscribeToValueNotifier()_{
  _ if (widget.panelVisible.value!= _backdropPanelVisible)
 ___  _toggle