目錄

use_string_in_part_of_directives

在 part of 指令中使用字串。

此規則自 Dart 2.19 起可用。

規則集:corerecommendedflutter

此規則有快速修復可用。

詳細資料

#

出自 Effective Dart

part of 指令中使用字串。

不良範例

dart
part of my_library;

良好範例

dart
part of '../../my_library.dart';

用法

#

若要啟用 use_string_in_part_of_directives 規則,請在您的 analysis_options.yaml 檔案中的 linter > rules 下新增 use_string_in_part_of_directives

analysis_options.yaml
yaml
linter:
  rules:
    - use_string_in_part_of_directives