Open TakahashiAiko opened 3 years ago
我也遇到相同的问题
binding的作用是什么,官方文档好像没提,但是用get_cli生成会带上这个。还有就是GetMaterialApp( initialBinding: SplashBinding(), ) initialBinding是什么意思,我看AppPages里又有写binding,根下的initialBinding是起到什么作用。我点进去看他就是?.dependencies()
替换一下包pull_to_refresh由1.6.3为1.6.4解决了问题
pull_to_refresh: ^1.6.4
顺便问一下,
binding的作用是什么,官方文档好像没提,但是用get_cli生成会带上这个。还有就是GetMaterialApp( initialBinding: SplashBinding(), ) initialBinding是什么意思,我看AppPages里又有写binding,根下的initialBinding是起到什么作用。我点进去看他就是?.dependencies()
耦合view与controller
/D:/Flutter/.pub-cache/hosted/pub.flutter-io.cn/pull_to_refresh-1.6.3/lib/src/smart_refresher.dart:273:21: Error: The method 'ancestorWidgetOfExactType' isn't defined for the class 'BuildContext'.
/D:/Flutter/.pub-cache/hosted/pub.flutter-io.cn/pull_to_refresh-1.6.3/lib/src/smart_refresher.dart:277:21: Error: The method 'ancestorStateOfType' isn't defined for the class 'BuildContext'.
Try correcting the name to the name of an existing method, or defining a method named 'ancestorStateOfType'. return context?.ancestorStateOfType(TypeMatcher());
^^^^^^^^^^^^^^^^^^^
/D:/Flutter/.pub-cache/hosted/pub.flutter-io.cn/pull_to_refresh-1.6.3/lib/src/smart_refresher.dart:1003:20: Error: The method 'inheritFromWidgetOfExactType' isn't defined for the class 'BuildContext'.
FAILURE: Build failed with an exception.
Where: Script 'D:\Flutter\packages\flutter_tools\gradle\flutter.gradle' line: 991
What went wrong: Execution failed for task ':app:compileFlutterBuildDebug'.
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org