material_action_sheet 0.0.3 copy "material_action_sheet: ^0.0.3" to clipboard
material_action_sheet: ^0.0.3 copied to clipboard

A material action sheet.

🚀A Matrial Action Sheet widget to get Awesome Bottom Sheet List Widget. 🔥

Project URL - https://github.com/viral-sangani/material_action_sheet

DEMO #

Personal Blog

Getting Started #

Add the package to your pubspec.yaml:

material_action_sheet: ^0.0.2

In your dart file, import the library:

import 'package:material_action_sheet/material_action_sheet.dart';

To Use the widget instead of showModalBottomSheet() use showMatrialActionSheet().

showMatrialActionSheet(
  context: context,
  itemsTextStyle: Theme.of(context).textTheme.headline6.copyWith(
        color: Colors.blue,
      ),
  title: "Are you sure you want to close this?",
  titleAlignment: TextAlign.center,
  items: `[
    MaterialActionItem(
      title: "Yes",
      onPressed: () {
        print("Printtt");
      },
    ),
  ],
  showCancelButton: true,
);

Parameter #

showMatrialActionSheet: #

  • context - Need a current BuildContext. @required
  • items - items parameter takes the list of MaterialActionItem List<MaterialActionItem>. @required
  • itemAlignment - items alignment takes TextAlign for items in list.
  • itemsTextStyle - TextStyle of each items the list.
  • title - String for the title of bottomsheet. @required
  • titleAlignment - text alignment for title of bottomsheet.
  • titleTextStyle - TextStyle of title.
  • maxHeight - Maximun height of the bottom sheet.
  • showCancelButton - Show Cancel button to close the bottomsheet.
  • onCancelPressed - Callback functin on cancel button clicked.
  • cancelAlignment - Cancel buttom alignment.
  • content - Any widget to be shown between Title and List items.

MaterialActionItem: #

  • title - Title for item of list. @required
  • onPressed - Callback function for onClick on each item.
7
likes
30
pub points
12%
popularity

Publisher

unverified uploader

A material action sheet.

Repository (GitHub)
View/report issues

License

BSD-2-Clause (LICENSE)

Dependencies

flutter

More

Packages that depend on material_action_sheet