custompopupchoice 0.0.1 custompopupchoice: ^0.0.1 copied to clipboard
Custom PopupChoice easy and beautiful
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'),
)
],
),
),
);
}
}