Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD

backdrop implementation

backdrop implementation in flutter.

this widget is in active development. wait for the stable v1.0.0. any contribution, idea, criticism or feedback is welcomed.

backdrop implementation

usage

backdropscaffold

use backdropscaffold instead of the standard scaffold in your app.
a backlayer and a frontlayer have to be defined for the backdrop to work.

backdropscaffold(
    title: text("backdrop example"),
    backlayer: center(
        child: text("back layer"),
    ),
    frontlayer: center(
        child: text("front layer"),
    ),
    iconposition: backdropiconposition.leading,
)

68747470733a2f2f6769746c61622e636f6d2f64616164752f6261636b64726f702f7261772f6d61737465722f2e6769746c61622f6261636b64726f705f6e617669676174696f6e2e676966

to use backdrop for navigation, use the provided backdropnavigationbacklayer as backlayer.

the backdropnavigationbacklayer contains a property items representing the list elements shown on the back layer. the front layer has to be “manually” set depending on the current index, which can be accessed with the ontap callback.

class _myappstate extends state<myapp> {
  int _currentindex = 0;
  final list<widget> _frontlayers = [widget1(), widget2()];

  @override
  widget build(buildcontext context) {
    return new materialapp(
      title: 'backdrop demo',
      home: backdropscaffold(
        title: text("backdrop navigation example"),
        iconposition: backdropiconposition.leading,
        actions: <widget>[
          backdroptogglebutton(
            icon: animatedicons.list_view,
          ),
        ],
        frontlayer: _frontlayers[_currentindex],
        backlayer: backdropnavigationbacklayer(
          items: [
            listtile(title: text("widget 1")),
            listtile(title: text("widget 2")),
          ],
          ontap: (int position) => {setstate(() => _currentindex = position)},
        ),
      ),
    );
  }
}
backdropnavigationscaffold example

for more information, check out sample code in the example directory


Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD

Comments are closed.