I created a class and want some of the parameters to be optional, but can't figure out how to do it.
class PageAction {
PageState state;
PageConfiguration page;
List<PageConfiguration> pages;
Widget widget;
PageAction({
this.state = PageState.none,
this.page, // Optional
this.pages, // Optional
this.widget, // Optional
});
I get the suggestion to add "required", but that is not what I need. Can someone help and explain please?