Alice constructor
Alice({
- @Deprecated('This value is not used anymore. ' 'Theme.of(context).brightness is used instead') bool darkTheme = false,
- AliceCustomColors customColors = const AliceCustomColors(),
Creates alice instance. Usage Example
Alice()
customColors: AliceCustomColors(
red: Colors.red,
green: Colors.blue
)
)
Implementation
factory Alice({
GlobalKey<NavigatorState> navigatorKey =
const GlobalObjectKey<NavigatorState>('AliceNavigatorState'),
@Deprecated(
'This value is not used anymore. '
'Theme.of(context).brightness is used instead',
)
bool darkTheme = false,
AliceCustomColors customColors = const AliceCustomColors(),
}) {
final aliceCore = AliceCore(navigatorKey, customColors);
final httpClientAdapter = AliceHttpClientAdapter(aliceCore);
final httpAdapter = AliceHttpAdapter(aliceCore);
return Alice._(
darkTheme, navigatorKey, aliceCore, httpClientAdapter, httpAdapter);
}