Skip to main content

brilliant_select 7.0.0 copy "brilliant_select: ^7.0.0" to clipboard
brilliant_select: ^7.0.0 copied to clipboard

Customizable single and multiple selection widgets with search, grouping, dialogs and bottom sheets for Flutter.

example/lib/main.dart

import 'package:brilliant_select_example/theme/theme.dart';
import 'package:material_ui/material_ui.dart';

import 'features.dart';

void main() => runApp(MyApp());

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

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return ThemePatrol(
      light: ThemeData(
        brightness: Brightness.light,
        primarySwatch: Colors.red,
        primaryColor: Colors.red,
        colorScheme: ColorScheme.light(secondary: Colors.red),
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      dark: ThemeData(
        brightness: Brightness.dark,
        primarySwatch: Colors.red,
        primaryColor: Colors.red,
        colorScheme: ColorScheme.dark(secondary: Colors.red),
        visualDensity: VisualDensity.adaptivePlatformDensity,
        checkboxTheme: CheckboxThemeData(
          fillColor: WidgetStateProperty.resolveWith<Color?>((
            Set<WidgetState> states,
          ) {
            if (states.contains(WidgetState.disabled)) {
              return null;
            }
            if (states.contains(WidgetState.selected)) {
              return Colors.red;
            }
            return null;
          }),
        ),
        radioTheme: RadioThemeData(
          fillColor: WidgetStateProperty.resolveWith<Color?>((
            Set<WidgetState> states,
          ) {
            if (states.contains(WidgetState.disabled)) {
              return null;
            }
            if (states.contains(WidgetState.selected)) {
              return Colors.red;
            }
            return null;
          }),
        ),
        switchTheme: SwitchThemeData(
          thumbColor: WidgetStateProperty.resolveWith<Color?>((
            Set<WidgetState> states,
          ) {
            if (states.contains(WidgetState.disabled)) {
              return null;
            }
            if (states.contains(WidgetState.selected)) {
              return Colors.red;
            }
            return null;
          }),
          trackColor: WidgetStateProperty.resolveWith<Color?>((
            Set<WidgetState> states,
          ) {
            if (states.contains(WidgetState.disabled)) {
              return null;
            }
            if (states.contains(WidgetState.selected)) {
              return Colors.red;
            }
            return null;
          }),
        ),
      ),
      mode: ThemeMode.system,
      builder: (context, theme) {
        return MaterialApp(
          title: 'Smart Select',
          theme: theme?.light,
          darkTheme: theme?.dark,
          themeMode: theme?.mode,
          home: Features(),
        );
      },
    );
  }
}
1
likes
150
points
84
downloads

Documentation

API reference

Publisher

verified publishereasyhour.app

Weekly Downloads

Customizable single and multiple selection widgets with search, grouping, dialogs and bottom sheets for Flutter.

Topics

#widget #selection #form

License

MIT (license)

Dependencies

collection, flutter, material_ui

More

Packages that depend on brilliant_select