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:
@@ -9,11 +9,7 @@ void main() {
|
||||
// Создаем модуль, который будет предоставлять UseCase
|
||||
]);
|
||||
|
||||
runApp(
|
||||
const CherryPickProvider(
|
||||
child: MyApp(),
|
||||
),
|
||||
);
|
||||
runApp(const CherryPickProvider(child: MyApp()));
|
||||
}
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
@@ -21,10 +17,6 @@ class MyApp extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return CherryPickProvider(
|
||||
child: MaterialApp(
|
||||
home: MyHomePage(),
|
||||
),
|
||||
);
|
||||
return CherryPickProvider(child: MaterialApp(home: MyHomePage()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,12 +11,8 @@ class MyHomePage extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
//_inject(context); // Make sure this function is called in context
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text('Example App'),
|
||||
),
|
||||
body: Center(
|
||||
child: Text(useCase.fetchData()),
|
||||
),
|
||||
appBar: AppBar(title: const Text('Example App')),
|
||||
body: Center(child: Text(useCase.fetchData())),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user