mirror of
https://github.com/pese-git/cherrypick.git
synced 2026-01-23 21:13:35 +00:00
feat: implement generator di module
This commit is contained in:
@@ -1,14 +0,0 @@
|
||||
import 'package:cherrypick_annotations/cherrypick_annotations.dart';
|
||||
|
||||
part 'foo.cherrypick_injectable.g.dart';
|
||||
|
||||
@Injectable()
|
||||
class Foo {
|
||||
late final String field;
|
||||
}
|
||||
|
||||
// где-то в main:
|
||||
void iniFoo() {
|
||||
$initCherrypickGenerated();
|
||||
// ... остальной код
|
||||
}
|
||||
@@ -1,10 +1,6 @@
|
||||
import 'package:cherrypick_annotations/cherrypick_annotations.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'use_case.dart';
|
||||
|
||||
part 'my_home_page.cherrypick_injectable.g.dart';
|
||||
|
||||
@Injectable()
|
||||
class MyHomePage extends StatelessWidget {
|
||||
late final UseCase useCase;
|
||||
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
import 'package:cherrypick_annotations/cherrypick_annotations.dart';
|
||||
|
||||
part 'my_service.cherrypick_injectable.g.dart';
|
||||
|
||||
@Injectable()
|
||||
class MyService {}
|
||||
|
||||
// где-то в main:
|
||||
void init() {
|
||||
$initCherrypickGenerated();
|
||||
// ... остальной код
|
||||
}
|
||||
Reference in New Issue
Block a user