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

outdated

A scrollable ListView which you can search by dragging, normal scrolling, letter scrolling or letter clicking.

Flutter component for list and search a simple or complex data items, similar to contact list.

Demo (live): #

Features #

  • Search/filter items;
  • Customization (default is app Theme);
  • Build your own Widget to show;
  • Easy to use (Besides being beautifull 💅🏼);

Usage #

Adding in pubspec.yaml:

dependencies:
  alphabet_search_view: ^1.0.1

Import it where you want to use:

import 'package:alphabet_search_view/alphabet_search_view.dart';

Example: #

Simple use:

final myStringList = [
    'Katlego Dhaval',
    'Belenos Haniya',
    'Alaattin Ísak',
    'Ephraim Ríghnach',
    'Heli Jerahmeel',
];

AlphabetSearchView.stringList(
    list: myStringList,
),

Model:

final myModelList = [
    AlphabetSearchModel(title: 'Katlego Dhaval', subtitle: 'Dad'),
    AlphabetSearchModel(title: 'Belenos Haniya', subtitle: 'Friend'),
    AlphabetSearchModel(title: 'Alaattin Ísak', subtitle: 'Friend'),
    AlphabetSearchModel(title: 'Ephraim Ríghnach', subtitle: 'Uncle'),
    AlphabetSearchModel(title: 'Heli Jerahmeel', subtitle: 'Friend'),
];

AlphabetSearchView.modelList(
    list: myModelList,
),

With build:

final myStringList = [
    'Katlego Dhaval',
    'Belenos Haniya',
    'Alaattin Ísak',
    'Ephraim Ríghnach',
    'Heli Jerahmeel',
];

AlphabetSearchView.stringList(
    list: myStringList,
    buildItem: (context, index, item) => Card(
        child: Text(item.title),
    ),
),

With tap callback:

AlphabetSearchView.stringList(
    list: myStringList,
    onItemTap: (context, index, item) {
        print(item.title);
    },
),

Customization #

AlphabetSearchView.stringList(
    decoration: AlphabetSearchDecoration.fromContext(
        context,
        withSearch?: false, // default is: true
        titleStyle?: TextStyle(...), // default is: TextTheme.subtitle1
        subtitleStyle?: TextStyle(...), // default is: TextTheme.bodyText2
        letterHeaderTextStyle?: TextStyle(...), // default is: TextTheme.headline2
        dividerThickness?: double, // default is: 1
        color?: Color, // default is: ColorScheme.primary
        backgroundColor?: Color, // default is: Theme.scaffoldBackgroundColor
    ),
    list: myStringList,
),
8
likes
80
points
118
downloads

Publisher

unverified uploader

Weekly Downloads

A scrollable ListView which you can search by dragging, normal scrolling, letter scrolling or letter clicking.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

async, flutter, scrollable_positioned_list

More

Packages that depend on alphabet_search_view