ResponsiveHelper.fromContext constructor
ResponsiveHelper.fromContext(
- BuildContext context
Creates a ResponsiveHelper from the current context.
Note: This factory uses the default ScalifyConfig and does not
inherit the config from ScalifyProvider. For config-aware behavior,
use context.responsiveHelper instead.
Implementation
factory ResponsiveHelper.fromContext(BuildContext context) {
final mq = MediaQuery.maybeOf(context);
final data = ResponsiveData.fromMediaQuery(mq, const ScalifyConfig());
return ResponsiveHelper.fromData(data);
}