flutter - Flutter 中的区分大小写

标签 flutter dart case-sensitive

由于 Dart 区分大小写,因此我期望所有 Flutter 都区分大小写。发现导入包通常不区分大小写

任何人都可以确认并链接到官方文档吗?我自己找不到明确的答案。还有其他不区分大小写的 Flutter 行为需要注意吗?我错过了什么吗?

最佳答案

似乎与运行程序的操作系统有关

查看 this issue 的评论

它引用:

Windows doesn't care if a file is named Test.dart or test.dart. For Windows (and Dart on Windows), it's the same. However, when we copy the file over to Android, it is important that we distinguish between the two. For Android (and Dart on Android) Test.dart and test.dart are not the same!

但是它似乎已通过 this PR 修复

官方 dart 风格指南说用 lowercase_with_underscores 命名文件,找到文档 here 。最好遵循官方的命名风格指南,无论是文件、函数还是类。

查看官方风格指南here .

希望有帮助!

关于flutter - Flutter 中的区分大小写,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59980154/

相关文章:

flutter - 我可以将TabBar中的标签向左而不是中心对齐吗?

flutter CustomPainter - 如何在线路径中切出一个洞

dart - 图标下方的 Flutter 字体很棒的文字

sql - IndexedDB排序

php - PHP 函数是否区分大小写?

perl - 如何在 Perl 中执行区分大小写的重命名或移动操作?

android - 如何在 List Flutter 中创建 SearchView

html - 如何将外部CSS应用到flutter webview中的html渲染

firebase - 从Firebase Firestore数据库集合中提取大量(大约300个)文档

php - 不区分大小写但敏感