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

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

example/lib/main.dart

import 'package:example/examples/string_list_example_page.dart';
import 'package:flutter/material.dart';

import 'examples/model_list_with_builder_example_page.dart';
import 'examples/model_list_example_page.dart';

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Alphabet Search View',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({Key? key}) : super(key: key);

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('AlphabetSearchView (Examples)'),
      ),
      body: SingleChildScrollView(
        child: Column(
          children: [
            const Divider(),
            SizedBox(
              width: double.infinity,
              height: 50,
              child: TextButton(
                onPressed: () => Navigator.push(
                  context,
                  MaterialPageRoute(builder: (_) => StringListExamplePage()),
                ),
                child: const Text('StringList'),
              ),
            ),
            const Divider(),
            SizedBox(
              width: double.infinity,
              height: 50,
              child: TextButton(
                onPressed: () => Navigator.push(
                  context,
                  MaterialPageRoute(builder: (_) => ModelListExamplePage()),
                ),
                child: const Text('ModelList'),
              ),
            ),
            const Divider(),
            SizedBox(
              width: double.infinity,
              height: 50,
              child: TextButton(
                onPressed: () => Navigator.push(
                  context,
                  MaterialPageRoute(
                      builder: (_) => const ModeListWithBuilderExamplePage()),
                ),
                child: const Text('ModeList (with Builder)'),
              ),
            ),
            const Divider(),
          ],
        ),
      ),
    );
  }
}
8
likes
135
points
120
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