intValue<T> static method

int? intValue<T>(
  1. T? result
)

convert int

Implementation

static int? intValue<T>(T? result) {
  if (result == null) {
    return null;
  }
  if (result is int) {
    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;
  }
}