You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
watermanagement-supplier/lib/models/connected_customers_model.dart

27 lines
780 B

import 'package:flutter/material.dart';
import 'package:watermanagement/settings.dart';
class ConnectedCustomersModel {
String customer_name = '';
String customer_phone_number='';
String customer_building_name='';
String customer_address='';
String customer_id='';
Color text_color=Colors.black;
ConnectedCustomersModel();
factory ConnectedCustomersModel.fromJson(Map<String, dynamic> json){
ConnectedCustomersModel rtvm = new ConnectedCustomersModel();
rtvm.customer_name = json['username'] ?? '';
rtvm.customer_phone_number = json['phone'] ?? '';
rtvm.customer_building_name = json['buildingName'] ?? '';
rtvm.customer_address = json['profile']['address1'] ?? '';
rtvm.customer_id = json['customerId'] ?? '';
return rtvm;
}
}