mirror of
https://github.com/pese-git/cherrypick.git
synced 2026-01-23 21:13:35 +00:00
Compare commits
2 Commits
cccf460f01
...
cherrypick
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0eec549b57 | ||
|
|
a3648209b9 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -7,7 +7,7 @@
|
||||
.idea/
|
||||
.vscode/
|
||||
|
||||
|
||||
**/generated
|
||||
**/*.g.dart
|
||||
**/*.gr.dart
|
||||
**/*.freezed.dart
|
||||
|
||||
34
CHANGELOG.md
34
CHANGELOG.md
@@ -3,6 +3,40 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## 2025-07-15
|
||||
|
||||
### Changes
|
||||
|
||||
---
|
||||
|
||||
Packages with breaking changes:
|
||||
|
||||
- [`cherrypick_generator` - `v1.1.0-dev.6`](#cherrypick_generator---v110-dev6)
|
||||
|
||||
Packages with other changes:
|
||||
|
||||
- [`cherrypick` - `v2.2.0-dev.2`](#cherrypick---v220-dev2)
|
||||
- [`cherrypick_flutter` - `v1.1.2-dev.2`](#cherrypick_flutter---v112-dev2)
|
||||
|
||||
Packages with dependency updates only:
|
||||
|
||||
> Packages listed below depend on other packages in this workspace that have had changes. Their versions have been incremented to bump the minimum dependency versions of the packages they depend upon in this project.
|
||||
|
||||
- `cherrypick_flutter` - `v1.1.2-dev.2`
|
||||
|
||||
---
|
||||
|
||||
#### `cherrypick_generator` - `v1.1.0-dev.6`
|
||||
|
||||
- **FIX**: format test code.
|
||||
- **FEAT**(generator): support output_dir and build_extensions config for generated files.
|
||||
- **BREAKING** **FEAT**(generator): complete code generation testing framework with 100% test coverage.
|
||||
|
||||
#### `cherrypick` - `v2.2.0-dev.2`
|
||||
|
||||
- **DOCS**: move and update quick start guides to ./doc directory.
|
||||
|
||||
|
||||
## 2025-06-04
|
||||
|
||||
### Changes
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
## 2.2.0-dev.2
|
||||
|
||||
- **DOCS**: move and update quick start guides to ./doc directory.
|
||||
|
||||
## 2.2.0-dev.1
|
||||
|
||||
- **FIX**: fix warnings.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
name: cherrypick
|
||||
description: Cherrypick is a small dependency injection (DI) library for dart/flutter projects.
|
||||
version: 2.2.0-dev.1
|
||||
version: 2.2.0-dev.2
|
||||
homepage: https://pese-git.github.io/cherrypick-site/
|
||||
documentation: https://github.com/pese-git/cherrypick/wiki
|
||||
repository: https://github.com/pese-git/cherrypick
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
## 1.1.2-dev.2
|
||||
|
||||
- Update a dependency to the latest release.
|
||||
|
||||
## 1.1.2-dev.1
|
||||
|
||||
- Update a dependency to the latest release.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
name: cherrypick_flutter
|
||||
description: "Flutter library that allows access to the root scope through the context using `CherryPickProvider`."
|
||||
version: 1.1.2-dev.1
|
||||
version: 1.1.2-dev.2
|
||||
homepage: https://pese-git.github.io/cherrypick-site/
|
||||
documentation: https://github.com/pese-git/cherrypick/wiki
|
||||
repository: https://github.com/pese-git/cherrypick
|
||||
@@ -13,7 +13,7 @@ environment:
|
||||
dependencies:
|
||||
flutter:
|
||||
sdk: flutter
|
||||
cherrypick: ^2.2.0-dev.1
|
||||
cherrypick: ^2.2.0-dev.2
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
## 1.1.0-dev.6
|
||||
|
||||
> Note: This release has breaking changes.
|
||||
|
||||
- **FIX**: format test code.
|
||||
- **FEAT**(generator): support output_dir and build_extensions config for generated files.
|
||||
- **BREAKING** **FEAT**(generator): complete code generation testing framework with 100% test coverage.
|
||||
|
||||
## 1.1.0-dev.5
|
||||
|
||||
- **FEAT**: implement tryResolve via generate code.
|
||||
|
||||
@@ -4,6 +4,50 @@
|
||||
|
||||
---
|
||||
|
||||
### Advanced: Customizing Generated File Paths (`build_extensions`)
|
||||
|
||||
You can further control the filenames and subdirectory structure of generated files using the `build_extensions` option in `build.yaml`. This is especially useful in large apps for keeping DI artifacts organized under `lib/generated/` or any custom location.
|
||||
|
||||
**Example advanced build.yaml:**
|
||||
|
||||
```yaml
|
||||
targets:
|
||||
$default:
|
||||
builders:
|
||||
cherrypick_generator|inject_generator:
|
||||
options:
|
||||
build_extensions:
|
||||
'^lib/app.dart': ['lib/generated/app.inject.cherrypick.g.dart']
|
||||
output_dir: lib/generated
|
||||
generate_for:
|
||||
- lib/**.dart
|
||||
cherrypick_generator|module_generator:
|
||||
options:
|
||||
build_extensions:
|
||||
'^lib/di/{{}}.dart': ['lib/generated/di/{{}}.module.cherrypick.g.dart']
|
||||
output_dir: lib/generated
|
||||
generate_for:
|
||||
- lib/**.dart
|
||||
```
|
||||
|
||||
- **output_dir**: Path where all generated files are placed (e.g., `lib/generated`)
|
||||
- **build_extensions**: Allows templating of generated filenames and locations. You can use wildcards like `{{}}` to keep directory structure or group related files.
|
||||
|
||||
**If you use these options, be sure to update your imports accordingly, for example:**
|
||||
|
||||
```dart
|
||||
import 'package:your_package/generated/app.inject.cherrypick.g.dart';
|
||||
import 'package:your_package/generated/di/app_module.module.cherrypick.g.dart';
|
||||
```
|
||||
|
||||
### FAQ / Troubleshooting
|
||||
|
||||
- If files are missing or located in unexpected directories, double-check your `output_dir` and `build_extensions` configuration.
|
||||
- If you change generation paths, always update your imports in the codebase.
|
||||
- These options are backward compatible: omitting them preserves pre-existing (side-by-source) output behavior.
|
||||
|
||||
---
|
||||
|
||||
## Features
|
||||
|
||||
- **Automatic Field Injection:**
|
||||
@@ -170,6 +214,26 @@ final class $MyModule extends MyModule {
|
||||
|
||||
## Advanced Usage
|
||||
|
||||
### Custom output directory for generated code (output_dir)
|
||||
|
||||
You can control the directory where the generated files (`*.inject.cherrypick.g.dart`, `*.module.cherrypick.g.dart`) are placed using the `output_dir` option in your `build.yaml`:
|
||||
|
||||
```yaml
|
||||
targets:
|
||||
$default:
|
||||
builders:
|
||||
cherrypick_generator|injectBuilder:
|
||||
options:
|
||||
output_dir: lib/generated
|
||||
cherrypick_generator|moduleBuilder:
|
||||
options:
|
||||
output_dir: lib/generated
|
||||
```
|
||||
|
||||
**If `output_dir` is omitted, generated files are placed next to the original sources (default behavior).**
|
||||
|
||||
After running code generation, you will find files like `lib/generated/app.inject.cherrypick.g.dart` and `lib/generated/your_module.module.cherrypick.g.dart`. You can import them as needed from that directory.
|
||||
|
||||
- **Combining Modules and Field Injection:**
|
||||
It's possible to mix both style of DI — modules for binding, and field injection for consuming services.
|
||||
- **Parameter and Named Injection:**
|
||||
|
||||
@@ -1,20 +1,18 @@
|
||||
builders:
|
||||
module_generator:
|
||||
import: "package:cherrypick_generator/module_generator.dart"
|
||||
builder_factories: ["moduleBuilder"]
|
||||
build_extensions: {".dart": [".module.cherrypick.g.dart"]}
|
||||
auto_apply: dependents
|
||||
required_inputs: ["lib/**"]
|
||||
runs_before: []
|
||||
build_to: source
|
||||
inject_generator:
|
||||
import: "package:cherrypick_generator/inject_generator.dart"
|
||||
builder_factories: ["injectBuilder"]
|
||||
build_extensions: {".dart": [".inject.cherrypick.g.dart"]}
|
||||
auto_apply: dependents
|
||||
required_inputs: ["lib/**"]
|
||||
runs_before: []
|
||||
build_to: source
|
||||
applies_builders: ["source_gen|combining_builder"]
|
||||
module_generator:
|
||||
import: "package:cherrypick_generator/module_generator.dart"
|
||||
builder_factories: ["moduleBuilder"]
|
||||
build_extensions: {".dart": [".module.cherrypick.g.dart"]}
|
||||
auto_apply: dependents
|
||||
build_to: source
|
||||
applies_builders: ["source_gen|combining_builder"]
|
||||
|
||||
targets:
|
||||
$default:
|
||||
@@ -24,4 +22,4 @@ targets:
|
||||
- lib/**.dart
|
||||
cherrypick_generator|inject_generator:
|
||||
generate_for:
|
||||
- lib/**.dart
|
||||
- lib/**.dart
|
||||
|
||||
76
cherrypick_generator/lib/cherrypick_custom_builders.dart
Normal file
76
cherrypick_generator/lib/cherrypick_custom_builders.dart
Normal file
@@ -0,0 +1,76 @@
|
||||
import 'dart:async';
|
||||
import 'package:build/build.dart';
|
||||
import 'package:path/path.dart' as p;
|
||||
import 'package:source_gen/source_gen.dart';
|
||||
import 'inject_generator.dart';
|
||||
import 'module_generator.dart';
|
||||
|
||||
/// Универсальный Builder для генераторов Cherrypick с поддержкой кастомного output_dir
|
||||
/// (указывает директорию для складывания сгенерированных файлов через build.yaml)
|
||||
class CustomOutputBuilder extends Builder {
|
||||
final Generator generator;
|
||||
final String extension;
|
||||
final String outputDir;
|
||||
final Map<String, List<String>> customBuildExtensions;
|
||||
|
||||
CustomOutputBuilder(this.generator, this.extension, this.outputDir, this.customBuildExtensions);
|
||||
|
||||
@override
|
||||
Map<String, List<String>> get buildExtensions {
|
||||
if (customBuildExtensions.isNotEmpty) {
|
||||
return customBuildExtensions;
|
||||
}
|
||||
// Дефолт: рядом с исходником, как PartBuilder
|
||||
return {
|
||||
'.dart': [extension],
|
||||
};
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> build(BuildStep buildStep) async {
|
||||
final inputId = buildStep.inputId;
|
||||
print('[CustomOutputBuilder] build() called for input: \\${inputId.path}');
|
||||
final library = await buildStep.resolver.libraryFor(inputId);
|
||||
print('[CustomOutputBuilder] resolved library for: \\${inputId.path}');
|
||||
final generated = await generator.generate(LibraryReader(library), buildStep);
|
||||
print('[CustomOutputBuilder] gen result for input: \\${inputId.path}, isNull: \\${generated == null}, isEmpty: \\${generated?.isEmpty}');
|
||||
if (generated == null || generated.isEmpty) return;
|
||||
String outputPath;
|
||||
if (customBuildExtensions.isNotEmpty) {
|
||||
// Кастомная директория/шаблон
|
||||
final inputPath = inputId.path;
|
||||
final relativeInput = p.relative(inputPath, from: 'lib/');
|
||||
final parts = p.split(relativeInput);
|
||||
String subdir = '';
|
||||
String baseName = parts.last.replaceAll('.dart', '');
|
||||
if (parts.length > 1) {
|
||||
subdir = parts.first; // Например, 'di'
|
||||
}
|
||||
outputPath = subdir.isEmpty
|
||||
? p.join('lib', 'generated', '$baseName$extension')
|
||||
: p.join('lib', 'generated', subdir, '$baseName$extension');
|
||||
} else {
|
||||
// Дефолт: рядом с исходником
|
||||
outputPath = p.setExtension(inputId.path, extension);
|
||||
}
|
||||
final outputId = AssetId(inputId.package, outputPath);
|
||||
// part of - всегда авто!
|
||||
final partOfPath = p.relative(inputId.path, from: p.dirname(outputPath));
|
||||
final codeWithPartOf = "part of '$partOfPath';\n\n$generated";
|
||||
print('[CustomOutputBuilder] writing to output: \\${outputId.path}');
|
||||
await buildStep.writeAsString(outputId, codeWithPartOf);
|
||||
print('[CustomOutputBuilder] successfully written for input: \\${inputId.path}');
|
||||
}
|
||||
}
|
||||
|
||||
Builder injectCustomBuilder(BuilderOptions options) {
|
||||
final outputDir = options.config['output_dir'] as String? ?? '';
|
||||
final buildExtensions = (options.config['build_extensions'] as Map?)?.map((k,v)=>MapEntry(k.toString(), (v as List).map((item)=>item.toString()).toList())) ?? {};
|
||||
return CustomOutputBuilder(InjectGenerator(), '.inject.cherrypick.g.dart', outputDir, buildExtensions);
|
||||
}
|
||||
|
||||
Builder moduleCustomBuilder(BuilderOptions options) {
|
||||
final outputDir = options.config['output_dir'] as String? ?? '';
|
||||
final buildExtensions = (options.config['build_extensions'] as Map?)?.map((k,v)=>MapEntry(k.toString(), (v as List).map((item)=>item.toString()).toList())) ?? {};
|
||||
return CustomOutputBuilder(ModuleGenerator(), '.module.cherrypick.g.dart', outputDir, buildExtensions);
|
||||
}
|
||||
@@ -19,6 +19,7 @@ import 'package:build/build.dart';
|
||||
import 'package:source_gen/source_gen.dart';
|
||||
import 'package:analyzer/dart/element/element.dart';
|
||||
import 'package:cherrypick_annotations/cherrypick_annotations.dart' as ann;
|
||||
import 'cherrypick_custom_builders.dart' as custom;
|
||||
|
||||
/// InjectGenerator generates a mixin for a class marked with @injectable()
|
||||
/// and injects all fields annotated with @inject(), using CherryPick DI.
|
||||
@@ -204,4 +205,4 @@ class _ParsedInjectField {
|
||||
///
|
||||
/// Фабрика билдера. Используется build_runner.
|
||||
Builder injectBuilder(BuilderOptions options) =>
|
||||
PartBuilder([InjectGenerator()], '.inject.cherrypick.g.dart');
|
||||
custom.injectCustomBuilder(options);
|
||||
|
||||
@@ -15,9 +15,8 @@ import 'package:analyzer/dart/element/element.dart';
|
||||
import 'package:build/build.dart';
|
||||
import 'package:source_gen/source_gen.dart';
|
||||
import 'package:cherrypick_annotations/cherrypick_annotations.dart' as ann;
|
||||
|
||||
import 'src/generated_class.dart';
|
||||
|
||||
import 'cherrypick_custom_builders.dart' as custom;
|
||||
/// ---------------------------------------------------------------------------
|
||||
/// ModuleGenerator for code generation of dependency-injected modules.
|
||||
///
|
||||
@@ -89,5 +88,8 @@ class ModuleGenerator extends GeneratorForAnnotation<ann.module> {
|
||||
/// Возвращает Builder, используемый build_runner для генерации кода для всех
|
||||
/// файлов, где встречается @module().
|
||||
/// ---------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
Builder moduleBuilder(BuilderOptions options) =>
|
||||
PartBuilder([ModuleGenerator()], '.module.cherrypick.g.dart');
|
||||
custom.moduleCustomBuilder(options);
|
||||
@@ -2,7 +2,7 @@ name: cherrypick_generator
|
||||
description: |
|
||||
Source code generator for the cherrypick dependency injection system. Processes annotations to generate binding and module code for Dart & Flutter projects.
|
||||
|
||||
version: 1.1.0-dev.5
|
||||
version: 1.1.0-dev.6
|
||||
documentation: https://github.com/pese-git/cherrypick/wiki
|
||||
repository: https://github.com/pese-git/cherrypick/cherrypick_generator
|
||||
issue_tracker: https://github.com/pese-git/cherrypick/issues
|
||||
@@ -18,6 +18,7 @@ dependencies:
|
||||
build: ^2.4.1
|
||||
source_gen: ^2.0.0
|
||||
collection: ^1.18.0
|
||||
path: ^1.9.1
|
||||
|
||||
dev_dependencies:
|
||||
lints: ^4.0.0
|
||||
|
||||
@@ -379,6 +379,45 @@ You can use CherryPick in Dart CLI, server apps, and microservices. All major fe
|
||||
|
||||
---
|
||||
|
||||
### Advanced: Customizing Generated Code Location
|
||||
|
||||
CherryPick's code generator now supports flexible output configuration via `build.yaml`.
|
||||
|
||||
You can control both the output directory (using `output_dir`) and filename templates (using `build_extensions`):
|
||||
|
||||
```yaml
|
||||
targets:
|
||||
$default:
|
||||
builders:
|
||||
cherrypick_generator|inject_generator:
|
||||
options:
|
||||
build_extensions:
|
||||
'^lib/app.dart': ['lib/generated/app.inject.cherrypick.g.dart']
|
||||
output_dir: lib/generated
|
||||
generate_for:
|
||||
- lib/**.dart
|
||||
cherrypick_generator|module_generator:
|
||||
options:
|
||||
build_extensions:
|
||||
'^lib/di/{{}}.dart': ['lib/generated/di/{{}}.module.cherrypick.g.dart']
|
||||
output_dir: lib/generated
|
||||
generate_for:
|
||||
- lib/**.dart
|
||||
```
|
||||
|
||||
- **output_dir**: Folder where all generated files will be placed.
|
||||
- **build_extensions**: Allows full customization of generated file names and subfolders.
|
||||
|
||||
If you use these, be sure to update your imports accordingly, e.g.:
|
||||
```dart
|
||||
import 'package:your_project/generated/app.inject.cherrypick.g.dart';
|
||||
```
|
||||
If not specified, generated files will appear next to your source files, as before.
|
||||
|
||||
---
|
||||
|
||||
---
|
||||
|
||||
## Conclusion
|
||||
|
||||
**CherryPick** is a modern DI solution for Dart and Flutter, combining a concise API and advanced annotation/codegen features. Scopes, parameterized providers, named bindings, and field-injection make it great for both small and large-scale projects.
|
||||
|
||||
@@ -382,6 +382,45 @@ class MyApp extends StatelessWidget {
|
||||
|
||||
---
|
||||
|
||||
### Продвинутая настройка путей генерации кода
|
||||
|
||||
В последних версиях генератора CherryPick добавлена поддержка гибкой настройки директорий и шаблонов имён файлов через `build.yaml`.
|
||||
|
||||
Вы можете управлять и папкой назначения (через `output_dir`), и шаблоном имён (через `build_extensions`):
|
||||
|
||||
```yaml
|
||||
targets:
|
||||
$default:
|
||||
builders:
|
||||
cherrypick_generator|inject_generator:
|
||||
options:
|
||||
build_extensions:
|
||||
'^lib/app.dart': ['lib/generated/app.inject.cherrypick.g.dart']
|
||||
output_dir: lib/generated
|
||||
generate_for:
|
||||
- lib/**.dart
|
||||
cherrypick_generator|module_generator:
|
||||
options:
|
||||
build_extensions:
|
||||
'^lib/di/{{}}.dart': ['lib/generated/di/{{}}.module.cherrypick.g.dart']
|
||||
output_dir: lib/generated
|
||||
generate_for:
|
||||
- lib/**.dart
|
||||
```
|
||||
|
||||
- **output_dir**: Папка, куда будут складываться все сгенерированные файлы.
|
||||
- **build_extensions**: Полный контроль над именами итоговых файлов и подпапками.
|
||||
|
||||
Если вы это используете, обязательно обновляйте импорты, например:
|
||||
```dart
|
||||
import 'package:your_project/generated/app.inject.cherrypick.g.dart';
|
||||
```
|
||||
Если не задать параметры, файлы будут сгенерированы рядом с исходными — как и раньше.
|
||||
|
||||
---
|
||||
|
||||
---
|
||||
|
||||
## Заключение
|
||||
|
||||
**CherryPick** — это современное DI-решение для Dart и Flutter, сочетающее лаконичный API и расширенные возможности аннотирования и генерации кода. Гибкость Scopes, параметрические провайдеры, именованные биндинги и field-injection делают его особенно мощным как для небольших, так и для масштабных проектов.
|
||||
|
||||
@@ -19,7 +19,29 @@ There are two main methods for initializing a custom instance `toInstance ()` an
|
||||
|
||||
Example:
|
||||
|
||||
```dart
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Advanced: Customizing Code Generation Output
|
||||
|
||||
You can configure where generated files will be placed by updating your `build.yaml` (supports `output_dir` and `build_extensions`):
|
||||
|
||||
```yaml
|
||||
targets:
|
||||
$default:
|
||||
builders:
|
||||
cherrypick_generator|inject_generator:
|
||||
options:
|
||||
output_dir: lib/generated
|
||||
cherrypick_generator|module_generator:
|
||||
options:
|
||||
output_dir: lib/generated
|
||||
```
|
||||
|
||||
For full control and more examples, see the "Full Tutorial" or documentation on `build_extensions`.
|
||||
|
||||
---
|
||||
// initializing a text string instance through a method toInstance()
|
||||
Binding<String>().toInstance("hello world");
|
||||
|
||||
|
||||
@@ -19,7 +19,29 @@ Binding - по сути это конфигуратор для пользов
|
||||
|
||||
Пример:
|
||||
|
||||
```dart
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Продвинутая настройка генерации кода
|
||||
|
||||
В файле `build.yaml` можно задать папку для сгенерированных файлов через параметр `output_dir` (а также использовать шаблон `build_extensions`):
|
||||
|
||||
```yaml
|
||||
targets:
|
||||
$default:
|
||||
builders:
|
||||
cherrypick_generator|inject_generator:
|
||||
options:
|
||||
output_dir: lib/generated
|
||||
cherrypick_generator|module_generator:
|
||||
options:
|
||||
output_dir: lib/generated
|
||||
```
|
||||
|
||||
Для полной настройки и шаблонов см. раздел “Полный гайд” или документацию по `build_extensions`.
|
||||
|
||||
---
|
||||
// инициализация экземпляра текстовой строки через метод toInstance()
|
||||
Binding<String>().toInstance("hello world");
|
||||
|
||||
|
||||
27
examples/postly/build.yaml
Normal file
27
examples/postly/build.yaml
Normal file
@@ -0,0 +1,27 @@
|
||||
targets:
|
||||
$default:
|
||||
builders:
|
||||
cherrypick_generator|inject_generator:
|
||||
options:
|
||||
build_extensions:
|
||||
'^lib/app.dart': ['lib/generated/app.inject.cherrypick.g.dart']
|
||||
output_dir: lib/generated
|
||||
generate_for:
|
||||
- lib/**.dart
|
||||
cherrypick_generator|module_generator:
|
||||
options:
|
||||
build_extensions:
|
||||
'^lib/di/{{}}.dart': ['lib/generated/di/{{}}.module.cherrypick.g.dart']
|
||||
output_dir: lib/generated
|
||||
generate_for:
|
||||
- lib/**.dart
|
||||
|
||||
#targets:
|
||||
# $default:
|
||||
# builders:
|
||||
# cherrypick_generator|module_generator:
|
||||
# generate_for:
|
||||
# - lib/**.dart
|
||||
# cherrypick_generator|inject_generator:
|
||||
# generate_for:
|
||||
# - lib/**.dart
|
||||
@@ -7,7 +7,7 @@ import 'domain/repository/post_repository.dart';
|
||||
import 'presentation/bloc/post_bloc.dart';
|
||||
import 'router/app_router.dart';
|
||||
|
||||
part 'app.inject.cherrypick.g.dart';
|
||||
part 'generated/app.inject.cherrypick.g.dart';
|
||||
|
||||
@injectable()
|
||||
class MyApp extends StatelessWidget with _$MyApp {
|
||||
|
||||
@@ -5,7 +5,7 @@ import '../data/network/json_placeholder_api.dart';
|
||||
import '../data/post_repository_impl.dart';
|
||||
import '../domain/repository/post_repository.dart';
|
||||
|
||||
part 'app_module.module.cherrypick.g.dart';
|
||||
part '../generated/di/app_module.module.cherrypick.g.dart';
|
||||
|
||||
@module()
|
||||
abstract class AppModule extends Module {
|
||||
|
||||
Reference in New Issue
Block a user