Skip to content

getx 功能整理: 路由、中间件、组件、状态、多语言、样式

Notifications You must be signed in to change notification settings

wyw1984/getx_quick_start

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

getx_quick_start

getx 特性研究

https://pub.flutter-io.cn/packages/get

关闭 null-safety

很多第三方包还没有 null-safety

.vscode/launch.json

{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "getx_quick_start",
      "request": "launch",
      "type": "dart",
      "program": "lib/main.dart",
      "args": ["--no-sound-null-safety"]
    }
  ]
}

空值检查 unnecessary_non_null_assertion

https://dart.dev/tools/diagnostic-messages#unnecessary_non_null_assertion

原来

...
val == null
        ? Container()
        : ListTile(
            title: Text("传值 id = " + val["id"].toString()),
          ),

现在

  _buildBackListTileRow(Map? val) {
    return val == null
        ? Container()
        : ListTile(
            title: Text("传值 id = " + val["id"].toString()),
          );
  }

About

getx 功能整理: 路由、中间件、组件、状态、多语言、样式

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dart 57.6%
  • C++ 22.4%
  • CMake 14.1%
  • HTML 3.4%
  • C 1.3%
  • Swift 1.1%
  • Other 0.1%