The getter 'physicalGeometry' isn't defined for the type 'FlutterView'.
ankitmiyantechspian opened this issue · comments
Ankit Miyan commented
ankitparmar007 commented
I am facing the same issue
Ankit Miyan commented
Replace the code with this in screen_util package.
static Future ensureScreenSize([
ui.FlutterView? window,
Duration duration = const Duration(milliseconds: 10),
]) async {
final binding = WidgetsFlutterBinding.ensureInitialized();
binding.deferFirstFrame();
await Future.doWhile(() {
if (window == null) {
window = binding.platformDispatcher.implicitView;
}
if (window == null || window!.physicalSize.isEmpty) {
return Future.delayed(duration, () => true);
}
return false;
});
binding.allowFirstFrame();
}
Shaikh Imran Hossain commented
### This version solved my issue flutter_screenutil: ^5.9.0
github-actions commented
This issue is stale because it has been open for 30 days with no activity.