action_sheet 1.0.4 copy "action_sheet: ^1.0.4" to clipboard
action_sheet: ^1.0.4 copied to clipboard

A material bottom sheet with clickable actions as seen in Google Drive.

example/example.dart

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

void main() {
  runApp(Example());
}

class Example extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(
        brightness: Brightness.dark,
      ),
      home: Scaffold(
        appBar: AppBar(
          title: Text("sheet_actions"),
        ),
        body: Home(),
      ),
    );
  }
}

class Home extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Center(
      child: ElevatedButton(
        child: Text("showBottomActionSheet"),
        onPressed: () {
          showBottomActionSheet(
            context: context,
            widgetPositioning: WidgetPositioning.mainAxis,
            children: [
              Icon(
                Icons.class_,
                color: Colors.white,
              ),
              Icon(
                Icons.folder,
                color: Colors.white,
              ),
              Icon(
                Icons.note_add,
                color: Colors.white,
              ),
            ],
            descriptions: [
              Text("Class"),
              Text("Folder"),
              Text("Note"),
            ],
            actions: [],
            titleText: Text(
              "Create New",
              style: TextStyle(fontSize: 25),
            ),
          );
        },
      ),
    );
  }
}
7
likes
130
pub points
65%
popularity

Publisher

verified publisherfelixboehme.dev

A material bottom sheet with clickable actions as seen in Google Drive.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

flutter

More

Packages that depend on action_sheet