context property
BuildContext
get
context
Gets the current context, throwing if not set.
Implementation
static BuildContext get context {
if (_context == null) {
throw FlutterError(
'AdaptiveContext not initialized.\n'
'Make sure to wrap your app with AdaptiveScope and use the extensions '
'within a build method where context is available.\n'
'Alternatively, use the setWidth/setHeight methods on AdaptiveDeviceInfo.',
);
}
return _context!;
}