responsive_builder icon indicating copy to clipboard operation
responsive_builder copied to clipboard

Suggestion for getValueForScreenType method and similar ones

Open warcayac opened this issue 3 years ago • 1 comments

Current case:

getValueForScreenType<Widget>(context: context, desktop: myWidget, mobile: anotherWidget, tablet: anotherWidget, watch: anotherWidget);

It could be improved with a parameter assigning a default value for other screen types being null , example:

getValueForScreenType<Widget>(context: context, desktop: myWidget, byDefault: anotherWidget);

warcayac avatar Jul 17 '21 02:07 warcayac

Hi,

Mobile is the default value for all other screen types. Since it's a mobile first approach.


From: William Arcaya C. @.> Sent: Saturday, July 17, 2021 4:42:50 AM To: FilledStacks/responsive_builder @.> Cc: Subscribed @.***> Subject: [FilledStacks/responsive_builder] Suggestion for getValueForScreenType method and similar ones (#35)

Current case:

getValueForScreenType<Widget>(context: context, desktop: myWidget, mobile: anotherWidget, tablet: anotherWidget, watch: anotherWidget);

It could be improved with a parameter assigning a default value for other screen types being null , example:

getValueForScreenType<Widget>(context: context, desktop: myWidget, byDefault: anotherWidget);

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/FilledStacks/responsive_builder/issues/35, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AA3M72WWBWSVVGDKECAADIDTYDU2VANCNFSM5AQS2WDQ.

FilledStacks avatar Jul 19 '21 04:07 FilledStacks