shouldExists function

bool shouldExists(
  1. Object? obj,
  2. String errmsg
)

Assert if obj exists, otherwise throw error message.

Implementation

bool shouldExists(Object? obj, String errmsg) {
  if (obj == null) throw FlutterError(errmsg);
  return true;
}