// GENERATED CODE - DO NOT MODIFY BY HAND part of 'rule.dart'; // ************************************************************************** // TypeAdapterGenerator // ************************************************************************** class RuleAdapter extends TypeAdapter { @override final int typeId = 0; @override Rule read(BinaryReader reader) { final numOfFields = reader.readByte(); final fields = { for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(), }; return Rule( name: fields[0] as String, description: fields[1] as String, group: fields[2] as String, state: fields[3] as String, incompatible: (fields[4] as List).cast(), sets: (fields[5] as List).cast(), details: fields[6] as String, ); } @override void write(BinaryWriter writer, Rule obj) { writer ..writeByte(7) ..writeByte(0) ..write(obj.name) ..writeByte(1) ..write(obj.description) ..writeByte(2) ..write(obj.group) ..writeByte(3) ..write(obj.state) ..writeByte(4) ..write(obj.incompatible) ..writeByte(5) ..write(obj.sets) ..writeByte(6) ..write(obj.details); } @override int get hashCode => typeId.hashCode; @override bool operator ==(Object other) => identical(this, other) || other is RuleAdapter && runtimeType == other.runtimeType && typeId == other.typeId; } // ************************************************************************** // JsonSerializableGenerator // ************************************************************************** Rule _$RuleFromJson(Map json) => Rule( name: json['name'] as String, description: json['description'] as String, group: json['group'] as String, state: json['state'] as String, incompatible: (json['incompatible'] as List) .map((e) => e as String) .toList(), sets: (json['sets'] as List).map((e) => e as String).toList(), details: json['details'] as String, ); Map _$RuleToJson(Rule instance) => { 'name': instance.name, 'description': instance.description, 'group': instance.group, 'state': instance.state, 'incompatible': instance.incompatible, 'sets': instance.sets, 'details': instance.details, };