flutter_checklist 1.5.1 copy "flutter_checklist: ^1.5.1" to clipboard
flutter_checklist: ^1.5.1 copied to clipboard

A widget to display a checklist with checkable and reorderable items

example/lib/main.dart

import 'dart:developer';

import 'package:flutter/material.dart';
import 'package:flutter_checklist/checklist.dart';

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

class MyApp extends StatelessWidget {
  MyApp({super.key});

  final lines = List.generate(
    5,
    (index) => (text: 'Line ${index + 1}', toggled: false),
  );

  void onChanged(List<ChecklistLine> lines) {
    log(lines.toString());
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      locale: Locale('en'),
      localizationsDelegates: [
        ...ChecklistLocalizations.localizationsDelegates,
      ],
      supportedLocales: [
        ...ChecklistLocalizations.supportedLocales,
      ],
      home: Scaffold(
        appBar: AppBar(
          title: const Text('flutter_checklist example'),
        ),
        body: Builder(
          builder: (context) {
            return Checklist(
              lines: lines,
              onChanged: onChanged,
            );
          },
        ),
      ),
    );
  }
}
copied to clipboard
1
likes
150
points
255
downloads

Publisher

verified publishermaelchiotti.dev

Weekly Downloads

2024.09.05 - 2025.03.20

A widget to display a checklist with checkable and reorderable items

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

animated_reorderable_list, flutter, flutter_localizations, intl

More

Packages that depend on flutter_checklist