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 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; } }