flutter generate 没有为测试目录注释 类

flutter generate doesn't annotated classes for test directory

所以我尝试使用 flutter generate

inject.dart 生成 类 DI 类

似乎在 lib/* 下生成了 类,但在 test/* 下却没有。它不会抛出任何错误。这是我的相关扑 类.

pubspec.yaml

name: gc_client
description: A gc

version: 1.0.0+1

environment:
  sdk: ">=2.1.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter
  json_annotation: ^2.0.0
  rxdart: ^0.22.0
  dio: ^2.1.3
  inject:
    path: ./inject.dart/package/inject

builders:
  json_serializable: ^2.0.0
  inject_generator:
    path: ./inject.dart/package/inject_generator

dev_dependencies:
  test: 1.6.1
  flutter_test:
    sdk: flutter
  mockito: ^4.0.0


flutter:

  uses-material-design: true

  fonts:
  - family: Raleway
    fonts:
    - asset: assets/fonts/raleway_regular.ttf
    - asset: assets/fonts/raleway_medium.ttf
      weight: 700

  assets:
  - assets/

组件类

我错过了什么吗?如果您需要更多信息,请告诉我。提前致谢。

问题出在构建运行器上。

这是针对相同问题的相关修复

https://github.com/flutter/flutter/issues/33266