flutter_selectable_cards 0.0.1 copy "flutter_selectable_cards: ^0.0.1" to clipboard
flutter_selectable_cards: ^0.0.1 copied to clipboard

Flutter Selectable Radio Cards and Checkbox Cards UI. Easily create radio and checkbox cards with custom styles for your onboarding screens, forms, or any other use case.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_selectable_cards/flutter_selectable_cards.dart';

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

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Selectable Cards Example'),
        ),
        body: Center(
          child: SelectableCards(
              isMultipleSelection: true,
              layout: const LayoutWrap(crossAxisAlignment: WrapCrossAlignment.center),
              children: const [
                SimpleCard(
                  index: 0,
                  child: Padding(
                    padding: EdgeInsets.all(8.0),
                    child: Text('Select Card 1'),
                  ),
                ),
                SimpleCard(
                  index: 1,
                  child: Padding(
                    padding: EdgeInsets.all(8.0),
                    child: Text('Select Card 2'),
                  ),
                ),
              ],
              onSelected: (index) {
                print('Main.dart Selected card: $index');
              }),
        ),
      ),
    );
  }
}
5
likes
130
points
45
downloads

Publisher

verified publisherarkone.dev

Weekly Downloads

Flutter Selectable Radio Cards and Checkbox Cards UI. Easily create radio and checkbox cards with custom styles for your onboarding screens, forms, or any other use case.

Homepage

Documentation

API reference

License

MIT (license)

Dependencies

flutter, flutter_web_plugins, plugin_platform_interface, web

More

Packages that depend on flutter_selectable_cards