You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mohemm-flutter-app/lib/classes/inAppWebView.dart

34 lines
711 B
Dart

import 'dart:developer';
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
class MyInAppBrowser extends InAppBrowser {
final Function onExitCallback;
final Function(String) onLoadStartCallback;
MyInAppBrowser({
required this.onExitCallback,
required this.onLoadStartCallback,
});
@override
Future onBrowserCreated() async {
log("\n\nBrowser Created!\n\n");
}
@override
Future onLoadStart(Uri? url) async {
onLoadStartCallback(url.toString());
}
@override
Future onLoadStop(Uri? url) async {
log("\n\nStopped $url\n\n");
}
@override
void onLoadError(Uri? url, int code, String message) {
log("Can't load $url.. Error: $message");
}
}