asObject method

CObject? asObject()

Will attempt to return Map<String, dynamic> object or null if it cannot.

Implementation

CObject? asObject() {
  try {
    return jsonDecode(this) as CObject?;
  } catch (ex) {
    return null;
  }
}