![flutter报错The type of the function literal can't be inferred because the literal has a block as its body.A value of type 'String?' can't be assigned to a variable of type 'String'. flutter报错The type of the function literal can't be inferred because the literal has a block as its body.A value of type 'String?' can't be assigned to a variable of type 'String'.](https://pic.wangt.cc/download/pic_router.php?path=https://img-blog.csdnimg.cn/f75d1feed0f04a419f278ed0dd7fe62c.png?x-oss-process=image/watermark,type_ZHJvaWRzYW5zZmFsbGJhY2s,shadow_50,text_Q1NETiBAdGFuZ2RvdTM2OTA5ODY1NQ==,size_20,color_FFFFFF,t_70,g_se,x_16)
flutter报错The type of the function literal can't be inferred because the literal has a block as its body.A value of type 'String?' can't be assigned to a variable of type 'String'.
![flutter报错The type of the function literal can't be inferred because the literal has a block as its body.A value of type 'String?' can't be assigned to a variable of type 'String'. flutter报错The type of the function literal can't be inferred because the literal has a block as its body.A value of type 'String?' can't be assigned to a variable of type 'String'.](https://pic.wangt.cc/download/pic_router.php?path=https://img-blog.csdnimg.cn/bd9019b884e64bb38b5079f34fe77c8d.png?x-oss-process=image/watermark,type_ZHJvaWRzYW5zZmFsbGJhY2s,shadow_50,text_Q1NETiBAdGFuZ2RvdTM2OTA5ODY1NQ==,size_20,color_FFFFFF,t_70,g_se,x_16)
flutter报错The type of the function literal can't be inferred because the literal has a block as its body.A value of type 'String?' can't be assigned to a variable of type 'String'.
![flutter - Null Related Error - The argument type 'String? Function(String)' can't be assigned to the parameter type 'String? Function(String?)?' - Stack Overflow flutter - Null Related Error - The argument type 'String? Function(String)' can't be assigned to the parameter type 'String? Function(String?)?' - Stack Overflow](https://i.stack.imgur.com/Gco6Q.png)
flutter - Null Related Error - The argument type 'String? Function(String)' can't be assigned to the parameter type 'String? Function(String?)?' - Stack Overflow
![What is typedef in Flutter/Dart?. A minimalist intruduction to typedefs | by Hasan Basri Bayat | ITNEXT What is typedef in Flutter/Dart?. A minimalist intruduction to typedefs | by Hasan Basri Bayat | ITNEXT](https://miro.medium.com/max/1400/1*3c4-yFRo5XsTBwhRxHFBvA.png)
What is typedef in Flutter/Dart?. A minimalist intruduction to typedefs | by Hasan Basri Bayat | ITNEXT
![Ubuntu19 builds Flutter development environment: 3. Install Flutter and Dart plugins for Android Studio - Code World Ubuntu19 builds Flutter development environment: 3. Install Flutter and Dart plugins for Android Studio - Code World](https://img-blog.csdnimg.cn/20190606220051448.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzI3MTU4MTc5,size_16,color_FFFFFF,t_70)
Ubuntu19 builds Flutter development environment: 3. Install Flutter and Dart plugins for Android Studio - Code World
![Dart with Digital java code text. Dart and Computer software coding vector concept. Programming coding script java, digital program code with Dart on Stock Photo - Alamy Dart with Digital java code text. Dart and Computer software coding vector concept. Programming coding script java, digital program code with Dart on Stock Photo - Alamy](https://c8.alamy.com/comp/W3XEKE/dart-with-digital-java-code-text-dart-and-computer-software-coding-vector-concept-programming-coding-script-java-digital-program-code-with-dart-on-W3XEKE.jpg)