import 'package:hive/hive.dart'; part 'generate_info_model.g.dart'; @HiveType(typeId: 4) class GenerateInfoModel { @HiveField(0) String? prompt; @HiveField(1) String? negativePrompt; @HiveField(2) String? samplingMethod; @HiveField(3) int? samplingStep; @HiveField(4) int? cfgScale; @HiveField(5) int? seed; GenerateInfoModel( {this.prompt, this.negativePrompt, this.samplingMethod, this.samplingStep, this.cfgScale, this.seed}); GenerateInfoModel.fromJson(Map json) { prompt = json['prompt']; negativePrompt = json['negative_prompt']; samplingMethod = json['sampling_method']; samplingStep = json['sampling_step']; cfgScale = json['cfg_scale']; seed = json['seed']; } Map toJson() { final Map data = {}; data['prompt'] = prompt; data['negative_prompt'] = negativePrompt; data['sampling_method'] = samplingMethod; data['sampling_step'] = samplingStep; data['cfg_scale'] = cfgScale; data['seed'] = seed; return data; } }