SpinnerBox constructor
SpinnerBox({
- Key? key,
- required PopupValueNotifier controller,
- required List<
SpinnerPopScope> children, - Widget? prefix,
- Widget? suffix,
- SpinnerHeaderTheme theme = defaultPinnerTheme,
- Color? barrierColor,
普通构建方式,需要额外对数据源进行变更
使用示例:
final controller = PopupValueNotifier.titles(const ['title1', 'tilte2']);
...
SpinnerBox(
controller: controller,
children: [
CustomWidget().heightPart,
...
],
),
控制器方法:
notifier.updateName('update-title1');
'or' notifier.close();
'or' notifier.reset();
Implementation
SpinnerBox({
super.key,
required this.controller,
// required this.titles,
required List<SpinnerPopScope> children,
this.prefix,
this.suffix,
this.theme = defaultPinnerTheme,
this.barrierColor,
}) {
isRebuilder = false;
widgets = children;
}