Frontend  0.4.1
Loading...
Searching...
No Matches
fake_services_provider_container.dart File Reference

Variables

import package
 
final fakeServicesProviderContainer = ProviderContainer()
 Fake services provider container.
 

Variable Documentation

◆ fakeServicesProviderContainer

final fakeServicesProviderContainer = ProviderContainer()

This is a global container for providers. Please not that this is bad practice, but we need a common provider container for all fake services. This is the only way we can inject this container to fake services as well as the entire widget tree.

When faking services this container gets injected into runApp.

// Expose global `ProviderContainer` to widget tree for fake services
if (const String.fromEnvironment('OPENREMISE_FRONTEND_FAKE_SERVICES') ==
'true') {
runApp(
UncontrolledProviderScope(
child: const MyApp(),
),
);
}
Definition main.dart:84
final fakeServicesProviderContainer
Fake services provider container.
Definition fake_services_provider_container.dart:41

See also #295 and #1387.

◆ package

import package