flat_banners 0.0.6 copy "flat_banners: ^0.0.6" to clipboard
flat_banners: ^0.0.6 copied to clipboard

A Flutter package for Offers, Promo and Invites banners. Android support Android and Web.

flat_banners #

pub package

A Flutter package for Offers, Promo and Invites banners. Android support Android and Web.

Usage #

To use this plugin, add flat_banners as a dependency in your pubspec.yaml file.

Demo #

Example #

import 'package:flutter/material.dart';
import 'package:flat_banners/flat_banners.dart';
import 'package:example/controller/data_controller.dart';

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'Banners Example',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const Home(),
    );
  }
}

class Home extends StatelessWidget {
  const Home({Key? key}) : super(key: key);
  @override
  Widget build(BuildContext context) {
    return Center(
      child: FlatBanners(
        imageWidth: 50,
        gradientColors: [
          const Color(0xff6C59D4).withOpacity(0.9),
          const Color(0xff869DFB).withOpacity(0.7),
        ],
        title: 'Get 500 Coins by Referring',
        subtitle: 'Games are Fun with Friends!',
        btnText: 'Refer a friend',
        image: 'assets/icons/social-media.png',
        onPressed: () {},
      ),
    );
  }
}

See the example app for more complex examples.

Screenshot #

Horizontal View Vertical View
14
likes
130
points
232
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter package for Offers, Promo and Invites banners. Android support Android and Web.

Repository (GitHub)
View/report issues

Documentation

API reference

License

unknown (license)

Dependencies

flutter

More

Packages that depend on flat_banners