// import 'package:discover_module/ui_screen/interactionform/model/interaction_data.dart'; // import 'package:hive_flutter/hive_flutter.dart'; // // import 'package:pwa_ios/model/interaction_data.dart'; // part 'interaction_config_data.g.dart'; // class UIDataResponse { // bool success; // String message; // List formFields; // UIDataResponse({ // required this.success, // required this.message, // required this.formFields, // }); // factory UIDataResponse.fromJson(Map json) => UIDataResponse( // success: json["success"], // message: json["message"], // formFields: List.from( // json["data"].map((x) => FormFieldData.fromJson(x))), // ); // Map toJson() => { // "success": success, // "message": message, // "form-fields": List.from(formFields.map((x) => x.toJson())), // }; // @override // String toString() { // // TODO: implement toString // return List.from(formFields.map((x) => x.toJson())).toString(); // } // } // @HiveType(typeId: 19) // class InteractionConfigData { // @HiveField(1) // InteractionResultData widgets; // @HiveField(2) // String id; // @HiveField(3) // String name; // InteractionConfigData({ // required this.widgets, // required this.id, // required this.name, // }); // Map toJson() => {"widgets": widgets}; // } //pooja import 'package:discover_module/ui_screen/interactionform/model/interaction_data.dart'; import 'package:hive_flutter/hive_flutter.dart'; // import 'package:pwa_ios/model/interaction_data.dart'; part 'engagement_interaction.g.dart'; class UIDataResponse { bool success; String message; List formFields; String? formtype; UIDataResponse({ required this.success, required this.message, required this.formFields, this.formtype, }); factory UIDataResponse.fromJson(Map json) => UIDataResponse( success: json["success"], message: json["message"], formtype: json["formtype"], formFields: List.from( json["data"].map((x) => FormFieldData.fromJson(x))), ); Map toJson() => { "success": success, "message": message, "formtype": formtype, "form-fields": List.from(formFields.map((x) => x.toJson())), }; @override String toString() { // TODO: implement toString return List.from(formFields.map((x) => x.toJson())).toString(); } } @HiveType(typeId: 29) class InteractionConfigDataEng { @HiveField(1) InteractionConfigDataEng widgets; @HiveField(2) String id; @HiveField(3) String name; @HiveField(4) String? formtype; InteractionConfigDataEng({ required this.widgets, required this.id, required this.name, this.formtype, }); Map toJson() => {"widgets": widgets}; }