version_banner 1.0.0-nullsafety.0 copy "version_banner: ^1.0.0-nullsafety.0" to clipboard
version_banner: ^1.0.0-nullsafety.0 copied to clipboard

outdated

A banner that shows the current version or flavour of the app

Version Banner #

An app Banner Widget that shows the current app version. Can be used with App Flavors to show what flavor of the app is currently being used.

Getting Started #

This widget should wrap MaterialApp or CupertinoApp.

Example

VersionBanner(
          text: "Yay!",
          packageExtensions: [".dev"],
          child: MaterialApp(
                       debugShowCheckedModeBanner: false,
                       title: 'Flutter Demo',
                       theme: ThemeData(
                         primarySwatch: Colors.blue,
                       ),
                       home: MyHomePage(title: 'Flutter Demo Home Page'),
                     )
      );

packageExtensions will check the app's package name with the given array. If the package name contains part of the String in the array, then the banner is visible.

The following properties can be changed:

  • color - Banner's color
  • textStyle - Banner's text style
  • text - The text to appear. If set to null will show the pubspec version
  • location - the banner's location on the screen, based on the class BannerLocation
  • packageExtensions - will check the app's package name with the given array. If the package name contains part of the String in the array, then the banner is visible.
  • visible - decides if the banner is visible or not. If set to false, it overrides the packageExtensions attribute
6
likes
125
pub points
76%
popularity

Publisher

verified publishergpalma.pt

A banner that shows the current version or flavour of the app

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-2-Clause (LICENSE)

Dependencies

flutter, package_info

More

Packages that depend on version_banner