fromString method

CreateRoomPreset? fromString(
  1. String val
)

Implementation

CreateRoomPreset? fromString(String val) {
  final override = {
    'private_chat': CreateRoomPreset.privateChat,
    'public_chat': CreateRoomPreset.publicChat,
    'trusted_private_chat': CreateRoomPreset.trustedPrivateChat,
  }[val];
// ignore: unnecessary_this
  return this.contains(override) ? override : null;
}