implement example

This commit is contained in:
Sergey Penkovsky
2025-05-14 13:41:31 +03:00
parent c1b2f9c260
commit cb5f0b23d2
17 changed files with 583 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
import 'package:flutter/material.dart';
import 'package:cherrypick_flutter/cherrypick_flutter.dart';
import 'use_case.dart';
class MyHomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
// Разрешение зависимости UseCase из рутового скоупа
final UseCase useCase =
CherryPickProvider.of(context).openRootScope().resolve<UseCase>();
return Scaffold(
appBar: AppBar(
title: Text('Example App'),
),
body: Center(
child: Text(useCase.fetchData()),
),
);
}
}