getConfigInfo method

  1. @override
Future<Map<String, dynamic>> getConfigInfo()
override

Implementation

@override
Future<Map<String, dynamic>> getConfigInfo() async {
  Map<String, dynamic> result = <String, dynamic>{};

  try {
    final configInfo = await methodChannel
        .invokeMethod<Map<dynamic, dynamic>>('getConfigInfo');

    return jsonDecode(_jsonEncoder.convert(configInfo));
  } on PlatformException catch (error) {
    return result
      ..addEntries(
          [MapEntry("code", error.code), MapEntry("message", error.message)]);
  }
}