美文网首页
The getter 'modalBarrierDismissL

The getter 'modalBarrierDismissL

作者: ChaosHeart | 来源:发表于2020-09-15 11:02 被阅读0次

    1.使用 showCupertinoDialog 报错

    截屏2020-09-15 10.14.57.png

    .2解决方案

    截屏2020-09-15 10.56.13.png

    将上边的类写在这里:


    截屏2020-09-15 11.01.30.png

    3.FallbackCupertinoLocalisationsDelegate类

    import 'package:flutter/cupertino.dart';
    import 'package:flutter/material.dart';
    
    class FallbackCupertinoLocalisationsDelegate
        extends LocalizationsDelegate<CupertinoLocalizations> {
      const FallbackCupertinoLocalisationsDelegate();
    
      @override
      bool isSupported(Locale locale) => true;
    
      @override
      Future<CupertinoLocalizations> load(Locale locale) =>
          DefaultCupertinoLocalizations.load(locale);
    
      @override
      bool shouldReload(FallbackCupertinoLocalisationsDelegate old) => false;
    }
    
    

    参考:
    https://blog.csdn.net/julystroy/article/details/90231588

    相关文章

      网友评论

          本文标题:The getter 'modalBarrierDismissL

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