responsive_builder
responsive_builder copied to clipboard
Suggestion for getValueForScreenType method and similar ones
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);
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.