Alice class

Constructors

Alice({GlobalKey<NavigatorState>? navigatorKey, bool showNotification = true, bool showInspectorOnShake = false, String notificationIcon = '@mipmap/ic_launcher', int maxCallsCount = 1000, TextDirection? directionality, bool? showShareButton = true})
Creates alice instance.

Properties

directionality TextDirection?
Directionality of app. Directionality of the app will be used if set to null.
final
hashCode int
The hash code for this object.
no setterinherited
maxCallsCount int
Max number of calls that are stored in memory. When count is reached, FIFO method queue will be used to remove elements.
final
notificationIcon String
Icon url for notification
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showInspectorOnShake bool
Should inspector be opened on device shake (works only with physical with sensors)
final
showNotification bool
Should user be notified with notification if there's new request catched by Alice
final
showShareButton bool?
Flag used to show/hide share button
final

Methods

addHttpCall(AliceHttpCall aliceHttpCall) → void
Handle generic http call. Can be used to any http client.
addLog(AliceLog log) → void
Adds new log to Alice logger.
addLogs(List<AliceLog> logs) → void
Adds list of logs to Alice logger
getChopperInterceptor() → ResponseInterceptor
Get chopper interceptor. This should be added to Chopper instance.
getDioInterceptor() AliceDioInterceptor
Get Dio interceptor which should be applied to Dio instance.
getNavigatorKey() GlobalKey<NavigatorState>?
Get currently used navigation key
isInspectorOpened() bool
Returns flag which determines whether inspector is opened
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onHttpClientRequest(HttpClientRequest request, {dynamic body}) → void
Handle request from HttpClient
onHttpClientResponse(HttpClientResponse response, HttpClientRequest request, {dynamic body}) → void
Handle response from HttpClient
onHttpResponse(Response response, {dynamic body}) → void
Handle both request and response from http package
setNavigatorKey(GlobalKey<NavigatorState> navigatorKey) → void
Set custom navigation key. This will help if there's route library.
showInspector() → void
Opens Http calls inspector. This will navigate user to the new fullscreen page where all listened http calls can be viewed.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited