File tree Expand file tree Collapse file tree 4 files changed +8
-7
lines changed
Expand file tree Collapse file tree 4 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ class _CupertinoOptionsDialogState extends State<CupertinoOptionsDialog> {
2424 actions: widget.options
2525 .map (
2626 (option) => CupertinoActionSheetAction (
27- onPressed: () => option.onTap ! (context),
27+ onPressed: () => option.onTap (context),
2828 child: Text (option.title),
2929 ),
3030 )
Original file line number Diff line number Diff line change @@ -190,7 +190,8 @@ class _MaterialControlsState extends State<MaterialControls>
190190 _hideTimer? .cancel ();
191191
192192 if (chewieController.optionsBuilder != null ) {
193- await chewieController.optionsBuilder !(context, _buildOptions (context));
193+ await chewieController.optionsBuilder !(
194+ context, _buildOptions (context));
194195 } else {
195196 await showModalBottomSheet <OptionItem >(
196197 context: context,
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ class _OptionsDialogState extends State<OptionsDialog> {
2828 itemCount: widget.options.length,
2929 itemBuilder: (context, i) {
3030 return ListTile (
31- onTap: () => widget.options[i].onTap? . call (context),
31+ onTap: () => widget.options[i].onTap (context),
3232 leading: Icon (widget.options[i].iconData),
3333 title: Text (widget.options[i].title),
3434 subtitle: widget.options[i].subtitle != null
Original file line number Diff line number Diff line change @@ -8,10 +8,10 @@ class OptionItem {
88 this .subtitle,
99 });
1010
11- Function (BuildContext context)? onTap;
12- IconData iconData;
13- String title;
14- String ? subtitle;
11+ final void Function (BuildContext context) onTap;
12+ final IconData iconData;
13+ final String title;
14+ final String ? subtitle;
1515
1616 OptionItem copyWith ({
1717 Function (BuildContext context)? onTap,
You can’t perform that action at this time.
0 commit comments