banner_widget 0.0.2

  • Readme
  • Changelog
  • Example
  • Installing
  • 77

banner_widget #


A new banner package which has many api reference,and allowed custom build.


How to Use #

# add this line to your dependencies
banner_widget: ^0.0.2
 BannerWidget(data,
                duration: 2000,
                height: 200.0,
                selectedColor: Colors.red,
                unSelectedColor: Colors.white,
                onBannerItemClick: (int position, BannerItem item) {
                  Fluttertoast.showToast(
                      msg: 'index=$position banner is clicked!',
                      toastLength: Toast.LENGTH_LONG);
                },
                build: null,
                descriptionBackgroundColor: const Color(0x33000000),
                textInfoDirect: InfoDirect.HORIZONTAL,
                circleRadius: 5.0,
                indicatorStyle: IndicatorStyle.ELLIPTICAL,
                ellipticalWidth: 16.0,
                ellipticalHeight: 8.0,
                cornerRadius: 10.0),

API #

propertydescriptiondefaultValue
durationint2000
heightdouble200.0
selectedColorColorColors.red
unSelectedColorColorColors.white
onBannerItemClickOnBannerItemClick(int position, BannerItem bannerItem)null
buildCustomBuild(int position, BannerItem item)null
descriptionBackgroundColorColorconst Color(0x33000000)
textInfoDirectInfoDirectInfoDirect.HORIZONTAL
circleRadiusdouble5.0
indicatorStyleIndicatorStyleIndicatorStyle.ELLIPTICAL
ellipticalWidthdouble16.0
ellipticalHeightdouble8.0
cornerRadiusdouble10.0

GitHub #

[0.0.2] - TODO: 2019/9/21.

  1. update dependency to lasted 2.add example

[0.0.1] - TODO: Add release date.

  • TODO: Describe initial release.

example/README.md

banner_widget #


A new banner package which has many api reference,and allowed custom build.


How to Use #

# add this line to your dependencies
banner_widget: ^0.0.2
 BannerWidget(data,
                duration: 2000,
                height: 200.0,
                selectedColor: Colors.red,
                unSelectedColor: Colors.white,
                onBannerItemClick: (int position, BannerItem item) {
                  Fluttertoast.showToast(
                      msg: 'index=$position banner is clicked!',
                      toastLength: Toast.LENGTH_LONG);
                },
                build: null,
                descriptionBackgroundColor: const Color(0x33000000),
                textInfoDirect: InfoDirect.HORIZONTAL,
                circleRadius: 5.0,
                indicatorStyle: IndicatorStyle.ELLIPTICAL,
                ellipticalWidth: 16.0,
                ellipticalHeight: 8.0,
                cornerRadius: 10.0),

API #

propertydescriptiondefaultValue
durationint2000
heightdouble200.0
selectedColorColorColors.red
unSelectedColorColorColors.white
onBannerItemClickOnBannerItemClick(int position, BannerItem bannerItem)null
buildCustomBuild(int position, BannerItem item)null
descriptionBackgroundColorColorconst Color(0x33000000)
textInfoDirectInfoDirectInfoDirect.HORIZONTAL
circleRadiusdouble5.0
indicatorStyleIndicatorStyleIndicatorStyle.ELLIPTICAL
ellipticalWidthdouble16.0
ellipticalHeightdouble8.0
cornerRadiusdouble10.0

GitHub #

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  banner_widget: ^0.0.2

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:banner_widget/banner_widget.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
57
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
90
Overall:
Weighted score of the above. [more]
77
Learn more about scoring.

We analyzed this package on Dec 9, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.6.1
  • pana: 0.13.1+4
  • Flutter: 1.12.13+hotfix.2

Health suggestions

Format lib/banner_widget.dart.

Run flutter format to format lib/banner_widget.dart.

Maintenance suggestions

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
cupertino_icons ^0.1.2 0.1.3
flutter 0.0.0
fluttertoast ^3.0.1 3.1.3
transparent_image ^1.0.0 1.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test