Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dependOnInheritedWidgetOfExactType<_ViewScope>() or dependOnInheritedElement() was called before _LocationPageState.initState() completed. -> BrnRangeSelectionGroupWidget.dart 在initState方法中不可以使用context! #549

Open
hehe2015 opened this issue Dec 19, 2024 · 0 comments

Comments

@hehe2015
Copy link

v3.4.3

BrnRangeSelectionGroupWidget.dart 第86行有问题:
@OverRide
void initState() {
_screenWidth = View.of(context).physicalSize.width / View.of(context).devicePixelRatio;
...
}
在initState方法中不可以使用context!
在initState方法中不可以使用context!
在initState方法中不可以使用context!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant