38 lines
1.2 KiB
Dart
38 lines
1.2 KiB
Dart
import 'package:aman_kassa_flutter/core/services/DataService.dart';
|
|
import 'package:aman_kassa_flutter/core/services/DbService.dart';
|
|
import 'package:provider/single_child_widget.dart';
|
|
|
|
import '../core/locator.dart';
|
|
import '../core/services/navigator_service.dart';
|
|
import 'package:provider/provider.dart';
|
|
|
|
import 'services/ApiService.dart';
|
|
import 'services/authentication_service.dart';
|
|
|
|
class ProviderInjector {
|
|
static List<SingleChildWidget> providers = [
|
|
..._independentServices,
|
|
..._dependentServices,
|
|
..._consumableServices,
|
|
];
|
|
|
|
static List<SingleChildWidget> _independentServices = [
|
|
// Provider.value(value: locator<NavigatorService>()),
|
|
// Provider.value(value: locator<ApiService>()),
|
|
// Provider.value(value: locator<DbService>()),
|
|
];
|
|
|
|
static List<SingleChildWidget> _dependentServices = [
|
|
// ProxyProvider<ApiService, AuthenticationService>(
|
|
// update: (context, api, authenticationService) =>
|
|
// AuthenticationService(api: api),
|
|
// ),
|
|
// ProxyProvider2< ApiService ,DbService, DataService>(
|
|
// update: (context,api , db, authenticationService) =>
|
|
// DataService(api: api, db: db),
|
|
// )
|
|
];
|
|
|
|
static List<SingleChildWidget> _consumableServices = [];
|
|
}
|