''package:flutter/src/widgets/framework.dart': Failed assertion: line 5356 pos 14: '()
I get the error
'package:flutter/src/widgets/framework.dart': Failed assertion: line 5356 pos 14: '() {
// check that it really is our d
when I tab on a textview inside my app.
This is how i initialize the app itself.
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return ScreenUtilInit(
designSize: Size(460,790),
builder: (context) => MultiProvider(
providers: [
ChangeNotifierProvider(create: (context) => TestApp()),
ChangeNotifierProvider(create: (context) => PageControllerProvider()),
ChangeNotifierProvider(create: (context) => RequestProvider()),
ChangeNotifierProvider(create: (context) => HistoryProvider()),
ChangeNotifierProvider(create: (context) => ThemeProvider()),
],
child: App()
),
);
}
}
Solution 1:[1]
try updating flutter_screenutil to version 5.5.2 or higher
Solution 2:[2]
If you are using the current version of Flutter (v2.10.2>=),
ScreenUtil package creates a conflict with that version.
If you downgrade your Flutter version back to v.2.10.2, the error will be fixed.
You can access it from this link.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Silvio Tacinelli |
Solution 2 | rasityilmaz |