You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.4 KiB
47 lines
1.4 KiB
4 years ago
|
import 'package:ansu_ui/ansu_ui.dart';
|
||
|
import 'package:flutter/material.dart';
|
||
4 years ago
|
import 'package:velocity_x/velocity_x.dart';
|
||
4 years ago
|
|
||
|
class ExamplePopUpMenu extends StatefulWidget {
|
||
|
ExamplePopUpMenu({Key key}) : super(key: key);
|
||
|
|
||
|
@override
|
||
|
_ExamplePopUpMenuState createState() => _ExamplePopUpMenuState();
|
||
|
}
|
||
|
|
||
|
class _ExamplePopUpMenuState extends State<ExamplePopUpMenu> {
|
||
|
@override
|
||
|
Widget build(BuildContext context) {
|
||
|
return ASScaffold(
|
||
|
title: 'PopUpMenu',
|
||
|
body: ListView(
|
||
|
children: [
|
||
4 years ago
|
SizedBox(height: 500),
|
||
4 years ago
|
ListTile(
|
||
4 years ago
|
title: 'PopUpMenu'.text.make(),
|
||
4 years ago
|
trailing: Builder(
|
||
|
builder: (context) {
|
||
|
return TextButton(
|
||
4 years ago
|
child: 'test'.text.make(),
|
||
4 years ago
|
onPressed: () {
|
||
|
showASPopUpMenu<int>(
|
||
|
context: context,
|
||
4 years ago
|
initValue: 3,
|
||
4 years ago
|
items: [
|
||
4 years ago
|
PopupMenuItem(child: 'test'.text.make(), value: 1),
|
||
|
PopupMenuItem(child: 'test'.text.make(), value: 2),
|
||
|
PopupMenuItem(child: 'test'.text.make(), value: 3),
|
||
|
PopupMenuItem(child: 'test'.text.make(), value: 4),
|
||
4 years ago
|
],
|
||
|
).then((value) {});
|
||
|
},
|
||
|
);
|
||
|
},
|
||
|
),
|
||
|
),
|
||
|
],
|
||
|
),
|
||
|
);
|
||
|
}
|
||
|
}
|