Home > Back-end >  Creating Model in Flutter
Creating Model in Flutter

Time:08-30

import 'dart:convert';

import 'package:kool_selling/models/kool_m_base_models.dart';

class AddressModel extends AddressCustom {
  AddressModel(
      {required String addressNumber,
      required String addressText,
      required CountryCustom countryObj,
      required ProvinceCustom provinceObj,
      required DistrictCustom districtObj,
      required WardCustom wardObj})
      : super(
            addressNumber: addressNumber,
            addressText: addressText,
            countryObj: countryObj,
            provinceObj: provinceObj,
            districtObj: districtObj,
            wardObj: wardObj);
}

I want to create some model in Flutter that is base on some model from C# to do fromJson and toJson API calls but I don't know if the model I made was correct please help me C# Models

This is what I had created, don't know if it is correct or if there some missing part to it

CodePudding user response:

Use enter image description here

CodePudding user response:

use this enter image description here

it will convert null-safe model which will be useful to code faster and scalable.

  • Related