mirror of
https://github.com/pese-git/cherrypick.git
synced 2026-01-24 13:47:24 +00:00
Compare commits
12 Commits
cherrypick
...
cherrypick
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dd608031a2 | ||
|
|
49e3654ab8 | ||
|
|
bc28ff79ef | ||
|
|
52bc66f2f9 | ||
|
|
79a050d056 | ||
|
|
3beb53a094 | ||
|
|
21955640d9 | ||
|
|
a62052daa5 | ||
|
|
7dbaa59c01 | ||
|
|
8438697107 | ||
|
|
9c42ba4cef | ||
|
|
1f6ee172a1 |
47
CHANGELOG.md
47
CHANGELOG.md
@@ -3,6 +3,53 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## 2025-05-28
|
||||||
|
|
||||||
|
### Changes
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Packages with breaking changes:
|
||||||
|
|
||||||
|
- There are no breaking changes in this release.
|
||||||
|
|
||||||
|
Packages with other changes:
|
||||||
|
|
||||||
|
- [`cherrypick_generator` - `v1.1.0-dev.4`](#cherrypick_generator---v110-dev4)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
#### `cherrypick_generator` - `v1.1.0-dev.4`
|
||||||
|
|
||||||
|
- **FIX**: fixed warnings.
|
||||||
|
|
||||||
|
|
||||||
|
## 2025-05-23
|
||||||
|
|
||||||
|
### Changes
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Packages with breaking changes:
|
||||||
|
|
||||||
|
- There are no breaking changes in this release.
|
||||||
|
|
||||||
|
Packages with other changes:
|
||||||
|
|
||||||
|
- [`cherrypick_annotations` - `v1.1.0-dev.1`](#cherrypick_annotations---v110-dev1)
|
||||||
|
- [`cherrypick_generator` - `v1.1.0-dev.3`](#cherrypick_generator---v110-dev3)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
#### `cherrypick_annotations` - `v1.1.0-dev.1`
|
||||||
|
|
||||||
|
- **FEAT**: implement InjectGenerator.
|
||||||
|
|
||||||
|
#### `cherrypick_generator` - `v1.1.0-dev.3`
|
||||||
|
|
||||||
|
- **FEAT**: implement InjectGenerator.
|
||||||
|
|
||||||
|
|
||||||
## 2025-05-23
|
## 2025-05-23
|
||||||
|
|
||||||
### Changes
|
### Changes
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
## 1.1.0-dev.1
|
||||||
|
|
||||||
|
- **FEAT**: implement InjectGenerator.
|
||||||
|
|
||||||
## 1.1.0-dev.0
|
## 1.1.0-dev.0
|
||||||
|
|
||||||
- **FEAT**: implement generator for dynamic params.
|
- **FEAT**: implement generator for dynamic params.
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
[](LICENSE)
|
[](LICENSE)
|
||||||
|
|
||||||
A lightweight set of Dart annotations designed for dependency injection (DI) frameworks and code generation, inspired by modern approaches like Dagger and Injectable. Works best in tandem with [`cherrypick_generator`](https://pub.dev/packages/cherrypick_generator).
|
A lightweight set of Dart annotations for dependency injection (DI) frameworks and code generation, inspired by modern approaches like Dagger and Injectable. Optimized for use with [`cherrypick_generator`](https://pub.dev/packages/cherrypick_generator).
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -10,10 +10,13 @@ A lightweight set of Dart annotations designed for dependency injection (DI) fra
|
|||||||
|
|
||||||
- **@module** – Marks a class as a DI module for service/provider registration.
|
- **@module** – Marks a class as a DI module for service/provider registration.
|
||||||
- **@singleton** – Declares that a method or class should be provided as a singleton.
|
- **@singleton** – Declares that a method or class should be provided as a singleton.
|
||||||
- **@instance** – Marks a method or class so that a new instance is provided on each request (not a singleton).
|
- **@instance** – Marks a method or class so that a new instance is provided on each request.
|
||||||
- **@provide** – Marks a method whose return value should be registered as a provider, supporting dependency injection into parameters.
|
- **@provide** – Marks a method whose return value should be registered as a provider, supporting DI into its parameters.
|
||||||
- **@named** – Assigns a string name to a binding for keyed resolution.
|
- **@named** – Assigns a string name to a binding for keyed resolution and injection.
|
||||||
- **@params** – Indicates that a parameter should be injected with runtime-supplied arguments.
|
- **@params** – Indicates that a parameter should be injected with runtime-supplied arguments.
|
||||||
|
- **@injectable** – Marks a class as eligible for automatic field injection. Fields annotated with `@inject` will be injected by the code generator.
|
||||||
|
- **@inject** – Marks a field to be automatically injected by the code generator.
|
||||||
|
- **@scope** – Declares the DI scope from which a dependency should be resolved for a field.
|
||||||
|
|
||||||
These annotations streamline DI configuration and serve as markers for code generation tools such as [`cherrypick_generator`](https://pub.dev/packages/cherrypick_generator).
|
These annotations streamline DI configuration and serve as markers for code generation tools such as [`cherrypick_generator`](https://pub.dev/packages/cherrypick_generator).
|
||||||
|
|
||||||
@@ -32,18 +35,21 @@ Add as a `dev_dependency` for code generation:
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
|
cherrypick_generator: ^latest
|
||||||
build_runner: ^latest
|
build_runner: ^latest
|
||||||
cherrypick_generator:
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### 2. Annotate your DI modules and providers
|
---
|
||||||
|
|
||||||
|
### 2. Annotate your DI modules, providers, and injectable classes
|
||||||
|
|
||||||
|
#### **Module and Provider Example**
|
||||||
|
|
||||||
```dart
|
```dart
|
||||||
import 'package:cherrypick_annotations/cherrypick_annotations.dart';
|
import 'package:cherrypick_annotations/cherrypick_annotations.dart';
|
||||||
import 'package:cherrypick/cherrypick.dart';
|
|
||||||
|
|
||||||
@module()
|
@module()
|
||||||
abstract class AppModule extends Module {
|
abstract class AppModule {
|
||||||
@singleton()
|
@singleton()
|
||||||
Dio dio() => Dio();
|
Dio dio() => Dio();
|
||||||
|
|
||||||
@@ -61,7 +67,7 @@ abstract class AppModule extends Module {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
When used with `cherrypick_generator`, code similar to the following will be generated:
|
With `cherrypick_generator`, code like the following will be generated:
|
||||||
|
|
||||||
```dart
|
```dart
|
||||||
final class $AppModule extends AppModule {
|
final class $AppModule extends AppModule {
|
||||||
@@ -78,13 +84,78 @@ final class $AppModule extends AppModule {
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
#### **Field Injection Example**
|
||||||
|
|
||||||
|
```dart
|
||||||
|
import 'package:cherrypick_annotations/cherrypick_annotations.dart';
|
||||||
|
|
||||||
|
@injectable()
|
||||||
|
class ProfileView with _$ProfileView{
|
||||||
|
@inject()
|
||||||
|
late final AuthService auth;
|
||||||
|
|
||||||
|
@inject()
|
||||||
|
@scope('profile')
|
||||||
|
late final ProfileManager manager;
|
||||||
|
|
||||||
|
@inject()
|
||||||
|
@named('admin')
|
||||||
|
late final UserService adminUserService;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
The code generator produces a mixin (simplified):
|
||||||
|
|
||||||
|
```dart
|
||||||
|
mixin _$ProfileView {
|
||||||
|
void _inject(ProfileView instance) {
|
||||||
|
instance.auth = CherryPick.openRootScope().resolve<AuthService>();
|
||||||
|
instance.manager = CherryPick.openScope(scopeName: 'profile').resolve<ProfileManager>();
|
||||||
|
instance.adminUserService = CherryPick.openRootScope().resolve<UserService>(named: 'admin');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Annotation Reference
|
## Annotation Reference
|
||||||
|
|
||||||
|
### `@injectable`
|
||||||
|
|
||||||
|
```dart
|
||||||
|
@injectable()
|
||||||
|
class MyWidget { ... }
|
||||||
|
```
|
||||||
|
Marks a class as injectable for CherryPick DI. The code generator will generate a mixin to perform automatic injection of fields marked with `@inject()`.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### `@inject`
|
||||||
|
|
||||||
|
```dart
|
||||||
|
@inject()
|
||||||
|
late final SomeService service;
|
||||||
|
```
|
||||||
|
Applied to a field to request automatic injection of the dependency using the CherryPick DI framework.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### `@scope`
|
||||||
|
|
||||||
|
```dart
|
||||||
|
@inject()
|
||||||
|
@scope('profile')
|
||||||
|
late final ProfileManager manager;
|
||||||
|
```
|
||||||
|
Specifies the scope from which the dependency should be resolved for an injected field.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
### `@module`
|
### `@module`
|
||||||
|
|
||||||
```dart
|
```dart
|
||||||
@module()
|
@module()
|
||||||
abstract class AppModule extends Module {}
|
abstract class AppModule {}
|
||||||
```
|
```
|
||||||
Use on classes to mark them as a DI module. This is the root for registering your dependency providers.
|
Use on classes to mark them as a DI module. This is the root for registering your dependency providers.
|
||||||
|
|
||||||
@@ -126,7 +197,8 @@ Use on methods to indicate they provide a dependency to the DI module. Dependenc
|
|||||||
@named('token')
|
@named('token')
|
||||||
String token() => 'abc';
|
String token() => 'abc';
|
||||||
```
|
```
|
||||||
Assigns a name to a binding for keyed injection or resolution.
|
Assigns a name to a binding for keyed injection or resolution.
|
||||||
|
Can be used on both provider methods and fields.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -136,7 +208,7 @@ Assigns a name to a binding for keyed injection or resolution.
|
|||||||
@provide()
|
@provide()
|
||||||
String greet(@params() dynamic params) => 'Hello $params';
|
String greet(@params() dynamic params) => 'Hello $params';
|
||||||
```
|
```
|
||||||
Use on method parameters to indicate that this parameter should receive runtime-supplied arguments during dependency resolution (for example, via `.toProvide*((params) => greate(params))` in generated code).
|
Indicates that this parameter should receive runtime-supplied arguments during dependency resolution.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -19,3 +19,6 @@ export 'src/instance.dart';
|
|||||||
export 'src/singleton.dart';
|
export 'src/singleton.dart';
|
||||||
export 'src/named.dart';
|
export 'src/named.dart';
|
||||||
export 'src/params.dart';
|
export 'src/params.dart';
|
||||||
|
export 'src/inject.dart';
|
||||||
|
export 'src/injectable.dart';
|
||||||
|
export 'src/scope.dart';
|
||||||
|
|||||||
34
cherrypick_annotations/lib/src/inject.dart
Normal file
34
cherrypick_annotations/lib/src/inject.dart
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
//
|
||||||
|
// Copyright 2021 Sergey Penkovsky (sergey.penkovsky@gmail.com)
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
|
||||||
|
import 'package:meta/meta.dart';
|
||||||
|
|
||||||
|
/// Annotation for field injection in CherryPick DI framework.
|
||||||
|
/// Apply this to a field, and the code generator will automatically inject
|
||||||
|
/// the appropriate dependency into it.
|
||||||
|
///
|
||||||
|
/// ---
|
||||||
|
///
|
||||||
|
/// Аннотация для внедрения зависимости в поле через фреймворк CherryPick DI.
|
||||||
|
/// Поместите её на поле класса — генератор кода автоматически подставит нужную зависимость.
|
||||||
|
///
|
||||||
|
/// Example / Пример:
|
||||||
|
/// ```dart
|
||||||
|
/// @inject()
|
||||||
|
/// late final SomeService service;
|
||||||
|
/// ```
|
||||||
|
@experimental
|
||||||
|
// ignore: camel_case_types
|
||||||
|
final class inject {
|
||||||
|
const inject();
|
||||||
|
}
|
||||||
38
cherrypick_annotations/lib/src/injectable.dart
Normal file
38
cherrypick_annotations/lib/src/injectable.dart
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
//
|
||||||
|
// Copyright 2021 Sergey Penkovsky (sergey.penkovsky@gmail.com)
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
|
||||||
|
import 'package:meta/meta.dart';
|
||||||
|
|
||||||
|
/// Marks a class as injectable for the CherryPick dependency injection framework.
|
||||||
|
/// If a class is annotated with [@injectable()], the code generator will
|
||||||
|
/// create a mixin to perform automatic injection of fields marked with [@inject].
|
||||||
|
///
|
||||||
|
/// ---
|
||||||
|
///
|
||||||
|
/// Помечает класс как внедряемый для фреймворка внедрения зависимостей CherryPick.
|
||||||
|
/// Если класс помечен аннотацией [@injectable()], генератор создаст миксин
|
||||||
|
/// для автоматического внедрения полей, отмеченных [@inject].
|
||||||
|
///
|
||||||
|
/// Example / Пример:
|
||||||
|
/// ```dart
|
||||||
|
/// @injectable()
|
||||||
|
/// class MyWidget extends StatelessWidget {
|
||||||
|
/// @inject()
|
||||||
|
/// late final MyService service;
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
@experimental
|
||||||
|
// ignore: camel_case_types
|
||||||
|
final class injectable {
|
||||||
|
const injectable();
|
||||||
|
}
|
||||||
37
cherrypick_annotations/lib/src/scope.dart
Normal file
37
cherrypick_annotations/lib/src/scope.dart
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
//
|
||||||
|
// Copyright 2021 Sergey Penkovsky (sergey.penkovsky@gmail.com)
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
|
||||||
|
import 'package:meta/meta.dart';
|
||||||
|
|
||||||
|
/// Annotation to specify a scope for dependency injection in CherryPick.
|
||||||
|
/// Use this on an injected field to indicate from which scope
|
||||||
|
/// the dependency must be resolved.
|
||||||
|
///
|
||||||
|
/// ---
|
||||||
|
///
|
||||||
|
/// Аннотация для указания области внедрения (scope) в CherryPick.
|
||||||
|
/// Используйте её на инъецируемом поле, чтобы определить из какой области
|
||||||
|
/// должна быть получена зависимость.
|
||||||
|
///
|
||||||
|
/// Example / Пример:
|
||||||
|
/// ```dart
|
||||||
|
/// @inject()
|
||||||
|
/// @scope('profile')
|
||||||
|
/// late final ProfileManager profileManager;
|
||||||
|
/// ```
|
||||||
|
@experimental
|
||||||
|
// ignore: camel_case_types
|
||||||
|
final class scope {
|
||||||
|
final String? name;
|
||||||
|
const scope(this.name);
|
||||||
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
name: cherrypick_annotations
|
name: cherrypick_annotations
|
||||||
description: |
|
description: |
|
||||||
Set of annotations for CherryPick dependency injection library. Enables code generation and declarative DI for Dart & Flutter projects.
|
Set of annotations for CherryPick dependency injection library. Enables code generation and declarative DI for Dart & Flutter projects.
|
||||||
version: 1.1.0-dev.0
|
version: 1.1.0-dev.1
|
||||||
documentation: https://github.com/pese-git/cherrypick/wiki
|
documentation: https://github.com/pese-git/cherrypick/wiki
|
||||||
repository: https://github.com/pese-git/cherrypick/cherrypick_annotations
|
repository: https://github.com/pese-git/cherrypick/cherrypick_annotations
|
||||||
issue_tracker: https://github.com/pese-git/cherrypick/issues
|
issue_tracker: https://github.com/pese-git/cherrypick/issues
|
||||||
|
|||||||
@@ -1,3 +1,11 @@
|
|||||||
|
## 1.1.0-dev.4
|
||||||
|
|
||||||
|
- **FIX**: fixed warnings.
|
||||||
|
|
||||||
|
## 1.1.0-dev.3
|
||||||
|
|
||||||
|
- **FEAT**: implement InjectGenerator.
|
||||||
|
|
||||||
## 1.1.0-dev.2
|
## 1.1.0-dev.2
|
||||||
|
|
||||||
- **FIX**: update instance generator code.
|
- **FIX**: update instance generator code.
|
||||||
|
|||||||
@@ -1,54 +1,95 @@
|
|||||||
# Cherrypick Generator
|
# Cherrypick Generator
|
||||||
|
|
||||||
**Cherrypick Generator** is a Dart code generation library for automatic boilerplate creation in dependency injection (DI) modules. It processes classes annotated with `@module()` (from [cherrypick_annotations](https://pub.dev/packages/cherrypick_annotations)) and generates code for registering dependencies, handling singletons, named bindings, runtime parameters, and more.
|
**Cherrypick Generator** is a Dart code generation library for automating dependency injection (DI) boilerplate. It processes classes and fields annotated with [cherrypick_annotations](https://pub.dev/packages/cherrypick_annotations) and generates registration code for services, modules, and field injection for classes marked as `@injectable`. It supports advanced DI features such as scopes, named bindings, parameters, and asynchronous dependencies.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- **Automatic Binding Generation:**
|
- **Automatic Field Injection:**
|
||||||
Generates `bind<Type>()` registration code for every method in a DI module marked with `@module()`.
|
Detects classes annotated with `@injectable()`, and generates mixins to inject all fields annotated with `@inject()`, supporting scope and named qualifiers.
|
||||||
|
|
||||||
- **Support for DI Annotations:**
|
- **Module and Service Registration:**
|
||||||
Understands and processes meta-annotations such as `@singleton`, `@named`, `@instance`, `@provide`, and `@params`.
|
For classes annotated with `@module()`, generates service registration code for methods using annotations such as `@provide`, `@instance`, `@singleton`, `@named`, and `@params`.
|
||||||
|
|
||||||
- **Runtime & Compile-Time Parameters:**
|
- **Scope & Named Qualifier Support:**
|
||||||
Handles both injected (compile-time) and runtime parameters for provider/binding methods.
|
Supports advanced DI features:
|
||||||
|
• Field-level scoping with `@scope('scopename')`
|
||||||
|
• Named dependencies via `@named('value')`
|
||||||
|
|
||||||
- **Synchronous & Asynchronous Support:**
|
- **Synchronous & Asynchronous Support:**
|
||||||
Correctly distinguishes between synchronous and asynchronous bindings (including `Future<T>` return types).
|
Handles both synchronous and asynchronous services (including `Future<T>`) for both field injection and module registration.
|
||||||
|
|
||||||
- **Named Bindings:**
|
- **Parameters and Runtime Arguments:**
|
||||||
Allows registration of named services via the `@named()` annotation.
|
Recognizes and wires both injected dependencies and runtime parameters using `@params`.
|
||||||
|
|
||||||
- **Singletons:**
|
- **Error Handling:**
|
||||||
Registers singletons via the `@singleton` annotation.
|
Validates annotations at generation time. Provides helpful errors for incorrect usage (e.g., using `@injectable` on non-class elements).
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## How It Works
|
## How It Works
|
||||||
|
|
||||||
1. **Annotations**
|
### 1. Annotate your code
|
||||||
Annotate your module classes and methods using `@module()`, `@instance`, `@provide`, `@singleton`, and `@named` as needed.
|
|
||||||
|
|
||||||
2. **Code Scanning**
|
Use annotations from [cherrypick_annotations](https://pub.dev/packages/cherrypick_annotations):
|
||||||
During the build process (with `build_runner`), the generator scans your annotated classes.
|
|
||||||
|
|
||||||
3. **Code Generation**
|
- `@injectable()` — on classes to enable field injection
|
||||||
For each `@module()` class, a new class (with a `$` prefix) is generated.
|
- `@inject()` — on fields to specify they should be injected
|
||||||
This class overrides the `builder(Scope)` method to register all bindings.
|
- `@scope()`, `@named()` — on fields or parameters for advanced wiring
|
||||||
|
- `@module()` — on classes to mark as DI modules
|
||||||
|
- `@provide`, `@instance`, `@singleton`, `@params` — on methods and parameters for module-based DI
|
||||||
|
|
||||||
4. **Binding Logic**
|
### 2. Run the generator
|
||||||
Each binding method's signature and annotations are analyzed. Registration code is generated according to:
|
|
||||||
- Return type (sync/async)
|
Use `build_runner` to process your code and generate `.module.cherrypick.g.dart` and `.inject.cherrypick.g.dart` files.
|
||||||
- Annotations (`@singleton`, `@named`, etc.)
|
|
||||||
- Parameter list (DI dependencies, `@named`, or `@params` for runtime values)
|
### 3. Use the output in your application
|
||||||
|
|
||||||
|
- For modules: Register DI providers using the generated `$YourModule` class.
|
||||||
|
- For services: Enable field injection on classes using the generated mixin.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Example
|
## Field Injection Example
|
||||||
|
|
||||||
Given the following annotated Dart code:
|
Given the following:
|
||||||
|
|
||||||
|
```dart
|
||||||
|
import 'package:cherrypick_annotations/cherrypick_annotations.dart';
|
||||||
|
|
||||||
|
@injectable()
|
||||||
|
class MyWidget with _$MyWidget {
|
||||||
|
@inject()
|
||||||
|
late final AuthService auth;
|
||||||
|
|
||||||
|
@inject()
|
||||||
|
@scope('profile')
|
||||||
|
late final ProfileManager manager;
|
||||||
|
|
||||||
|
@inject()
|
||||||
|
@named('special')
|
||||||
|
late final ApiClient specialApi;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**The generator will output (simplified):**
|
||||||
|
```dart
|
||||||
|
mixin _$MyWidget {
|
||||||
|
void _inject(MyWidget instance) {
|
||||||
|
instance.auth = CherryPick.openRootScope().resolve<AuthService>();
|
||||||
|
instance.manager = CherryPick.openScope(scopeName: 'profile').resolve<ProfileManager>();
|
||||||
|
instance.specialApi = CherryPick.openRootScope().resolve<ApiClient>(named: 'special');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
You can then mix this into your widget to enable automatic DI at runtime.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Module Registration Example
|
||||||
|
|
||||||
|
Given:
|
||||||
|
|
||||||
```dart
|
```dart
|
||||||
import 'package:cherrypick_annotations/cherrypick_annotations.dart';
|
import 'package:cherrypick_annotations/cherrypick_annotations.dart';
|
||||||
@@ -57,98 +98,92 @@ import 'package:cherrypick_annotations/cherrypick_annotations.dart';
|
|||||||
class MyModule {
|
class MyModule {
|
||||||
@singleton
|
@singleton
|
||||||
@instance
|
@instance
|
||||||
SomeService provideService(ApiClient client);
|
AuthService provideAuth(Api api);
|
||||||
|
|
||||||
@provide
|
@provide
|
||||||
@named('special')
|
@named('logging')
|
||||||
Future<Handler> createHandler(@params Map<String, dynamic> params);
|
Future<Logger> provideLogger(@params Map<String, dynamic> args);
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
The generator will output (simplified):
|
**The generator will output (simplified):**
|
||||||
|
|
||||||
```dart
|
```dart
|
||||||
final class $MyModule extends MyModule {
|
final class $MyModule extends MyModule {
|
||||||
@override
|
@override
|
||||||
void builder(Scope currentScope) {
|
void builder(Scope currentScope) {
|
||||||
bind<SomeService>()
|
bind<AuthService>()
|
||||||
.toInstance(provideService(currentScope.resolve<ApiClient>()))
|
.toInstance(provideAuth(currentScope.resolve<Api>()))
|
||||||
.singleton();
|
.singleton();
|
||||||
|
|
||||||
bind<Handler>()
|
bind<Logger>()
|
||||||
.toProvideAsyncWithParams((args) => createHandler(args))
|
.toProvideAsyncWithParams((args) => provideLogger(args))
|
||||||
.withName('special');
|
.withName('logging');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Generated Code Overview
|
## Key Points
|
||||||
|
|
||||||
- **Constructor Registration:**
|
- **Rich Annotation Support:**
|
||||||
All non-abstract methods are considered as providers and processed for DI registration.
|
Mix and match field, parameter, and method annotations for maximum flexibility.
|
||||||
|
- **Scope and Named Resolution:**
|
||||||
- **Parameter Handling:**
|
Use `@scope('...')` and `@named('...')` to precisely control where and how dependencies are wired.
|
||||||
Each method parameter is analyzed:
|
- **Async/Synchronous:**
|
||||||
- Standard DI dependency: resolved via `currentScope.resolve<Type>()`.
|
The generator distinguishes between sync (`resolve<T>`) and async (`resolveAsync<T>`) dependencies.
|
||||||
- Named dependency: resolved via `currentScope.resolve<Type>(named: 'name')`.
|
- **Automatic Mixins:**
|
||||||
- Runtime parameter (`@params`): passed through as-is (e.g., `args`).
|
For classes with `@injectable()`, a mixin is generated that injects all relevant fields (using constructor or setter).
|
||||||
|
- **Comprehensive Error Checking:**
|
||||||
- **Binding Types:**
|
Misapplied annotations (e.g., `@injectable()` on non-class) produce clear build-time errors.
|
||||||
Supports both `.toInstance()` and `.toProvide()` (including async variants).
|
|
||||||
|
|
||||||
- **Singleton/Named:**
|
|
||||||
Appends `.singleton()` and/or `.withName('name')` as appropriate.
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
1. **Add dependencies**
|
1. **Add dependencies**
|
||||||
In your `pubspec.yaml`:
|
|
||||||
```yaml
|
```yaml
|
||||||
dependencies:
|
dependencies:
|
||||||
cherrypick_annotations: ^x.y.z
|
cherrypick_annotations: ^latest
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
|
cherrypick_generator: ^latest
|
||||||
build_runner: ^2.1.0
|
build_runner: ^2.1.0
|
||||||
cherrypick_generator: ^x.y.z
|
|
||||||
```
|
```
|
||||||
|
|
||||||
2. **Apply annotations**
|
2. **Annotate your classes and modules as above**
|
||||||
Annotate your DI modules and provider methods as shown above.
|
|
||||||
|
|
||||||
3. **Run the generator**
|
3. **Run the generator**
|
||||||
```
|
|
||||||
|
```shell
|
||||||
dart run build_runner build
|
dart run build_runner build
|
||||||
# or with Flutter:
|
# or, if using Flutter:
|
||||||
flutter pub run build_runner build
|
flutter pub run build_runner build
|
||||||
```
|
```
|
||||||
|
|
||||||
4. **Import and use the generated code**
|
4. **Use generated code**
|
||||||
The generated files (suffix `.cherrypick.g.dart`) contain your `$YourModule` classes ready for use with your DI framework.
|
|
||||||
|
- Import the generated `.inject.cherrypick.g.dart` or `.cherrypick.g.dart` files where needed
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Advanced
|
## Advanced Usage
|
||||||
|
|
||||||
- **Customizing Parameter Names:**
|
|
||||||
Use the `@named('value')` annotation on methods and parameters for named bindings.
|
|
||||||
|
|
||||||
- **Runtime Arguments:**
|
|
||||||
Use `@params` to designate parameters as runtime arguments that are supplied at injection time.
|
|
||||||
|
|
||||||
|
- **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:**
|
||||||
|
Use `@named` on both provider and parameter for named registration and lookup; use `@params` to pass runtime arguments.
|
||||||
- **Async Factories:**
|
- **Async Factories:**
|
||||||
Methods returning `Future<T>` generate the appropriate `.toProvideAsync()` or `.toInstanceAsync()` bindings.
|
Methods returning Future<T> generate async bindings and async field resolution logic.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Developer Notes
|
## Developer Notes
|
||||||
|
|
||||||
- The generator relies on Dart's analyzer, source_gen, and build packages.
|
- The generator relies on the Dart analyzer, `source_gen`, and `build` packages.
|
||||||
- Each class and method is parsed for annotations; missing required annotations (like `@instance` or `@provide`) will result in a generation error.
|
- All classes and methods are parsed for annotations.
|
||||||
- The generated code is designed to extend your original module classes while injecting all binding logic.
|
- Improper annotation usage will result in generator errors.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -162,6 +197,7 @@ Licensed under the Apache License, Version 2.0
|
|||||||
|
|
||||||
## Contribution
|
## Contribution
|
||||||
|
|
||||||
Pull requests and issues are welcome! Please open git issues or submit improvements as needed.
|
Pull requests and issues are welcome! Please open GitHub issues or submit improvements.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
---
|
|
||||||
@@ -28,3 +28,7 @@ include: package:lints/recommended.yaml
|
|||||||
|
|
||||||
# For additional information about configuring this file, see
|
# For additional information about configuring this file, see
|
||||||
# https://dart.dev/guides/language/analysis-options
|
# https://dart.dev/guides/language/analysis-options
|
||||||
|
|
||||||
|
analyzer:
|
||||||
|
errors:
|
||||||
|
deprecated_member_use: ignore
|
||||||
@@ -7,10 +7,21 @@ builders:
|
|||||||
required_inputs: ["lib/**"]
|
required_inputs: ["lib/**"]
|
||||||
runs_before: []
|
runs_before: []
|
||||||
build_to: source
|
build_to: source
|
||||||
|
inject_generator:
|
||||||
|
import: "package:cherrypick_generator/inject_generator.dart"
|
||||||
|
builder_factories: ["injectBuilder"]
|
||||||
|
build_extensions: {".dart": [".cherrypick.g.dart"]}
|
||||||
|
auto_apply: dependents
|
||||||
|
required_inputs: ["lib/**"]
|
||||||
|
runs_before: []
|
||||||
|
build_to: source
|
||||||
|
|
||||||
targets:
|
targets:
|
||||||
$default:
|
$default:
|
||||||
builders:
|
builders:
|
||||||
cherrypick_generator|module_generator:
|
cherrypick_generator|module_generator:
|
||||||
|
generate_for:
|
||||||
|
- lib/**.dart
|
||||||
|
cherrypick_generator|inject_generator:
|
||||||
generate_for:
|
generate_for:
|
||||||
- lib/**.dart
|
- lib/**.dart
|
||||||
@@ -14,3 +14,4 @@ library;
|
|||||||
//
|
//
|
||||||
|
|
||||||
export 'module_generator.dart';
|
export 'module_generator.dart';
|
||||||
|
export 'inject_generator.dart';
|
||||||
|
|||||||
186
cherrypick_generator/lib/inject_generator.dart
Normal file
186
cherrypick_generator/lib/inject_generator.dart
Normal file
@@ -0,0 +1,186 @@
|
|||||||
|
//
|
||||||
|
// Copyright 2021 Sergey Penkovsky (sergey.penkovsky@gmail.com)
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
|
||||||
|
import 'dart:async';
|
||||||
|
import 'package:analyzer/dart/constant/value.dart';
|
||||||
|
import 'package:analyzer/dart/element/type.dart';
|
||||||
|
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;
|
||||||
|
|
||||||
|
/// InjectGenerator generates a mixin for a class marked with @injectable()
|
||||||
|
/// and injects all fields annotated with @inject(), using CherryPick DI.
|
||||||
|
///
|
||||||
|
/// For Future<T> fields it calls .resolveAsync<T>(),
|
||||||
|
/// otherwise .resolve<T>() is used. Scope and named qualifiers are supported.
|
||||||
|
///
|
||||||
|
/// ---
|
||||||
|
///
|
||||||
|
/// InjectGenerator генерирует миксин для класса с аннотацией @injectable()
|
||||||
|
/// и внедряет все поля, помеченные @inject(), используя DI-фреймворк CherryPick.
|
||||||
|
///
|
||||||
|
/// Для Future<T> полей вызывается .resolveAsync<T>(),
|
||||||
|
/// для остальных — .resolve<T>(). Поддерживаются scope и named qualifier.
|
||||||
|
///
|
||||||
|
class InjectGenerator extends GeneratorForAnnotation<ann.injectable> {
|
||||||
|
const InjectGenerator();
|
||||||
|
|
||||||
|
/// The main entry point for code generation.
|
||||||
|
///
|
||||||
|
/// Checks class validity, collects injectable fields, and produces injection code.
|
||||||
|
///
|
||||||
|
/// Основная точка входа генератора. Проверяет класс, собирает инъектируемые поля и создает код внедрения зависимостей.
|
||||||
|
@override
|
||||||
|
FutureOr<String> generateForAnnotatedElement(
|
||||||
|
Element element,
|
||||||
|
ConstantReader annotation,
|
||||||
|
BuildStep buildStep,
|
||||||
|
) {
|
||||||
|
if (element is! ClassElement) {
|
||||||
|
throw InvalidGenerationSourceError(
|
||||||
|
'@injectable() can only be applied to classes.',
|
||||||
|
element: element,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
final classElement = element;
|
||||||
|
final className = classElement.name;
|
||||||
|
final mixinName = '_\$$className';
|
||||||
|
|
||||||
|
final buffer = StringBuffer()
|
||||||
|
..writeln('mixin $mixinName {')
|
||||||
|
..writeln(' void _inject($className instance) {');
|
||||||
|
|
||||||
|
// Collect and process all @inject fields.
|
||||||
|
// Собираем и обрабатываем все поля с @inject.
|
||||||
|
final injectFields =
|
||||||
|
classElement.fields.where(_isInjectField).map(_parseInjectField);
|
||||||
|
|
||||||
|
for (final parsedField in injectFields) {
|
||||||
|
buffer.writeln(_generateInjectionLine(parsedField));
|
||||||
|
}
|
||||||
|
|
||||||
|
buffer
|
||||||
|
..writeln(' }')
|
||||||
|
..writeln('}');
|
||||||
|
|
||||||
|
return buffer.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Checks if a field has the @inject annotation.
|
||||||
|
///
|
||||||
|
/// Проверяет, отмечено ли поле аннотацией @inject.
|
||||||
|
static bool _isInjectField(FieldElement field) {
|
||||||
|
return field.metadata.any(
|
||||||
|
(m) => m.computeConstantValue()?.type?.getDisplayString() == 'inject',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Parses the field for scope/named qualifiers and determines its type.
|
||||||
|
/// Returns a [_ParsedInjectField] describing injection information.
|
||||||
|
///
|
||||||
|
/// Разбирает поле на наличие модификаторов scope/named и выясняет его тип.
|
||||||
|
/// Возвращает [_ParsedInjectField] с информацией о внедрении.
|
||||||
|
static _ParsedInjectField _parseInjectField(FieldElement field) {
|
||||||
|
String? scopeName;
|
||||||
|
String? namedValue;
|
||||||
|
|
||||||
|
for (final meta in field.metadata) {
|
||||||
|
final DartObject? obj = meta.computeConstantValue();
|
||||||
|
final type = obj?.type?.getDisplayString();
|
||||||
|
if (type == 'scope') {
|
||||||
|
scopeName = obj?.getField('name')?.toStringValue();
|
||||||
|
} else if (type == 'named') {
|
||||||
|
namedValue = obj?.getField('value')?.toStringValue();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
final DartType dartType = field.type;
|
||||||
|
String coreTypeName;
|
||||||
|
bool isFuture;
|
||||||
|
|
||||||
|
if (dartType.isDartAsyncFuture) {
|
||||||
|
final ParameterizedType paramType = dartType as ParameterizedType;
|
||||||
|
coreTypeName = paramType.typeArguments.first.getDisplayString();
|
||||||
|
isFuture = true;
|
||||||
|
} else {
|
||||||
|
coreTypeName = dartType.getDisplayString();
|
||||||
|
isFuture = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return _ParsedInjectField(
|
||||||
|
fieldName: field.name,
|
||||||
|
coreType: coreTypeName,
|
||||||
|
isFuture: isFuture,
|
||||||
|
scopeName: scopeName,
|
||||||
|
namedValue: namedValue,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Generates a line of code that performs the dependency injection for a field.
|
||||||
|
/// Handles resolve/resolveAsync, scoping, and named qualifiers.
|
||||||
|
///
|
||||||
|
/// Генерирует строку кода, которая внедряет зависимость для поля.
|
||||||
|
/// Учитывает resolve/resolveAsync, scoping и named qualifier.
|
||||||
|
String _generateInjectionLine(_ParsedInjectField field) {
|
||||||
|
final methodName = field.isFuture
|
||||||
|
? 'resolveAsync<${field.coreType}>'
|
||||||
|
: 'resolve<${field.coreType}>';
|
||||||
|
final openCall = (field.scopeName != null && field.scopeName!.isNotEmpty)
|
||||||
|
? "CherryPick.openScope(scopeName: '${field.scopeName}')"
|
||||||
|
: "CherryPick.openRootScope()";
|
||||||
|
final params = (field.namedValue != null && field.namedValue!.isNotEmpty)
|
||||||
|
? "(named: '${field.namedValue}')"
|
||||||
|
: '()';
|
||||||
|
|
||||||
|
return " instance.${field.fieldName} = $openCall.$methodName$params;";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Data structure representing all information required to generate
|
||||||
|
/// injection code for a field.
|
||||||
|
///
|
||||||
|
/// Структура данных, содержащая всю информацию,
|
||||||
|
/// необходимую для генерации кода внедрения для поля.
|
||||||
|
class _ParsedInjectField {
|
||||||
|
/// The name of the field / Имя поля.
|
||||||
|
final String fieldName;
|
||||||
|
|
||||||
|
/// The base type name (T or Future<T>) / Базовый тип (T или тип из Future<T>).
|
||||||
|
final String coreType;
|
||||||
|
|
||||||
|
/// True if the field type is Future<T>; false otherwise
|
||||||
|
/// Истина, если поле — Future<T>, иначе — ложь.
|
||||||
|
final bool isFuture;
|
||||||
|
|
||||||
|
/// Optional scope annotation argument / Опциональное имя scope.
|
||||||
|
final String? scopeName;
|
||||||
|
|
||||||
|
/// Optional named annotation argument / Опциональное имя named.
|
||||||
|
final String? namedValue;
|
||||||
|
|
||||||
|
_ParsedInjectField({
|
||||||
|
required this.fieldName,
|
||||||
|
required this.coreType,
|
||||||
|
required this.isFuture,
|
||||||
|
this.scopeName,
|
||||||
|
this.namedValue,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Builder factory. Used by build_runner.
|
||||||
|
///
|
||||||
|
/// Фабрика билдера. Используется build_runner.
|
||||||
|
Builder injectBuilder(BuilderOptions options) =>
|
||||||
|
PartBuilder([InjectGenerator()], '.inject.cherrypick.g.dart');
|
||||||
@@ -90,4 +90,4 @@ class ModuleGenerator extends GeneratorForAnnotation<ann.module> {
|
|||||||
/// файлов, где встречается @module().
|
/// файлов, где встречается @module().
|
||||||
/// ---------------------------------------------------------------------------
|
/// ---------------------------------------------------------------------------
|
||||||
Builder moduleBuilder(BuilderOptions options) =>
|
Builder moduleBuilder(BuilderOptions options) =>
|
||||||
PartBuilder([ModuleGenerator()], '.cherrypick.g.dart');
|
PartBuilder([ModuleGenerator()], '.module.cherrypick.g.dart');
|
||||||
|
|||||||
@@ -131,7 +131,6 @@ class BindSpec {
|
|||||||
// ? '.toInstanceAsync(($fnArgs) => $methodName($fnArgs))'
|
// ? '.toInstanceAsync(($fnArgs) => $methodName($fnArgs))'
|
||||||
// : '.toInstance(($fnArgs) => $methodName($fnArgs))';
|
// : '.toInstance(($fnArgs) => $methodName($fnArgs))';
|
||||||
case BindingType.provide:
|
case BindingType.provide:
|
||||||
default:
|
|
||||||
if (isAsyncProvide) {
|
if (isAsyncProvide) {
|
||||||
return multiLine
|
return multiLine
|
||||||
? '.toProvideAsyncWithParams(\n${' ' * (indent + 2)}($paramVar) => $methodName($fnArgs))'
|
? '.toProvideAsyncWithParams(\n${' ' * (indent + 2)}($paramVar) => $methodName($fnArgs))'
|
||||||
@@ -154,7 +153,6 @@ class BindSpec {
|
|||||||
? '.toInstanceAsync($methodName($argsStr))'
|
? '.toInstanceAsync($methodName($argsStr))'
|
||||||
: '.toInstance($methodName($argsStr))';
|
: '.toInstance($methodName($argsStr))';
|
||||||
case BindingType.provide:
|
case BindingType.provide:
|
||||||
default:
|
|
||||||
if (isAsyncProvide) {
|
if (isAsyncProvide) {
|
||||||
return multiLine
|
return multiLine
|
||||||
? '.toProvideAsync(\n${' ' * (indent + 2)}() => $methodName($argsStr))'
|
? '.toProvideAsync(\n${' ' * (indent + 2)}() => $methodName($argsStr))'
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ name: cherrypick_generator
|
|||||||
description: |
|
description: |
|
||||||
Source code generator for the cherrypick dependency injection system. Processes annotations to generate binding and module code for Dart & Flutter projects.
|
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.2
|
version: 1.1.0-dev.4
|
||||||
documentation: https://github.com/pese-git/cherrypick/wiki
|
documentation: https://github.com/pese-git/cherrypick/wiki
|
||||||
repository: https://github.com/pese-git/cherrypick/cherrypick_generator
|
repository: https://github.com/pese-git/cherrypick/cherrypick_generator
|
||||||
issue_tracker: https://github.com/pese-git/cherrypick/issues
|
issue_tracker: https://github.com/pese-git/cherrypick/issues
|
||||||
@@ -12,12 +12,13 @@ environment:
|
|||||||
|
|
||||||
# Add regular dependencies here.
|
# Add regular dependencies here.
|
||||||
dependencies:
|
dependencies:
|
||||||
cherrypick_annotations: ^1.1.0-dev.0
|
cherrypick_annotations: ^1.1.0-dev.1
|
||||||
analyzer: ^6.7.0
|
analyzer: ^7.0.0
|
||||||
dart_style: ^2.3.7
|
dart_style: ^3.0.1
|
||||||
build: ^2.4.1
|
build: ^2.4.1
|
||||||
build_runner: ^2.4.13
|
build_runner: ^2.4.15
|
||||||
source_gen: ^1.5.0
|
source_gen: ^2.0.0
|
||||||
|
collection: ^1.18.0
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
lints: ^5.0.0
|
lints: ^5.0.0
|
||||||
|
|||||||
@@ -5,23 +5,18 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: _fe_analyzer_shared
|
name: _fe_analyzer_shared
|
||||||
sha256: f256b0c0ba6c7577c15e2e4e114755640a875e885099367bf6e012b19314c834
|
sha256: e55636ed79578b9abca5fecf9437947798f5ef7456308b5cb85720b793eac92f
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "72.0.0"
|
version: "82.0.0"
|
||||||
_macros:
|
|
||||||
dependency: transitive
|
|
||||||
description: dart
|
|
||||||
source: sdk
|
|
||||||
version: "0.3.2"
|
|
||||||
analyzer:
|
analyzer:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: analyzer
|
name: analyzer
|
||||||
sha256: b652861553cd3990d8ed361f7979dc6d7053a9ac8843fa73820ab68ce5410139
|
sha256: "904ae5bb474d32c38fb9482e2d925d5454cda04ddd0e55d2e6826bc72f6ba8c0"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "6.7.0"
|
version: "7.4.5"
|
||||||
args:
|
args:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -34,26 +29,26 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: async
|
name: async
|
||||||
sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
|
sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.11.0"
|
version: "2.12.0"
|
||||||
boolean_selector:
|
boolean_selector:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: boolean_selector
|
name: boolean_selector
|
||||||
sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
|
sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.1"
|
version: "2.1.2"
|
||||||
build:
|
build:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: build
|
name: build
|
||||||
sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0"
|
sha256: cef23f1eda9b57566c81e2133d196f8e3df48f244b317368d65c5943d91148f0
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.4.1"
|
version: "2.4.2"
|
||||||
build_config:
|
build_config:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -74,26 +69,26 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: build_resolvers
|
name: build_resolvers
|
||||||
sha256: "339086358431fa15d7eca8b6a36e5d783728cf025e559b834f4609a1fcfb7b0a"
|
sha256: b9e4fda21d846e192628e7a4f6deda6888c36b5b69ba02ff291a01fd529140f0
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.4.2"
|
version: "2.4.4"
|
||||||
build_runner:
|
build_runner:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
name: build_runner
|
name: build_runner
|
||||||
sha256: "028819cfb90051c6b5440c7e574d1896f8037e3c96cf17aaeb054c9311cfbf4d"
|
sha256: "058fe9dce1de7d69c4b84fada934df3e0153dd000758c4d65964d0166779aa99"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.4.13"
|
version: "2.4.15"
|
||||||
build_runner_core:
|
build_runner_core:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: build_runner_core
|
name: build_runner_core
|
||||||
sha256: f8126682b87a7282a339b871298cc12009cb67109cfa1614d6436fb0289193e0
|
sha256: "22e3aa1c80e0ada3722fe5b63fd43d9c8990759d0a2cf489c8c5d7b2bdebc021"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "7.3.2"
|
version: "8.0.0"
|
||||||
built_collection:
|
built_collection:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -114,10 +109,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: characters
|
name: characters
|
||||||
sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
|
sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.0"
|
version: "1.4.0"
|
||||||
checked_yaml:
|
checked_yaml:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -139,7 +134,7 @@ packages:
|
|||||||
path: "../../cherrypick_annotations"
|
path: "../../cherrypick_annotations"
|
||||||
relative: true
|
relative: true
|
||||||
source: path
|
source: path
|
||||||
version: "1.1.0-dev.0"
|
version: "1.1.0-dev.1"
|
||||||
cherrypick_flutter:
|
cherrypick_flutter:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@@ -153,15 +148,15 @@ packages:
|
|||||||
path: "../../cherrypick_generator"
|
path: "../../cherrypick_generator"
|
||||||
relative: true
|
relative: true
|
||||||
source: path
|
source: path
|
||||||
version: "1.1.0-dev.1"
|
version: "1.1.0-dev.3"
|
||||||
clock:
|
clock:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: clock
|
name: clock
|
||||||
sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
|
sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.1"
|
version: "1.1.2"
|
||||||
code_builder:
|
code_builder:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -174,10 +169,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: collection
|
name: collection
|
||||||
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
|
sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.18.0"
|
version: "1.19.1"
|
||||||
convert:
|
convert:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -206,18 +201,18 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: dart_style
|
name: dart_style
|
||||||
sha256: "7856d364b589d1f08986e140938578ed36ed948581fbc3bc9aef1805039ac5ab"
|
sha256: "27eb0ae77836989a3bc541ce55595e8ceee0992807f14511552a898ddd0d88ac"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.3.7"
|
version: "3.0.1"
|
||||||
fake_async:
|
fake_async:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: fake_async
|
name: fake_async
|
||||||
sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
|
sha256: "6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.1"
|
version: "1.3.2"
|
||||||
file:
|
file:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -276,6 +271,14 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.3.2"
|
version: "2.3.2"
|
||||||
|
http:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: http
|
||||||
|
sha256: "2c11f3f94c687ee9bad77c171151672986360b2b001d109814ee7140b2cf261b"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.4.0"
|
||||||
http_multi_server:
|
http_multi_server:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -320,18 +323,18 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: leak_tracker
|
name: leak_tracker
|
||||||
sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05"
|
sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "10.0.5"
|
version: "10.0.8"
|
||||||
leak_tracker_flutter_testing:
|
leak_tracker_flutter_testing:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: leak_tracker_flutter_testing
|
name: leak_tracker_flutter_testing
|
||||||
sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806"
|
sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.5"
|
version: "3.0.9"
|
||||||
leak_tracker_testing:
|
leak_tracker_testing:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -356,22 +359,14 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.0"
|
version: "1.3.0"
|
||||||
macros:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: macros
|
|
||||||
sha256: "0acaed5d6b7eab89f63350bccd82119e6c602df0f391260d0e32b5e23db79536"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "0.1.2-main.4"
|
|
||||||
matcher:
|
matcher:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: matcher
|
name: matcher
|
||||||
sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
|
sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.12.16+1"
|
version: "0.12.17"
|
||||||
material_color_utilities:
|
material_color_utilities:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -384,10 +379,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: meta
|
name: meta
|
||||||
sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
|
sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.15.0"
|
version: "1.16.0"
|
||||||
mime:
|
mime:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -408,10 +403,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: path
|
name: path
|
||||||
sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
|
sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.9.0"
|
version: "1.9.1"
|
||||||
pool:
|
pool:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -456,39 +451,39 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description: flutter
|
description: flutter
|
||||||
source: sdk
|
source: sdk
|
||||||
version: "0.0.99"
|
version: "0.0.0"
|
||||||
source_gen:
|
source_gen:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: source_gen
|
name: source_gen
|
||||||
sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832"
|
sha256: "35c8150ece9e8c8d263337a265153c3329667640850b9304861faea59fc98f6b"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.5.0"
|
version: "2.0.0"
|
||||||
source_span:
|
source_span:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: source_span
|
name: source_span
|
||||||
sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
|
sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.10.0"
|
version: "1.10.1"
|
||||||
stack_trace:
|
stack_trace:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: stack_trace
|
name: stack_trace
|
||||||
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
|
sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.11.1"
|
version: "1.12.1"
|
||||||
stream_channel:
|
stream_channel:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: stream_channel
|
name: stream_channel
|
||||||
sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
|
sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.2"
|
version: "2.1.4"
|
||||||
stream_transform:
|
stream_transform:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -501,26 +496,26 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: string_scanner
|
name: string_scanner
|
||||||
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
|
sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0"
|
version: "1.4.1"
|
||||||
term_glyph:
|
term_glyph:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: term_glyph
|
name: term_glyph
|
||||||
sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
|
sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.1"
|
version: "1.2.2"
|
||||||
test_api:
|
test_api:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: test_api
|
name: test_api
|
||||||
sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb"
|
sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.7.2"
|
version: "0.7.4"
|
||||||
timing:
|
timing:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -549,10 +544,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: vm_service
|
name: vm_service
|
||||||
sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d"
|
sha256: "0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "14.2.5"
|
version: "14.3.1"
|
||||||
watcher:
|
watcher:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -594,5 +589,5 @@ packages:
|
|||||||
source: hosted
|
source: hosted
|
||||||
version: "3.1.3"
|
version: "3.1.3"
|
||||||
sdks:
|
sdks:
|
||||||
dart: ">=3.5.2 <4.0.0"
|
dart: ">=3.7.0-0 <4.0.0"
|
||||||
flutter: ">=3.18.0-18.0.pre.54"
|
flutter: ">=3.18.0-18.0.pre.54"
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ dependencies:
|
|||||||
cherrypick: ^2.2.0-dev.1
|
cherrypick: ^2.2.0-dev.1
|
||||||
cherrypick_flutter: ^1.1.2-dev.1
|
cherrypick_flutter: ^1.1.2-dev.1
|
||||||
|
|
||||||
cherrypick_annotations: ^1.1.0-dev.0
|
cherrypick_annotations: ^1.1.0-dev.1
|
||||||
|
|
||||||
cupertino_icons: ^1.0.8
|
cupertino_icons: ^1.0.8
|
||||||
|
|
||||||
@@ -24,8 +24,8 @@ dev_dependencies:
|
|||||||
|
|
||||||
flutter_lints: ^5.0.0
|
flutter_lints: ^5.0.0
|
||||||
|
|
||||||
cherrypick_generator: ^1.1.0-dev.2
|
cherrypick_generator: ^1.1.0-dev.4
|
||||||
build_runner: ^2.4.13
|
build_runner: ^2.4.15
|
||||||
|
|
||||||
# For information on the generic Dart part of this file, see the
|
# For information on the generic Dart part of this file, see the
|
||||||
# following page: https://dart.dev/tools/pub/pubspec
|
# following page: https://dart.dev/tools/pub/pubspec
|
||||||
|
|||||||
35
examples/postly/lib/app.dart
Normal file
35
examples/postly/lib/app.dart
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
import 'package:cherrypick/cherrypick.dart';
|
||||||
|
import 'package:cherrypick_annotations/cherrypick_annotations.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
|
|
||||||
|
import 'domain/repository/post_repository.dart';
|
||||||
|
import 'presentation/bloc/post_bloc.dart';
|
||||||
|
import 'router/app_router.dart';
|
||||||
|
|
||||||
|
part 'app.inject.cherrypick.g.dart';
|
||||||
|
|
||||||
|
@injectable()
|
||||||
|
class MyApp extends StatelessWidget with _$MyApp {
|
||||||
|
final _appRouter = AppRouter();
|
||||||
|
|
||||||
|
@named('repo')
|
||||||
|
@inject()
|
||||||
|
late final PostRepository repository;
|
||||||
|
|
||||||
|
MyApp({super.key}) {
|
||||||
|
_inject(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return BlocProvider(
|
||||||
|
create: (_) => PostBloc(repository),
|
||||||
|
child: MaterialApp.router(
|
||||||
|
routeInformationParser: _appRouter.defaultRouteParser(),
|
||||||
|
routerDelegate: _appRouter.delegate(),
|
||||||
|
theme: ThemeData.light(),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -5,7 +5,7 @@ import '../data/network/json_placeholder_api.dart';
|
|||||||
import '../data/post_repository_impl.dart';
|
import '../data/post_repository_impl.dart';
|
||||||
import '../domain/repository/post_repository.dart';
|
import '../domain/repository/post_repository.dart';
|
||||||
|
|
||||||
part 'app_module.cherrypick.g.dart';
|
part 'app_module.module.cherrypick.g.dart';
|
||||||
|
|
||||||
@module()
|
@module()
|
||||||
abstract class AppModule extends Module {
|
abstract class AppModule extends Module {
|
||||||
|
|||||||
@@ -1,36 +1,9 @@
|
|||||||
import 'package:cherrypick/cherrypick.dart';
|
import 'package:cherrypick/cherrypick.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:postly/app.dart';
|
||||||
import 'di/app_module.dart';
|
import 'di/app_module.dart';
|
||||||
import 'domain/repository/post_repository.dart';
|
|
||||||
import 'presentation/bloc/post_bloc.dart';
|
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
|
||||||
import 'router/app_router.dart';
|
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
final scope = CherryPick.openRootScope();
|
CherryPick.openRootScope().installModules([$AppModule()]);
|
||||||
scope.installModules([$AppModule()]);
|
runApp(MyApp());
|
||||||
|
|
||||||
runApp(MyApp(scope: scope));
|
|
||||||
}
|
|
||||||
|
|
||||||
class MyApp extends StatelessWidget {
|
|
||||||
final Scope scope;
|
|
||||||
final _appRouter = AppRouter();
|
|
||||||
|
|
||||||
MyApp({super.key, required this.scope});
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
// Получаем репозиторий через injector
|
|
||||||
final repository = scope.resolve<PostRepository>(named: 'repo');
|
|
||||||
|
|
||||||
return BlocProvider(
|
|
||||||
create: (_) => PostBloc(repository),
|
|
||||||
child: MaterialApp.router(
|
|
||||||
routeInformationParser: _appRouter.defaultRouteParser(),
|
|
||||||
routerDelegate: _appRouter.delegate(),
|
|
||||||
theme: ThemeData.light(),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,23 +5,18 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: _fe_analyzer_shared
|
name: _fe_analyzer_shared
|
||||||
sha256: f256b0c0ba6c7577c15e2e4e114755640a875e885099367bf6e012b19314c834
|
sha256: e55636ed79578b9abca5fecf9437947798f5ef7456308b5cb85720b793eac92f
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "72.0.0"
|
version: "82.0.0"
|
||||||
_macros:
|
|
||||||
dependency: transitive
|
|
||||||
description: dart
|
|
||||||
source: sdk
|
|
||||||
version: "0.3.2"
|
|
||||||
analyzer:
|
analyzer:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: analyzer
|
name: analyzer
|
||||||
sha256: b652861553cd3990d8ed361f7979dc6d7053a9ac8843fa73820ab68ce5410139
|
sha256: "904ae5bb474d32c38fb9482e2d925d5454cda04ddd0e55d2e6826bc72f6ba8c0"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "6.7.0"
|
version: "7.4.5"
|
||||||
args:
|
args:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -34,10 +29,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: async
|
name: async
|
||||||
sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
|
sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.11.0"
|
version: "2.12.0"
|
||||||
auto_route:
|
auto_route:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@@ -50,10 +45,10 @@ packages:
|
|||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
name: auto_route_generator
|
name: auto_route_generator
|
||||||
sha256: c9086eb07271e51b44071ad5cff34e889f3156710b964a308c2ab590769e79e6
|
sha256: c2e359d8932986d4d1bcad7a428143f81384ce10fef8d4aa5bc29e1f83766a46
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "9.0.0"
|
version: "9.3.1"
|
||||||
bloc:
|
bloc:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -66,18 +61,18 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: boolean_selector
|
name: boolean_selector
|
||||||
sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
|
sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.1"
|
version: "2.1.2"
|
||||||
build:
|
build:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: build
|
name: build
|
||||||
sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0"
|
sha256: cef23f1eda9b57566c81e2133d196f8e3df48f244b317368d65c5943d91148f0
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.4.1"
|
version: "2.4.2"
|
||||||
build_config:
|
build_config:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -98,26 +93,26 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: build_resolvers
|
name: build_resolvers
|
||||||
sha256: "339086358431fa15d7eca8b6a36e5d783728cf025e559b834f4609a1fcfb7b0a"
|
sha256: b9e4fda21d846e192628e7a4f6deda6888c36b5b69ba02ff291a01fd529140f0
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.4.2"
|
version: "2.4.4"
|
||||||
build_runner:
|
build_runner:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
name: build_runner
|
name: build_runner
|
||||||
sha256: "028819cfb90051c6b5440c7e574d1896f8037e3c96cf17aaeb054c9311cfbf4d"
|
sha256: "058fe9dce1de7d69c4b84fada934df3e0153dd000758c4d65964d0166779aa99"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.4.13"
|
version: "2.4.15"
|
||||||
build_runner_core:
|
build_runner_core:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: build_runner_core
|
name: build_runner_core
|
||||||
sha256: f8126682b87a7282a339b871298cc12009cb67109cfa1614d6436fb0289193e0
|
sha256: "22e3aa1c80e0ada3722fe5b63fd43d9c8990759d0a2cf489c8c5d7b2bdebc021"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "7.3.2"
|
version: "8.0.0"
|
||||||
built_collection:
|
built_collection:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -138,10 +133,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: characters
|
name: characters
|
||||||
sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
|
sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.0"
|
version: "1.4.0"
|
||||||
checked_yaml:
|
checked_yaml:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -163,22 +158,22 @@ packages:
|
|||||||
path: "../../cherrypick_annotations"
|
path: "../../cherrypick_annotations"
|
||||||
relative: true
|
relative: true
|
||||||
source: path
|
source: path
|
||||||
version: "1.1.0-dev.0"
|
version: "1.1.0-dev.1"
|
||||||
cherrypick_generator:
|
cherrypick_generator:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
path: "../../cherrypick_generator"
|
path: "../../cherrypick_generator"
|
||||||
relative: true
|
relative: true
|
||||||
source: path
|
source: path
|
||||||
version: "1.1.0-dev.1"
|
version: "1.1.0-dev.3"
|
||||||
clock:
|
clock:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: clock
|
name: clock
|
||||||
sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
|
sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.1"
|
version: "1.1.2"
|
||||||
code_builder:
|
code_builder:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -191,10 +186,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: collection
|
name: collection
|
||||||
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
|
sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.18.0"
|
version: "1.19.1"
|
||||||
convert:
|
convert:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -223,10 +218,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: dart_style
|
name: dart_style
|
||||||
sha256: "7856d364b589d1f08986e140938578ed36ed948581fbc3bc9aef1805039ac5ab"
|
sha256: "5b236382b47ee411741447c1f1e111459c941ea1b3f2b540dde54c210a3662af"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.3.7"
|
version: "3.1.0"
|
||||||
dartz:
|
dartz:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@@ -255,10 +250,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: fake_async
|
name: fake_async
|
||||||
sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
|
sha256: "6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.1"
|
version: "1.3.2"
|
||||||
file:
|
file:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -305,10 +300,10 @@ packages:
|
|||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
name: freezed
|
name: freezed
|
||||||
sha256: "44c19278dd9d89292cf46e97dc0c1e52ce03275f40a97c5a348e802a924bf40e"
|
sha256: "59a584c24b3acdc5250bb856d0d3e9c0b798ed14a4af1ddb7dc1c7b41df91c9c"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.5.7"
|
version: "2.5.8"
|
||||||
freezed_annotation:
|
freezed_annotation:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@@ -341,6 +336,14 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.3.2"
|
version: "2.3.2"
|
||||||
|
http:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: http
|
||||||
|
sha256: "2c11f3f94c687ee9bad77c171151672986360b2b001d109814ee7140b2cf261b"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.4.0"
|
||||||
http_multi_server:
|
http_multi_server:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -385,26 +388,26 @@ packages:
|
|||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
name: json_serializable
|
name: json_serializable
|
||||||
sha256: c2fcb3920cf2b6ae6845954186420fca40bc0a8abcc84903b7801f17d7050d7c
|
sha256: c50ef5fc083d5b5e12eef489503ba3bf5ccc899e487d691584699b4bdefeea8c
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "6.9.0"
|
version: "6.9.5"
|
||||||
leak_tracker:
|
leak_tracker:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: leak_tracker
|
name: leak_tracker
|
||||||
sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05"
|
sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "10.0.5"
|
version: "10.0.8"
|
||||||
leak_tracker_flutter_testing:
|
leak_tracker_flutter_testing:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: leak_tracker_flutter_testing
|
name: leak_tracker_flutter_testing
|
||||||
sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806"
|
sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.5"
|
version: "3.0.9"
|
||||||
leak_tracker_testing:
|
leak_tracker_testing:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -429,22 +432,14 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.0"
|
version: "1.3.0"
|
||||||
macros:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: macros
|
|
||||||
sha256: "0acaed5d6b7eab89f63350bccd82119e6c602df0f391260d0e32b5e23db79536"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "0.1.2-main.4"
|
|
||||||
matcher:
|
matcher:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: matcher
|
name: matcher
|
||||||
sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
|
sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.12.16+1"
|
version: "0.12.17"
|
||||||
material_color_utilities:
|
material_color_utilities:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -457,10 +452,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: meta
|
name: meta
|
||||||
sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
|
sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.15.0"
|
version: "1.16.0"
|
||||||
mime:
|
mime:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -489,10 +484,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: path
|
name: path
|
||||||
sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
|
sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.9.0"
|
version: "1.9.1"
|
||||||
petitparser:
|
petitparser:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -513,10 +508,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: protobuf
|
name: protobuf
|
||||||
sha256: "68645b24e0716782e58948f8467fd42a880f255096a821f9e7d0ec625b00c84d"
|
sha256: "579fe5557eae58e3adca2e999e38f02441d8aa908703854a9e0a0f47fa857731"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.1.0"
|
version: "4.1.0"
|
||||||
provider:
|
provider:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -553,10 +548,10 @@ packages:
|
|||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
name: retrofit_generator
|
name: retrofit_generator
|
||||||
sha256: f76fdb2b66854690d5a332e7364d7561fc9dc2b3c924d7956ab8070495e21f6a
|
sha256: "65d28d3a7b4db485f1c73fee8ee32f552ef23ee4ecb68ba491f39d80b73bdcbf"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "9.1.5"
|
version: "9.2.0"
|
||||||
shelf:
|
shelf:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -577,15 +572,15 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description: flutter
|
description: flutter
|
||||||
source: sdk
|
source: sdk
|
||||||
version: "0.0.99"
|
version: "0.0.0"
|
||||||
source_gen:
|
source_gen:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: source_gen
|
name: source_gen
|
||||||
sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832"
|
sha256: "35c8150ece9e8c8d263337a265153c3329667640850b9304861faea59fc98f6b"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.5.0"
|
version: "2.0.0"
|
||||||
source_helper:
|
source_helper:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -598,26 +593,26 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: source_span
|
name: source_span
|
||||||
sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
|
sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.10.0"
|
version: "1.10.1"
|
||||||
stack_trace:
|
stack_trace:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: stack_trace
|
name: stack_trace
|
||||||
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
|
sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.11.1"
|
version: "1.12.1"
|
||||||
stream_channel:
|
stream_channel:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: stream_channel
|
name: stream_channel
|
||||||
sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
|
sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.2"
|
version: "2.1.4"
|
||||||
stream_transform:
|
stream_transform:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -630,26 +625,26 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: string_scanner
|
name: string_scanner
|
||||||
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
|
sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0"
|
version: "1.4.1"
|
||||||
term_glyph:
|
term_glyph:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: term_glyph
|
name: term_glyph
|
||||||
sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
|
sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.1"
|
version: "1.2.2"
|
||||||
test_api:
|
test_api:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: test_api
|
name: test_api
|
||||||
sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb"
|
sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.7.2"
|
version: "0.7.4"
|
||||||
timing:
|
timing:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -678,10 +673,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: vm_service
|
name: vm_service
|
||||||
sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d"
|
sha256: "0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "14.2.5"
|
version: "14.3.1"
|
||||||
watcher:
|
watcher:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -731,5 +726,5 @@ packages:
|
|||||||
source: hosted
|
source: hosted
|
||||||
version: "3.1.3"
|
version: "3.1.3"
|
||||||
sdks:
|
sdks:
|
||||||
dart: ">=3.5.2 <4.0.0"
|
dart: ">=3.7.0 <4.0.0"
|
||||||
flutter: ">=3.18.0-18.0.pre.54"
|
flutter: ">=3.18.0-18.0.pre.54"
|
||||||
|
|||||||
@@ -13,11 +13,11 @@ dependencies:
|
|||||||
sdk: flutter
|
sdk: flutter
|
||||||
|
|
||||||
cherrypick: ^2.2.0-dev.1
|
cherrypick: ^2.2.0-dev.1
|
||||||
cherrypick_annotations: ^1.1.0-dev.0
|
cherrypick_annotations: ^1.1.0-dev.1
|
||||||
|
|
||||||
dio: ^5.4.0
|
dio: ^5.4.0
|
||||||
retrofit: ^4.0.3
|
retrofit: ^4.0.3
|
||||||
freezed_annotation: ^2.3.2
|
freezed_annotation: ^2.4.4
|
||||||
dartz: ^0.10.1
|
dartz: ^0.10.1
|
||||||
flutter_bloc: ^9.1.1
|
flutter_bloc: ^9.1.1
|
||||||
auto_route: ^9.3.0+1
|
auto_route: ^9.3.0+1
|
||||||
@@ -30,11 +30,11 @@ dev_dependencies:
|
|||||||
|
|
||||||
flutter_lints: ^5.0.0
|
flutter_lints: ^5.0.0
|
||||||
|
|
||||||
cherrypick_generator: ^1.1.0-dev.2
|
cherrypick_generator: ^1.1.0-dev.4
|
||||||
build_runner: 2.4.13
|
build_runner: 2.4.15
|
||||||
|
|
||||||
retrofit_generator: ^9.1.5
|
retrofit_generator: ^9.1.5
|
||||||
freezed: ^2.3.2
|
freezed: ^2.5.8
|
||||||
json_serializable: ^6.9.0
|
json_serializable: ^6.9.0
|
||||||
auto_route_generator: ^9.0.0
|
auto_route_generator: ^9.0.0
|
||||||
|
|
||||||
|
|||||||
14
pubspec.lock
14
pubspec.lock
@@ -5,23 +5,23 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: _fe_analyzer_shared
|
name: _fe_analyzer_shared
|
||||||
sha256: "45cfa8471b89fb6643fe9bf51bd7931a76b8f5ec2d65de4fb176dba8d4f22c77"
|
sha256: "16e298750b6d0af7ce8a3ba7c18c69c3785d11b15ec83f6dcd0ad2a0009b3cab"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "73.0.0"
|
version: "76.0.0"
|
||||||
_macros:
|
_macros:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description: dart
|
description: dart
|
||||||
source: sdk
|
source: sdk
|
||||||
version: "0.3.2"
|
version: "0.3.3"
|
||||||
analyzer:
|
analyzer:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: analyzer
|
name: analyzer
|
||||||
sha256: "4959fec185fe70cce007c57e9ab6983101dbe593d2bf8bbfb4453aaec0cf470a"
|
sha256: "1f14db053a8c23e260789e9b0980fa27f2680dd640932cae5e1137cce0e46e1e"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "6.8.0"
|
version: "6.11.0"
|
||||||
ansi_styles:
|
ansi_styles:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -298,10 +298,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: macros
|
name: macros
|
||||||
sha256: "0acaed5d6b7eab89f63350bccd82119e6c602df0f391260d0e32b5e23db79536"
|
sha256: "1d9e801cd66f7ea3663c45fc708450db1fa57f988142c64289142c9b7ee80656"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.1.2-main.4"
|
version: "0.1.3-main.0"
|
||||||
matcher:
|
matcher:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|||||||
Reference in New Issue
Block a user