Skip to content

support default value #17

Description

@yfming93

eg:

@JsonSerializable()
class SdMsgList {

String notification_id = '';
String id = '';
String is_read = '';
String read_at = '';
String user_type = '';
String unit_id = '';
String user_id = '';
String type = '';
String category = '';
String relation_data_id = '';
String relation_data_code = '';
String title = '';
String content = '';
List<String> attach = [];
// List<SomeRootEntityListTarget_info> target_info;
String read_status = '';
String remark = '';
String created_at = '';
String type_text = '';
String category_text = '';
String read_status_text = '';

SdMsgList();

factory SdMsgList.fromJson(Map<String, dynamic> json) => $SdMsgListFromJson(json);

Map<String, dynamic> toJson() => $SdMsgListToJson(this);

@OverRide
String toString() {
return jsonEncode(this);
}
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions