Backdrop implementation in flutter.

Overview

Flutter Community: backdrop

backdrop

pub.dev analysis Demo Awesome Flutter Gitter All Contributors pub points popularity likes GitHub issues GitHub milestone GitHub stars GitHub forks Gitlab stars Gitlab forks

Backdrop implementation in flutter.

This widget is in active development. Any contribution, idea, criticism or feedback is welcomed.

Quick links

Package https://pub.dev/packages/backdrop
API Docs https://pub.dev/documentation/backdrop/latest/backdrop/backdrop-library.html
Live Demo https://fluttercommunity.github.io/backdrop/demo/#/
Git Repo https://github.com/fluttercommunity/backdrop
Issue Tracker https://github.com/fluttercommunity/backdrop/issues
Chat Room https://gitter.im/flutter-backdrop

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(
  appBar: BackdropAppBar(
    title: Text("Backdrop Example"),
    actions: <Widget>[
      BackdropToggleButton(
        icon: AnimatedIcons.list_view,
      )
    ],
  ),
  backLayer: Center(
    child: Text("Back Layer"),
  ),
  frontLayer: Center(
    child: Text("Front Layer"),
  ),
)
BackdropScaffold example

Navigation with backdrop

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.

int _currentIndex = 0;
final List<Widget> _pages = [Widget1(), Widget2()];

@override
Widget build(BuildContext context) {
  return MaterialApp(
    title: 'Backdrop Demo',
    home: BackdropScaffold(
      appBar: BackdropAppBar(
        title: Text("Navigation Example"),
        actions: <Widget>[
          BackdropToggleButton(
            icon: AnimatedIcons.list_view,
          )
        ],
      ),
      stickyFrontLayer: true,
      frontLayer: _pages[_currentIndex],
      backLayer: BackdropNavigationBackLayer(
        items: [
          ListTile(title: Text("Widget 1")),
          ListTile(title: Text("Widget 2")),
        ],
        onTap: (int position) => {setState(() => _currentIndex = position)},
      ),
    ),
  );
}
BackdropNavigationScaffold example

Accessing underlying backdrop functionalities

To access backdrop related functionalities, use Backdrop.of(context) to get underlying BackdropScaffoldState.

BackdropScaffoldState exposes various properties and methods like:

  • properties
    • controller -> AnimationController
    • scaffoldKey -> GlobalKey<ScaffoldState>
    • isBackLayerConcealed -> bool
    • isBackLayerRevealed -> bool
  • methods
    • fling()
    • concealBackLayer()
    • revealBackLayer()

Note: Backdrop is an InheritedWidget and therefore like Scaffold.of, Theme.of and MediaQuery.of, the BuildContext context passed to Backdrop.of(context) should be of a Widget that is under the BackdropScaffold in the "widget tree". In other words, Backdrop.of called inside a widget where the BackdropScaffold is initalized will not work explicitly, since the context passed is of the widget that will build BackdropScaffold therefore above BackdropScaffold. This can be solved by either making a seperate Widget where Backdrop.of needs to be used and make it the "child" of BackdropScaffold or wrap the Backdrop.of usage around Builder widget so that the "correct" context (from Builder) is passed to Backdrop.of. This answere on SO and FWotW video on Builder gives a very good idea of how and why Builder works in later case.

For more information, check out sample code in the example directory, demo app with use-cases and code for it and API references generated by pub.dev.

Contribute

Check proposal documents for v1.0 and web&desktop milestones before you begin with any contibution.

  1. You'll need a GitHub account.
  2. Fork the repository.
  3. Pick an issue to work on from issue tracker.
  4. Implement it.
  5. Send merge request.
  6. Star this project.
  7. Become a hero!!

Features and bugs

Please file feature requests and bugs at the issue tracker.

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Harsh Bhikadia

πŸ’» πŸ€” πŸ‘€

Felix

πŸ’» πŸ“– πŸ› πŸ‘€ πŸ’‘ πŸš‡

Bringmos

πŸ›

Greg Spencer

πŸ›

Jorge A Peroza M

πŸ› πŸ’»

Matt Newell

πŸ›

Daniel Borges

πŸ› πŸ’»

Felix Wortmann

πŸ’» πŸ‘€ πŸ›

Pierre Grimaud

πŸ“–

Π’Π°Π΄ΠΈΠΌ

πŸ’»

Danial Agh

πŸ›

PembaTamang

πŸ›

hassan

πŸ›

Yaroslav Pronin

πŸ› πŸ’» πŸ‘€

Enikuomehin Adejuwon

πŸ’»

Nwachi ifeanyichukwu Victor

πŸ’»

mockturtl

πŸ’» πŸ“–

ritar

πŸ›

LorenzoVianello

πŸ›

Scott

πŸ’»

Sachin Dahal

πŸ“–

This project follows the all-contributors specification. Contributions of any kind welcome!

You might also like...

Music reader for online data (Google Drive implementation). Cross platform goal : iOS, Android, MacOS, Windows

omusic A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if this i

Nov 30, 2021

Actor model implementation in Dart. This package makes it easier to work with isolates, create clusters of isolates.

Actor model implementation in Dart. This package makes it easier to work with isolates, create clusters of isolates.

Actor model implementation in Dart Languages: Introduction About Theater Installing What is Actor Notes about the actors Actor system Actor tree Using

Nov 14, 2022

A basic implementation of the robot testing pattern for integration/e2e tests

robot A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if this is

Dec 13, 2021

This project is a implementation of a collection of terminal server samples in Dart

Terminal Server Samples ⭐ Star me on GitHub β€” it helps! This project is a implementation of a collection of terminal server samples in Dart licensed u

Nov 26, 2021

Implementation and architecture for Firebase Authentication

fluttercompoundapp A new Flutter application. Getting Started This project is a starting point for a Flutter application. A few resources to get you s

Nov 27, 2021

Actively maintained, community-driven chat UI implementation with an optional Firebase BaaS.

Actively maintained, community-driven chat UI implementation with an optional Firebase BaaS.

Flutter Chat UI Actively maintained, community-driven chat UI implementation with an optional Firebase BaaS. Flyer Chat is a platform for creating in-

Jan 7, 2023

Lightweight SMS Misr gateway implementation in dart (unofficial).

palestine_sms_misr (unofficial) Part of PalestineDevelopers Lightweight SMS Misr gateway implementation in dart (unofficial). Table Of Contents Featur

Mar 10, 2022

Dart grocery store / cashier line simulation implementation

Grocery Store Cashier Line Simulation Quick Read Dart implementation of a grocery store cashier line simulation. $ dart bin/grocerysimulator.dart inpu

Jan 13, 2022

Flutter Music Player - First Open Source Flutter based material design music player with audio plugin to play local music files.

Flutter Music Player - First Open Source Flutter based material design music player with audio plugin to play local music files.

Flutter Music Player First Open Source Flutter based Beautiful Material Design Music Player(Online Radio will be added soon.) Demo App Play Store BETA

Jan 8, 2023
Owner
Harsh Bhikadia
code-blooded organism.
Harsh Bhikadia
Dart GraphQL server implementation. Utilities, code generator, examples and reference implementation.

Leto - GraphQL Server A complete implementation of the official GraphQL specification in the Dart programming language. Inspired by graphql-js, async-

Juan Manuel Castillo 29 Nov 27, 2022
Learn Flutter on Flutter! A widget directory with implementation samples!

Fludget Browse through a variety of widgets used in flutter This application is developed to learn Flutter using Flutter. Different widgets used in fl

ACM VIT 29 Nov 23, 2022
Paper is a implementation of Flx Design System for Flutter

Paper is a implementation of Flx Design System for Flutter. Installing Add a lines like this to your pubspec.yaml. dependencies: paper: git:

Flx Team 3 Nov 21, 2021
Flutter implementation of Figma's corner smoothing.

Figma Squircle Flutter implementation of Figma's corner smoothing. Usage Decoration The SmoothRectangleBorder can be provided to a regular ShapeDecora

AloΓ―s Deniel 88 Dec 14, 2022
A Flutter package with custom implementation of Drawer

Flutter Zoom Drawer A Flutter package with custom implementation of the Side Menu (Drawer) Getting Started To start using this package, add flutter_zo

null 335 Dec 22, 2022
Flutter implementation of Google Mobile Vision.

flutter_mobile_vision Flutter implementation for Google Mobile Vision. Based on Google Mobile Vision. Android Samples -=- iOS Samples Liked? ⭐ Star th

Eduardo Folly 450 Jan 6, 2023
a python-like bytes_io implementation for dart

bytes_io A python-like bytes_io implementation for dart A powerful helper for processing raw binary data Usage A simple usage example: import 'package

Kelly 5 Aug 31, 2022
A bugless implementation of BigDecimal in Dart based on Java's BigDecimal

big_decimal A bugless implementation of BigDecimal in Dart based on Java's BigDecimal Installation Add the following to your pubspec.yaml: dependencie

null 18 Jul 27, 2022
Libwinmedia implementation of just_audio.

just_audio_libwinmedia The libwinmedia implementation of [just_audio][https://github.com/ryanheise/just_audio]. Installation Add the just_audio_libwin

Bruno D'Luka 12 Oct 22, 2022
Implementation of FIrebase CRUD App.

firebase_crud_app_flutter A new Flutter application. Getting Started This project is a starting point for a Flutter application. A few resources to ge

Chinmay Munje 0 Nov 4, 2021