init method
Future<bool>
init({
- Style style = Style.STYLE1,
- bool enableLogging = false,
- bool enableMockups = false,
- bool skipCustomerInput = false,
- String? username,
- String? email,
- String? webCustomerName,
- Environment environment = Environment.TEST,
override
Init FawryPay SDK services.
This initialize the SDK for one time only and
also can change at anytime.
Set here some parameters to configure the SDK.
Returns true
if it initialized fine.
Throws exception if not.
style
sets the style of SDK.
enableLogging
sets whether enable logs from SDK or not.
skipCustomerInput
sets whether you let user enter username and email,
or there's a default username and email. If you set it to true, then you
are required to set default username and email.
username
sets the default username if you set skipCustomerInput = true
,
it should be a phone number.
email
sets the default email if you set skipCustomerInput = true
.
webCustomerName
optional sets customer name (Only Web).
environment
sets the environment.
Implementation
@override
Future<bool> init({
Style style = Style.STYLE1,
bool enableLogging = false,
bool enableMockups = false,
bool skipCustomerInput = false,
String? username,
String? email,
String? webCustomerName,
Environment environment = Environment.TEST,
}) async {
return await FlutterFawryPayPlatform.instance.init(
style: style,
enableLogging: enableLogging,
enableMockups: enableMockups,
skipCustomerInput: skipCustomerInput,
username: username,
email: email,
webCustomerName: webCustomerName,
environment: environment,
);
}