🎨 StatusBar Manager

Managing the colors of your StatusBar and NavigationBar is easier and more convenient using the StatusBarManager in your Flutter project.

Install

Install the package as a dependency on pubspec.yaml which is at the root of your project

  dependencies:
    statusbarmanager: ^0.0.1
    // Awesome packages

Import the package into your main Dart file

import 'package:statusbarmanager/statusbarmanager.dart';

Usage

You can instantiate the StatusBarManager right in your main function

void main() {
  runApp(StatusBarManager(
    translucent: false,
    child: AwesomeWidget(),
  ));
}

Or manually instantiate in a class by extending StatelessWidget

void main() {
  runApp(AwesomeWidget);
}

class AwesomeWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return StatusBarManager(
      translucent: false,
      child: MaterialApp(
          home: Scaffold(),
        ),
    );
  }
}

The StatusBarManager class receives the following attributes:

PropertieTypeRequiredDescription
childWidgetYesReceives a root widget that will be responsible for rendering the content on the screen
translucentBoolYesWhen false, the system status bar pushes the content of your app down (similar to position: relative). When true, the status bar floats above the content in your app (similar to position: absolute)
statusBarColorColorNoSet a color for your StatusBar
statusBarBrightnessBrightnessNoDefines the shine your Status Bar should have
statusBarIconBrightnessBrightnessNoSets brightness for StatusBar icons
navigationBarColorColorNoSets the color for the NavigationBar
navigationBarBrightnessBrightnessNoSet the brightness for the NavigationBar
navigationBarDividerColorColorNoSets the color of the split between your UI content and the NavigationBar

See an example of a real app using this package.

Libraries

statusbarmanager