custompopupchoice 0.0.1 copy "custompopupchoice: ^0.0.1" to clipboard
custompopupchoice: ^0.0.1 copied to clipboard

Custom PopupChoice easy and beautiful

example/lib/main.dart

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

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

class App extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text('PopupChoice'),
        ),
        body: Column(
          children: [
            RaisedButton(
              onPressed: () {
                RaisedButton(onPressed: () {
                  showModalBottomSheet(
                      backgroundColor: Colors.transparent,
                      context: context,
                      builder: (context) => PopupChoice(
                            heigh: 400,
                            title: 'More Action',
                            item: [
                              CustomListile(
                                label: 'Edit',
                                icon: Icon(Icons.edit),
                              ),
                              CustomListile(
                                label: 'Search',
                                icon: Icon(Icons.search),
                              ),
                              CustomListile(
                                label: 'Delete',
                                icon: Icon(Icons.delete),
                              ),
                            ],
                            onTap: (v) {
                              if (v.label == 'Edit') {
                                print('Edit');
                              }
                            },
                          ));
                });
              },
              child: Text('Open Custom Pop Choice'),
            )
          ],
        ),
      ),
    );
  }
}
3
likes
20
pub points
0%
popularity

Publisher

unverified uploader

Custom PopupChoice easy and beautiful

Homepage

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on custompopupchoice