banner_listtile 2.2.1 copy "banner_listtile: ^2.2.1" to clipboard
banner_listtile: ^2.2.1 copied to clipboard

outdated

Create tile with banner at the corner. This package allow you to make a custom Listtile with option to show or hide banner. Banner with "New" tag or something you want. And lot more.


Banner_Listtile comes in handy when you need a temple of tile with a built-in banner option. You may have seen a banner with a tag ex. "New," "Hot," "New Collection" etc. Banner_listtile does the exact thing, and also gives you the extra feature of customizing it easily.

Installation #

i. Add the latest version of this package to your pubspec.yaml file, and run: 'dart pub get':

dependancies:
  banner_listtile: ^2.2.1

ii. Import the package in your Flutter App and use it.

import 'package:banner_listtile/banner_listtile.dart';

Properties #

New 2.2.0 properties
#

  • Added onPress functionalities
    [onTapCancel,
    onHighlightChanged,
    onFocusChange,
    onTapDown,
    onLongPress,
    onHover,
    onDoubleTap,
    onTap]
  • added few bugs to fix later 😅. [ps: no no dev is just joking]

2.1.0 properties added
#

  • elevation
  • borderside
  • margin

2.0.0 properties added
#

  • imageContainerSize
  • imageContainerShapeZigzagIndex
  • centerTrailingbyImageboxsize
  • trailingBoxwidth
  • subtitleOpacity
  • bannersize

1.0.0 properties
#

  • bannerText
  • showBanner
  • bannerPositionRight
  • bannerTextColor
  • bannerColor
  • title
  • subtitle
  • borderRadius
  • imageContainer
  • trailing
  • backgroundColor
  • width
  • randomBackgroundColor

Note: #

If you use it inside a Column, Listview or any kind of vertical list, then you do not need to give it a height property. But when you use it as a single widget or inside any other widget, then you are suggested to define its height by giving it a height property. If you don't, then it might end up taking all the available space.

Sample Code #

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: BannerListTile(
          backgroundColor: Colors.blue,
          borderRadius: BorderRadius.circular(8),
          imageContainer: Image(
              image: NetworkImage(
                  "https://images.unsplash.com/photo-1529626455594-4ff0802cfb7e?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb1.2.1&auto=format&fit=crop&w=387&q=80"),
              fit: BoxFit.cover),
          title: Text(
            "Lisa",
            style: TextStyle(fontSize: 24, color: Colors.white),
            overflow: TextOverflow.ellipsis,
            maxLines: 1,
          ),
          subtitle: Text("A model from NY",
              style: TextStyle(fontSize: 13, color: Colors.white)),
          trailing: IconButton(
              onPressed: () {},
              icon: Icon(
                Icons.delete_forever,
                color: Colors.red,
              )),
        ),
      ),
    );
  }
}

New zigzag shape #

BannerListTile(
    imageContainerShapeZigzagIndex: index, // [index = (even or odd integer number)]
),

Examples #

example screenshot

Upcoming #

Things are added & also will be added more if needed in future. Contributions to this package is welcomed. For this go to github repository of this package and fork this repository.

If you have any suggestions or bug report then please consider mailing me at:

eaglex129@gmail[dot]com
72
likes
0
points
54
downloads

Publisher

unverified uploader

Weekly Downloads

Create tile with banner at the corner. This package allow you to make a custom Listtile with option to show or hide banner. Banner with "New" tag or something you want. And lot more.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on banner_listtile