Skip to content

ankittiwari25/top_bottom_sheet_flutter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

top_bottom_sheet_flutter

About

-This plugin will help you to show the bottom sheet to the top of the screen

Parameters

  • isShowCloseButton
  • closeButtonRadius
  • closeButtonBackgroundColor
  • closeButtonIcon
  • child
  • context

Installation

Install the dependencies and devDependencies and start the server.

flutter pub add top_bottom_sheet_flutter
flutter pub get

Or

dependencies:
  top_bottom_sheet_flutter: $currentVersion$

Example

  void showSheet() {
    TopModalSheet.show(
        context: context,
        isShowCloseButton: true,
        closeButtonRadius: 20.0,
        closeButtonBackgroundColor: Colors.white,
        child: Container(
          color: Colors.white,
          child: SizedBox(
            height: MediaQuery.of(context).size.height / 2,
            child: ListView.separated(
              itemBuilder: (BuildContext context, int index) {
                return ListTile(
                  title: const Text('Ankit Tiwari'),
                  subtitle: const Text('tiwariankit496@gmail.com'),
                  leading: FloatingActionButton(
                    heroTag: index,
                    backgroundColor: Colors.white,
                    onPressed: () {},
                    child: const FlutterLogo(),
                  ),
                );
              },
              itemCount: 30,
              separatorBuilder: (BuildContext context, int index) {
                return const Divider();
              },
            ),
          ),
        ));
  }

Screenshot

Screenshot_2022_06_11_15_38_01_686_com_example_test_demo_ankit Screenshot_2022_06_11_15_37_19_088_com_example_test_demo_ankit

How to reach us

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published