statusbarz 1.0.4 copy "statusbarz: ^1.0.4" to clipboard
statusbarz: ^1.0.4 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);
          },
        ),
      ),
    );
  }
}
55
likes
0
pub points
88%
popularity

Publisher

verified publishermankeli.co

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

Homepage
Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, image

More

Packages that depend on statusbarz