navigateToInterceptor method
void
navigateToInterceptor()
Navigates to the interceptor screen.
Implementation
void navigateToInterceptor() {
if (Infospect.instance.context == null) {
InfospectUtil.log(
"Cant start HTTP Inspector. Please add NavigatorKey to your application",
);
return;
}
if (!_infospect.isInfospectOpened.value) {
_infospect.isInfospectOpened.value = true;
Navigator.push<void>(
_infospect.context!,
MaterialPageRoute<dynamic>(
builder: (context) => interceptorScreen(isDarkTheme: isDarkTheme),
),
).then(
(onValue) => _infospect.isInfospectOpened.value = false,
);
}
}