statusbarz 1.0.1 copy "statusbarz: ^1.0.1" to clipboard
statusbarz: ^1.0.1 copied to clipboard

outdated

A Flutter package for dynamically changing status bar color based on the background. Works with static colors and images.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:statusbarz/statusbarz.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return StatusbarzCapturer(
      child: MaterialApp(
        navigatorObservers: [Statusbarz.instance.observer],
        title: 'Statusbarz example',
        home: RouteA(),
      ),
    );
  }
}

class RouteA extends StatelessWidget {
  const RouteA({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Material(
      color: Colors.black,
      child: Center(
        child: ElevatedButton(
          child: Text('Change screen to B'),
          onPressed: () {
            Navigator.push(
                context, MaterialPageRoute(builder: (context) => RouteB()));
          },
        ),
      ),
    );
  }
}

class RouteB extends StatelessWidget {
  const RouteB({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Material(
      color: Colors.white,
      child: Center(
        child: ElevatedButton(
          child: Text('Change screen to A'),
          onPressed: () {
            Navigator.pop(context);
          },
        ),
      ),
    );
  }
}
67
likes
0
points
808
downloads

Publisher

verified publishermankeli.co

Weekly Downloads

A Flutter package for dynamically changing status bar color based on the background. Works with static colors and images.

Homepage

License

unknown (license)

Dependencies

flutter, image

More

Packages that depend on statusbarz