美文网首页
Flutter 常见问题

Flutter 常见问题

作者: DerekTime | 来源:发表于2020-07-16 11:32 被阅读0次

    1.If you're running an application and need to access the binary messenger before runApp() has been called...

    void main() {//第一行加 WidgetsFlutterBinding.ensureInitialized(); PackageInfo.fromPlatform().then((packageInfo) { ZsConfig.packageInfo = packageInfo; runApp(MyApp()); });}
    
    1. import 'package: ***'; 不提示

    暂时是重新创建了一个工程,把代码复制过去了,不知道到底该怎么办,求大神留言指导。

    3.Unhandled Exception: 'package:flutter/src/widgets/scroll_controller.dart': Failed assertion: line 110 pos 12: '_positions.isNotEmpty': ScrollController not attached to any scroll views.

    if (ctx.state.orderListController.hasClients){
    ctx.state.orderListController.animateTo(ctx.state.orderListController.position.maxScrollExtent, curve: Curves.ease, duration:Duration(milliseconds:500));
    }
    

    相关文章

      网友评论

          本文标题:Flutter 常见问题

          本文链接:https://www.haomeiwen.com/subject/tuhphktx.html