ac_version_banner 2.0.4
ac_version_banner: ^2.0.4 copied to clipboard
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.
Package name change #
The original package flutter_version_banner is still available on pub.flutter-io.cn but seems not to be maintained. There's my PR for Dart 3 from May 7th 2024 not accepted yet.
That's why I published my version as ac_version_banner.
Getting Started #
This widget should wrap MaterialApp or CupertinoApp.

VersionBanner(
text: "Yay!",
packageExtensions: [".dev"],
extensionHandling: VersionBannerExtensionHandling.packageContainDev,
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 based on value of extensionHandling.
[Original/Default Behavior] If extensionHandling is VersionBannerExtensionHandling.packageContainDev and the package name contains part of the String in the array, then the banner is visible.
If extensionHandling is VersionBannerExtensionHandling.packageSuffixDev and the package name ends with any of the String in the array, then the banner is visible.
The following properties can be changed:
color- Banner's colortextStyle- Banner's text styletext- The text to appear. If set to null will show thepubspecversionlocation- the banner's location on the screen, based on the class BannerLocationpackageExtensions- will check the app's package name with the given array and decide the banner's visibilityextensionHandling- will control the behavior forpackageExtensionsto workvisible- decides if the banner is visible or not. If set tofalse, it overrides thepackageExtensionsattribute