refactor(structure): move benchmarks, scenarios, adapters, utils to dedicated folders; update imports/project layout

This commit is contained in:
Sergey Penkovsky
2025-08-06 16:21:31 +03:00
parent 553dbb6539
commit b27a7df161
27 changed files with 332 additions and 327 deletions

View File

@@ -0,0 +1,20 @@
import 'package:cherrypick/cherrypick.dart';
class AsyncA {}
class AsyncB {
final AsyncA a;
AsyncB(this.a);
}
class AsyncC {
final AsyncB b;
AsyncC(this.b);
}
class AsyncChainModule extends Module {
@override
void builder(Scope currentScope) {
bind<AsyncA>().toProvideAsync(() async => AsyncA()).singleton();
bind<AsyncB>().toProvideAsync(() async => AsyncB(await currentScope.resolveAsync<AsyncA>())).singleton();
bind<AsyncC>().toProvideAsync(() async => AsyncC(await currentScope.resolveAsync<AsyncB>())).singleton();
}
}