ResponsiveHelper.fromContext constructor

ResponsiveHelper.fromContext(
  1. BuildContext context
)

Creates a ResponsiveHelper from the current context.

Implementation

factory ResponsiveHelper.fromContext(BuildContext context) {
  final mq = MediaQuery.maybeOf(context);
  final data = ResponsiveData.fromMediaQuery(mq, const ScalifyConfig());
  return ResponsiveHelper.fromData(data);
}