boolValue<T> static method

bool? boolValue<T>(
  1. T? result
)

convert bool

Implementation

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