smart_banner 0.1.0 copy "smart_banner: ^0.1.0" to clipboard
smart_banner: ^0.1.0 copied to clipboard

Display a smart banner on top of the screen of your Flutter Web application.

Smart Banner #

Display a smart banner on top of the screen of your Flutter Web application.

Inspired by smart-app-banner and react-smartbanner

Usage #

Wrap your view with a SmartBannerScaffold widget, if you want a persistant banner on top of your app you might need to directly use it inside the MaterialApp.builder property.

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      builder: (context, child) {
        if (child != null) {
            return SmartBannerScaffold(
                properties: BannerProperties(
                    title: 'MyApp',
                    buttonLabel: 'VIEW',
                    androidProperties: BannerPropertiesAndroid(
                        packageName: 'com.my.app',
                        icon: Image.asset('assets/android_icon.png'),
                    ),
                    iosProperties: BannerPropertiesIOS(
                        appId: '123456789',
                        icon: Image.asset('assets/ios_icon.png'),
                    ),
                ),
                child: child,
            );
        }
      },
      home: MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

For a more complete example, see example.

Screenshots #

Android Style iOS Style

22
likes
0
pub points
79%
popularity

Publisher

verified publisherrouxguillau.me

Display a smart banner on top of the screen of your Flutter Web application.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, url_launcher

More

Packages that depend on smart_banner