Line data Source code
1 : import 'package:json_annotation/json_annotation.dart'; 2 : 3 : import 'chatwoot_action_data.dart'; 4 : 5 : part 'chatwoot_action.g.dart'; 6 : 7 : @JsonSerializable(explicitToJson: true) 8 : class ChatwootAction { 9 : @JsonKey() 10 : final String identifier; 11 : 12 : @JsonKey() 13 : final String command; 14 : 15 : @JsonKey() 16 : final ChatwootActionData? data; 17 : 18 1 : ChatwootAction({required this.identifier, this.data, required this.command}); 19 : 20 0 : factory ChatwootAction.fromJson(Map<String, dynamic> json) => 21 0 : _$ChatwootActionFromJson(json); 22 : 23 2 : Map<String, dynamic> toJson() => _$ChatwootActionToJson(this); 24 : }