mirror of
https://github.com/pese-git/cherrypick.git
synced 2026-01-24 05:25:19 +00:00
feat(examples): update client_app and postly implementation details
- Refactored and updated pages, router, DI modules, and feature implementations in both example projects: - client_app: main.dart and my_home_page.dart updated for improved navigation and structure. - postly: updated DI wiring, presentation pages, repository implementation, and routing logic. - Applied small improvements and code consistency changes in the examples. docs: add new documentation assets and benchmarking script BREAKING CHANGE: Examples now reflect the latest changes in the DI framework and are ready for Dart 3.8+ and cherrypick_generator element2 API compatibility.
This commit is contained in:
@@ -15,16 +15,17 @@ abstract class AppModule extends Module {
|
||||
@provide()
|
||||
@singleton()
|
||||
TalkerDioLoggerSettings talkerDioLoggerSettings() => TalkerDioLoggerSettings(
|
||||
printRequestHeaders: true,
|
||||
printResponseHeaders: true,
|
||||
printResponseMessage: true,
|
||||
);
|
||||
printRequestHeaders: true,
|
||||
printResponseHeaders: true,
|
||||
printResponseMessage: true,
|
||||
);
|
||||
|
||||
@provide()
|
||||
@singleton()
|
||||
TalkerDioLogger talkerDioLogger(
|
||||
Talker talker, TalkerDioLoggerSettings settings) =>
|
||||
TalkerDioLogger(talker: talker, settings: settings);
|
||||
Talker talker,
|
||||
TalkerDioLoggerSettings settings,
|
||||
) => TalkerDioLogger(talker: talker, settings: settings);
|
||||
|
||||
@instance()
|
||||
int timeout() => 1000;
|
||||
@@ -75,12 +76,14 @@ abstract class AppModule extends Module {
|
||||
@provide()
|
||||
@named('TestProvideWithParams1')
|
||||
String testProvideWithParams1(
|
||||
@named('baseUrl') String baseUrl, @params() dynamic params) =>
|
||||
"hello $params";
|
||||
@named('baseUrl') String baseUrl,
|
||||
@params() dynamic params,
|
||||
) => "hello $params";
|
||||
|
||||
@provide()
|
||||
@named('TestProvideAsyncWithParams1')
|
||||
Future<String> testProvideAsyncWithParams1(
|
||||
@named('baseUrl') String baseUrl, @params() dynamic params) async =>
|
||||
"hello $params";
|
||||
@named('baseUrl') String baseUrl,
|
||||
@params() dynamic params,
|
||||
) async => "hello $params";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user