Skip to content

Commit

Permalink
Merge pull request #112 from ShalmonAnandas/dev
Browse files Browse the repository at this point in the history
fix: filledButton onPressed and onLongPress Functionality
  • Loading branch information
divyanshub024 authored Jan 16, 2025
2 parents 26ab207 + 0581fdc commit 2bfdd17
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,12 @@ class MiraiFilledButtonParser extends MiraiParser<MiraiFilledButton> {
@override
Widget parse(BuildContext context, MiraiFilledButton model) {
return FilledButton(
onPressed: model.onPressed == null ? null : () => model.onPressed,
onLongPress: model.onLongPress == null ? null : () => model.onLongPress,
onPressed: model.onPressed == null
? null
: () => Mirai.onCallFromJson(model.onPressed, context),
onLongPress: model.onLongPress == null
? null
: () => Mirai.onCallFromJson(model.onLongPress, context),
onHover: (bool value) => value == false ? null : model.onHover,
onFocusChange: (bool value) =>
value == false ? null : model.onFocusChange,
Expand Down

0 comments on commit 2bfdd17

Please sign in to comment.