美文网首页
Flutter工作随笔

Flutter工作随笔

作者: Hamiltonian | 来源:发表于2024-06-03 14:54 被阅读0次
    特殊类型的数组GetX如何监听
    class NotificationLogic extends GetxController{
      ///是否开启通知权限
      var notificationPermission = false.obs;
      ///开启了哪几种通知权限
      var notificationPermissionList = <NotificationPermission>[].obs;
      ///可以开启的通知权限
      var notificationPermissionCouldAddList = <NotificationPermission>[].obs;
      ///显示的UI Widget,你可以开启xxx通知提示
      var textToShowPermissionCouldAddList = <Widget>[].obs;
    }
    
    绑定监听App进入前台后台
    WidgetsBindingObserver
    

    相关文章

      网友评论

          本文标题:Flutter工作随笔

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