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> {
24
24
actions: widget.options
25
25
.map (
26
26
(option) => CupertinoActionSheetAction (
27
- onPressed: () => option.onTap ! (context),
27
+ onPressed: () => option.onTap (context),
28
28
child: Text (option.title),
29
29
),
30
30
)
Original file line number Diff line number Diff line change @@ -190,7 +190,8 @@ class _MaterialControlsState extends State<MaterialControls>
190
190
_hideTimer? .cancel ();
191
191
192
192
if (chewieController.optionsBuilder != null ) {
193
- await chewieController.optionsBuilder !(context, _buildOptions (context));
193
+ await chewieController.optionsBuilder !(
194
+ context, _buildOptions (context));
194
195
} else {
195
196
await showModalBottomSheet <OptionItem >(
196
197
context: context,
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ class _OptionsDialogState extends State<OptionsDialog> {
28
28
itemCount: widget.options.length,
29
29
itemBuilder: (context, i) {
30
30
return ListTile (
31
- onTap: () => widget.options[i].onTap? . call (context),
31
+ onTap: () => widget.options[i].onTap (context),
32
32
leading: Icon (widget.options[i].iconData),
33
33
title: Text (widget.options[i].title),
34
34
subtitle: widget.options[i].subtitle != null
Original file line number Diff line number Diff line change @@ -8,10 +8,10 @@ class OptionItem {
8
8
this .subtitle,
9
9
});
10
10
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;
15
15
16
16
OptionItem copyWith ({
17
17
Function (BuildContext context)? onTap,
You can’t perform that action at this time.
0 commit comments