open method
Future<void>
open(
- BuildContext context, {
- dynamic onSuccess(
- dynamic result
- dynamic onClose(
- dynamic close
- dynamic onError(
- dynamic error
Implementation
Future<void> open(BuildContext context,
{Function(dynamic result)? onSuccess,
Function(dynamic close)? onClose,
Function(dynamic error)? onError}) async {
await Navigator.push(
context,
MaterialPageRoute(
builder: (context) => WebviewScreen(
appId: appId,
publicKey: publicKey,
type: type,
userData: userData,
metaData: metaData,
govData: govData,
govId: govId,
config: config,
amount: amount,
referenceId: referenceId,
success: (result) {
onSuccess!(result);
},
close: (close) {
onClose!(close);
},
error: (error) {
onError!(error);
},
),
),
);
}