popup_bubble 0.0.2 popup_bubble: ^0.0.2 copied to clipboard
A new flutter plugin project.
Popup Bubble #
A Flutter Plugin
项目介绍
一个在Flutter端的气泡弹窗组件,通过长按或者单击唤出气泡弹窗
安装使用
简单Demo
/// 气泡弹窗控件控件
class PopupBubble extends StatefulWidget {
PopupBubble({
Key? key,
required this.onValueClicked,
required this.menus,
required this.child,
this.pressType = PressType.longPress,
this.pageMaxChildCount = 5,
this.backgroundColor = Colors.black,
this.menuWidth = 250,
this.menuHeight = 42,
});
/// 点击选中
final ValueChanged<int> onValueClicked;
final Widget child;
/// 唤出方式 长按/单击 ,默认长按
final PressType pressType;
/// 最多显示多少个
final int pageMaxChildCount;
final Color backgroundColor;
/// 弹窗选项
final List<String> menus;
/// 宽高
final double menuWidth;
final double menuHeight;
@override
_PopupBubbleState createState() => _PopupBubbleState();
}
API介绍
/// 点击选中
final ValueChanged<int> onValueClicked;
final Widget child;
/// 唤出方式 长按/单击 ,默认长按
final PressType pressType;
/// 最多显示多少个
final int pageMaxChildCount;
final Color backgroundColor;
/// 弹窗选项
final List<String> menus;
/// 宽高
final double menuWidth;
final double menuHeight;