implemented payment method selection & payment details dialog. Added Calendar events to add remindar in calendar for appointment.
parent
b3e5047820
commit
192a3835d6
@ -0,0 +1,67 @@
|
|||||||
|
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
|
||||||
|
|
||||||
|
class MyInAppBrowser extends InAppBrowser {
|
||||||
|
static List<String> successURLS = ['success', 'PayFortResponse', 'PayFortSucess'];
|
||||||
|
|
||||||
|
static List<String> errorURLS = ['PayfortCancel'];
|
||||||
|
|
||||||
|
final Function onExitCallback;
|
||||||
|
|
||||||
|
MyInAppBrowser({this.onExitCallback});
|
||||||
|
|
||||||
|
Future onBrowserCreated() async {
|
||||||
|
print("\n\nBrowser Created!\n\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future onLoadStart(String url) async {
|
||||||
|
print("\n\nStarted $url\n\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future onLoadStop(String url) async {
|
||||||
|
print("\n\nStopped $url\n\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void onLoadError(String url, int code, String message) {
|
||||||
|
print("Can't load $url.. Error: $message");
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void onProgressChanged(int progress) {
|
||||||
|
print("Progress: $progress");
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void onExit() {
|
||||||
|
print("\n\nBrowser closed!\n\n");
|
||||||
|
onExitCallback();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<ShouldOverrideUrlLoadingAction> shouldOverrideUrlLoading(
|
||||||
|
ShouldOverrideUrlLoadingRequest shouldOverrideUrlLoadingRequest) async {
|
||||||
|
print("\n\n override ${shouldOverrideUrlLoadingRequest.url}\n\n");
|
||||||
|
return ShouldOverrideUrlLoadingAction.ALLOW;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void onLoadResource(LoadedResource response) {
|
||||||
|
print("Started at: " +
|
||||||
|
response.startTime.toString() +
|
||||||
|
"ms ---> duration: " +
|
||||||
|
response.duration.toString() +
|
||||||
|
"ms " +
|
||||||
|
response.url);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void onConsoleMessage(ConsoleMessage consoleMessage) {
|
||||||
|
print("""
|
||||||
|
console output:
|
||||||
|
message: ${consoleMessage.message}
|
||||||
|
messageLevel: ${consoleMessage.messageLevel.toValue()}
|
||||||
|
""");
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue