remove static method
Removes the function, by reference. Example:
void initState() {
super.initState();
BackButtonInterceptor.add(_onBackButton);
}
void dispose() {
BackButtonInterceptor.remove(_onBackButton);
super.dispose();
}
bool _onBackButton(bool stopDefaultButtonEvent, RouteInfo info) { ... }
Implementation
static void remove(InterceptorFunction interceptorFunction) {
_interceptors
.removeWhere((interceptor) => interceptor.interceptionFunction == interceptorFunction);
}