mirror of
https://github.com/pese-git/cherrypick.git
synced 2026-01-23 21:13:35 +00:00
- 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.
23 lines
747 B
Dart
23 lines
747 B
Dart
import 'package:cherrypick/cherrypick.dart';
|
|
import 'package:client_app/my_home_page.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:cherrypick_flutter/cherrypick_flutter.dart';
|
|
|
|
void main() {
|
|
// Здесь происходит инициализация рутового скоупа и привязка зависимостей
|
|
CherryPick.openRootScope().installModules([
|
|
// Создаем модуль, который будет предоставлять UseCase
|
|
]);
|
|
|
|
runApp(const CherryPickProvider(child: MyApp()));
|
|
}
|
|
|
|
class MyApp extends StatelessWidget {
|
|
const MyApp({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return CherryPickProvider(child: MaterialApp(home: MyHomePage()));
|
|
}
|
|
}
|