mapValue<T> static method

Map? mapValue<T>(
  1. T? result
)

convert Map

Implementation

static Map? mapValue<T>(T? result) {
  if (result == null) {
    return null;
  }
  if (result is Map) {
    debugPrint("invoke result value: $result");
    return result;
  } else {
    if (result is FlutterError) {
      FlutterError error = result;
      debugPrint("invoke result FlutterError message:${error.message}");
      return null;
    }
    debugPrint("invoke result type error: $result");
    return null;
  }
}