reusable_bottom_sheet 0.0.2+1 copy "reusable_bottom_sheet: ^0.0.2+1" to clipboard
reusable_bottom_sheet: ^0.0.2+1 copied to clipboard

A reusable Flutter package to easily create customizable bottom sheets with options to display a title, subtitle, child widgets, and a drag handle. It supports features like custom height, background [...]

example/main.dart

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

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Reusable Bottom Sheet Example',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const BottomSheetExampleScreen(),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Reusable Bottom Sheet Demo'),
      ),
      body: Center(
        child: ElevatedButton(
          onPressed: () {
            showOptionBottomSheet(
              context: context,
              title: 'Options',
              supTitle: 'Choose one',
              options: [
                const OptionEntity(
                  icon: Icons.camera_alt,
                  title: 'Camera',
                ),
                const OptionEntity(
                  icon: Icons.photo,
                  title: 'Gallery',
                ),
                const OptionEntity(
                  icon: Icons.share,
                  title: 'Share',
                ),
              ],
              onTap: () {
                Navigator.pop(context);
              },
            );
          },
          child: const Text('Show Bottom Sheet'),
        ),
      ),
    );
  }
}
0
likes
120
points
100
downloads

Publisher

unverified uploader

Weekly Downloads

A reusable Flutter package to easily create customizable bottom sheets with options to display a title, subtitle, child widgets, and a drag handle. It supports features like custom height, background color, border radius, and callback functions, making it ideal for displaying various types of content in a bottom sheet with smooth interactions.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

app_style, equatable, flutter

More

Packages that depend on reusable_bottom_sheet