addition_model.dart 607 Bytes

import 'package:flutter/material.dart';
import 'package:one_key/models/upload_img_model.dart';

class AdditionModel {
  String? content;
  String? type; // 1图片 2文本
  // int order; //顺序
  late UploadImgModel image;
  TextEditingController infoC = TextEditingController();

  AdditionModel();

  factory AdditionModel.fromJson(Map<String, dynamic> json) => AdditionModel()
    ..content = json["content"]
    ..type = json["type"];
  // ..order = json['order'];

  Map<String, dynamic> toJson() => <String, dynamic>{
        "content": content, "type": type,
        //  'order': order
      };
}