custom_banners 1.0.1 copy "custom_banners: ^1.0.1" to clipboard
custom_banners: ^1.0.1 copied to clipboard

outdated

New Custom Banners for every project flutter,Designed to display advertising type notices receiving a link and image bannerModel

example/custom_banners_example.dart

import 'dart:convert';
import 'package:custom_banners/src/ui/custom_banners_base.dart';
import 'package:custom_banners/src/model/banner_model.dart';
import 'package:flutter/material.dart';

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        // This is the theme of your application.
        //
        // Try running your application with "flutter run". You'll see the
        // application has a blue toolbar. Then, without quitting the app, try
        // changing the primarySwatch below to Colors.green and then invoke
        // "hot reload" (press "r" in the console where you ran "flutter run",
        // or simply save your changes to "hot reload" in a Flutter IDE).
        // Notice that the counter didn't reset back to zero; the application
        // is not restarted.
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key? key, this.title}) : super(key: key);
  final String? title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  List<BannerModel> listBanners = [
    BannerModel(
        link:
            'https://post.medicalnewstoday.com/wp-content/uploads/sites/3/2020/02/322868_1100-800x825.jpg',
        image:
            'https://post.medicalnewstoday.com/wp-content/uploads/sites/3/2020/02/322868_1100-800x825.jpg'),
    BannerModel(
        link:
            'https://i.pinimg.com/originals/9b/a2/55/9ba255be1da51f06de7b3f18da99fc44.jpg',
        image:
            'https://i.pinimg.com/originals/9b/a2/55/9ba255be1da51f06de7b3f18da99fc44.jpg')
  ];

  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title!),
      ),
      body: SingleChildScrollView(
        child: Column(children: [
          CustomBannersBase(
            listBanners: listBanners,
          )
        ]),
      ),
    );
  }
}
9
likes
0
pub points
0%
popularity

Publisher

verified publishercencha.dev

New Custom Banners for every project flutter,Designed to display advertising type notices receiving a link and image bannerModel

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

cached_network_image, flutter, flutter_swiper_null_safety, url_launcher

More

Packages that depend on custom_banners