OpenFlutter / flutter_screenutil

Flutter screen adaptation, font adaptation, get screen information
https://pub.dartlang.org/packages/flutter_screenutil
Apache License 2.0
3.87k stars 493 forks source link

Error when initialising #428

Closed hamza-imran75 closed 1 year ago

hamza-imran75 commented 1 year ago

'package:flutter/src/widgets/framework.dart': Failed assertion: line 4531 pos 14: 'owner!._debugCurrentBuildTarget == this': is not true.

The relevant error-causing widget was ScreenUtilInit

The following assertion was thrown building Builder(dependencies: [MediaQuery]): Got a stack frame from package:stack_trace, where a vm or web frame was expected. This can happen if FlutterError.demangleStackTrace was not set in an environment that propagates non-standard stack traces to the framework, such as during tests. 'package:flutter/src/foundation/stack_frame.dart':

Shiba-Kar commented 1 year ago

How have you solved this ?