mirror of
https://github.com/pese-git/cherrypick.git
synced 2026-01-24 13:47:24 +00:00
feat: implement InjectGenerator
This commit is contained in:
@@ -11,14 +11,22 @@ part 'app.inject.cherrypick.g.dart';
|
||||
|
||||
@injectable()
|
||||
class MyApp extends StatelessWidget with _$MyApp {
|
||||
final Scope scope;
|
||||
final _appRouter = AppRouter();
|
||||
|
||||
@scope('authZone')
|
||||
@inject()
|
||||
late final String text;
|
||||
|
||||
@scope('authZone')
|
||||
@named('timeout')
|
||||
@inject()
|
||||
late final int timeout;
|
||||
|
||||
@named('repo')
|
||||
@inject()
|
||||
late final PostRepository repository;
|
||||
|
||||
MyApp({super.key, required this.scope});
|
||||
MyApp({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
Reference in New Issue
Block a user