initialize static method

Future<void> initialize({
  1. bool showConfirmationToast = true,
  2. bool showRefreshToast = true,
  3. bool showErrorToast = true,
  4. String confirmationMessage = "Text Fetched",
  5. String refreshMessage = "Refreshed",
  6. String errorMessage = "Unable to fetch text!",
})

Initialize FlutterProcessText Plugins. bool Confirmation, Refresh and Error Toast. set ConfirmationMessage to show a confirmation message in the Toast. set refreshMessage to show a refresh message in the Toast. set errorMessage to show a error message in the Toast.

Implementation

static Future<void> initialize({
  bool showConfirmationToast = true,
  bool showRefreshToast = true,
  bool showErrorToast = true,
  String confirmationMessage = "Text Fetched",
  String refreshMessage = "Refreshed",
  String errorMessage = "Unable to fetch text!",
}) async {
  return await _channel.invokeMethod('initialize', {
    'showConfirmationToast': showConfirmationToast.toString(),
    'showRefreshToast': showRefreshToast.toString(),
    'showErrorToast': showErrorToast.toString(),
    'confirmationMessage': confirmationMessage,
    'refreshMessage': refreshMessage,
    'errorMessage': errorMessage,
  });
}