Coder Social home page Coder Social logo

background_app_bar's Introduction

Widget Background App Bar

A background app bar plugin, use this plugin if you want to preserve background of sliver app bar when scrolling,

inspired by GradientAppBar GitHub

Screenshots

Don't forget to tap + button 5 times

Screenshot-1565398534.png Screenshot-1569417041.png Screenshot-1569417048.png Screenshot-1569417051.png

Getting Started

  1. Depend on it by adding this to your pubspec.yaml file: background_app_bar: ^1.0.0

  2. Import it: import 'package:background_app_bar/background_app_bar.dart'

  3. Replace your current FlexibleSpaceBar (In the AppBar or SliverAppBar) to BackgroundFlexibleSpaceBar.

SliverAppBar(
    expandedHeight: _kAppBarSize,
    floating: false,
    pinned: true,
    snap: false,
    elevation: 0.0,
    backgroundColor: Colors.transparent,
    flexibleSpace: BackgroundFlexibleSpaceBar(
        title: widget.title != null ? Text(widget.title!) : null,
        centerTitle: false,
        titlePadding: const EdgeInsets.only(left: 20.0, bottom: 20.0),
        background: ClipRect(
            child: Container(
                child: BackdropFilter(
                    filter: ImageFilter.blur(sigmaX: 5.0, sigmaY: 5.0),
                    child: Container(
                        decoration: BoxDecoration(
                            color: Colors.black.withOpacity(0.5),
                        ),
                    ),
                ),
                decoration: const BoxDecoration(
                    image: DecorationImage(
                        image: AssetImage("images/bg.jpg"),
                        fit: BoxFit.fill,
                    ),
                ),
            ),
        ),
    ),
)

background_app_bar's People

Contributors

leoncolt avatar pszione avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

background_app_bar's Issues

stretchModes property

Flutter added stretchModes properties in FlexibleSpaceBar which allows us to zoom or blur the image when user tries to scroll below minimum limit.

flexibleSpace: FlexibleSpaceBar(
    flexibleSpace: BackgroundFlexibleSpaceBar(
        stretchModes: const [
           StretchMode.zoomBackground,
           StretchMode.blurBackground,
           StretchMode.fadeTitle,
        ],
)

I think it is nice to have this in this library.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.