Converts the config to a map for the method channel.
Map<String, dynamic> toMap() { return { 'isRequired': isRequired, 'format': format.name, 'isPhoneNumberRequired': isPhoneNumberRequired, }; }