-
-
Notifications
You must be signed in to change notification settings - Fork 82
DSL Actions: StacSnackBarAction, StacMultiAction, StacModalBottomSheetAction, StacDelayAction, StacDialogAction #340
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
-StacSnackBarAction -StacMultiAction -StacModalBottomSheetAction -StacDelayAction -StacDialogAction
| import 'package:stac_framework/stac_framework.dart'; | ||
|
|
||
| import 'stac_snack_bar.dart'; | ||
| // Types are parsed via extensions in type_parser.dart |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
| extension StacSnackBarActionParser on StacSnackBarAction { | ||
| SnackBarAction parse(BuildContext context) { | ||
| return SnackBarAction( | ||
| textColor: textColor?.toColor(context), | ||
| disabledTextColor: disabledTextColor?.toColor(context), | ||
| backgroundColor: backgroundColor?.toColor(context), | ||
| disabledBackgroundColor: disabledBackgroundColor?.toColor(context), | ||
| label: label, | ||
| onPressed: () => onPressed.parse(context), | ||
| ); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be in type or in action_parser?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be in its own parser ig
|
|
||
| part 'stac_snack_bar_action.g.dart'; | ||
|
|
||
| @JsonSerializable() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add documentation as well?
|
|
||
| part 'stac_snack_bar.g.dart'; | ||
|
|
||
| @JsonSerializable() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add documentation as well?
|
|
||
| part 'stac_multi_action.g.dart'; | ||
|
|
||
| @JsonSerializable() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add documentation as well?
| this.isScrollControlled = false, | ||
| this.useRootNavigator = false, | ||
| this.isDismissible = true, | ||
| this.enableDrag = true, | ||
| this.showDragHandle, | ||
| this.useSafeArea = false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should define the default values in parsers
| this.barrierDismissible = true, | ||
| this.barrierColor, | ||
| this.barrierLabel, | ||
| this.useSafeArea = true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please define default values in parser
|
|
||
| @JsonSerializable() | ||
| class StacDelayAction extends StacAction { | ||
| const StacDelayAction({this.milliseconds = 1000}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please define default values in parser
Description
added StacSnackBarAction, StacMultiAction, StacModalBottomSheetAction, StacDelayAction, StacDialogAction
Type of Change