getAddressFromJson function

Future<AddressModal> getAddressFromJson()

Implementation

Future<AddressModal> getAddressFromJson() async {
  final String addressJson =
      await rootBundle.loadString('assets/json/address.json');
  var res = await jsonDecode(addressJson);
  AddressModal address = AddressModal.fromMap(res);
  return address;
}