initialize method

Future<void> initialize(
  1. Map<String, dynamic> request,
  2. dynamic error(
    1. dynamic
    )
)

Implementation

Future<void> initialize(Map<String, dynamic> request, Function(dynamic) error) async {

  try {

    WidgetsFlutterBinding.ensureInitialized();

    await _api.initialize(json.encode(request));
  } catch (e) {

    error.call(e);
  }
}