Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/flutter/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/tfs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Flutter I/flatter(9637):NoSuchMethodError:getter';长度';被调用为空_Flutter_Flutter Layout_Flutter Dependencies_Flutter Test - Fatal编程技术网

Flutter I/flatter(9637):NoSuchMethodError:getter';长度';被调用为空

Flutter I/flatter(9637):NoSuchMethodError:getter';长度';被调用为空,flutter,flutter-layout,flutter-dependencies,flutter-test,Flutter,Flutter Layout,Flutter Dependencies,Flutter Test,我试图解决它。但我发现这个问题是特定于用户的。某些用户的数据显示正确,但某些数据显示此错误。我不明白问题出在哪里 这是屏幕代码 FutureBuilder( future: user.fetchData(), builder: (context, snapshot) { if (snapshot.hasData) { return quickInfo(snapshot.data);

我试图解决它。但我发现这个问题是特定于用户的。某些用户的数据显示正确,但某些数据显示此错误。我不明白问题出在哪里

这是屏幕代码

FutureBuilder(
            future: user.fetchData(),
            builder: (context, snapshot) {
              if (snapshot.hasData) {
                return quickInfo(snapshot.data);
              } else if (snapshot.hasError) {
                print(snapshot.error);
                return Text("Something Error. Try again later");
              }

              return Container(
                height: 50,
                alignment: Alignment.center,
                child: Text("Loading..."),
              );
            },
          ),
quickInfo方法代码

Widget quickInfo(User user) {
    var todayVisits = visitByDay(user);
    var monthlyVisits = visitByMonth(user);

    return Container(
      child: Column(
        children: <Widget>[
          SizedBox(height: 15),
          Row(
            mainAxisAlignment: MainAxisAlignment.spaceAround,
            children: <Widget>[
              Column(
                children: <Widget>[
                  Text(
                    todayVisits.toString() ?? '0',
                    style: TextStyle(fontSize: 22, fontWeight: FontWeight.bold),
                  ),
                  Text("Today Visits"),
                ],
              ),
              Column(
                children: <Widget>[
                  Text(
                    monthlyVisits.toString() ?? '0',
                    style: TextStyle(fontSize: 22, fontWeight: FontWeight.bold),
                  ),
                  Text("Monthly Visits"),
                ],
              ),
              Column(
                children: <Widget>[
                  Text(
                    user.clients.length.toString() ?? '0',
                    style: TextStyle(fontSize: 22, fontWeight: FontWeight.bold),
                  ),
                  Text("Total Clients"),
                ],
              ),
            ],
          ),
          Divider(
            height: 30,
            thickness: 2.0,
          ),
        ],
      ),
    );
  }
User.dart

import 'dart:convert';

import 'package:PandeetApp/services/activity.dart';

class User {
  int id;
  String name;
  String mobile;
  String smsToken;
  String mobileVerifiedAt;
  String email;
  String emailToken;
  Null emailVerifiedAt;
  String password;
  String rememberToken;
  String avatar;
  String address;
  String city;
  String state;
  String country;
  int pincode;
  int locationId;
  String travelled;
  String adharcard;
  String pancard;
  String specialisation;
  List services;
  String minCharge;
  String maxCharge;
  String onlineCharge;
  String qualification;
  String experience;
  String language;
  String active;
  String varify;
  PaymentMode paymentMode;
  String createdAt;
  String updatedAt;
  String rating;
  List<Clients> clients;
  List<Visits> visits;
  List<Payments> payments;

  User({
    this.id,
    this.name,
    this.mobile,
    this.smsToken,
    this.mobileVerifiedAt,
    this.email,
    this.emailToken,
    this.emailVerifiedAt,
    this.password,
    this.rememberToken,
    this.avatar,
    this.address,
    this.city,
    this.state,
    this.country,
    this.pincode,
    this.locationId,
    this.travelled,
    this.adharcard,
    this.pancard,
    this.specialisation,
    this.services,
    this.minCharge,
    this.maxCharge,
    this.onlineCharge,
    this.qualification,
    this.experience,
    this.language,
    this.active,
    this.varify,
    this.paymentMode,
    this.createdAt,
    this.updatedAt,
    this.rating,
    this.clients,
    this.visits,
    this.payments,
  });

  Future<User> fetchData() async {
    var data = await PanditActivity().profile();
    // print(data);
    return new User.fromJson(data);
  }

  User.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    name = json['name'];
    mobile = json['mobile'];
    smsToken = json['sms_token'];
    mobileVerifiedAt = json['mobile_verified_at'];
    email = json['email'];
    emailToken = json['email_token'];
    emailVerifiedAt = json['email_verified_at'];
    password = json['password'];
    rememberToken = json['remember_token'];
    avatar = json['avatar'];
    address = json['address'];
    city = json['city'];
    state = json['state'];
    country = json['country'];
    pincode = json['pincode'];
    locationId = json['location_id'];
    travelled = json['travelled'];
    adharcard = json['adharcard'];
    pancard = json['pancard'];
    specialisation = json['specialisation'];
    services = jsonDecode(json['services']) ?? [];
    minCharge = json['min_charge'];
    maxCharge = json['max_charge'];
    onlineCharge = json['online_charge'];
    qualification = json['qualification'];
    experience = json['experience'];
    language = json['language'];
    active = json['active'];
    varify = json['varify'];
    paymentMode = json['payment_mode'] != null
        ? new PaymentMode.fromJson(jsonDecode(json['payment_mode']))
        : PaymentMode();
    createdAt = json['created_at'];
    updatedAt = json['updated_at'];
    rating = json['rating'];
    if (json['clients'] != null) {
      clients = new List<Clients>();
      json['clients'].forEach((v) {
        clients.add(new Clients.fromJson(v));
      });
    }
    if (json['visits'] != null) {
      visits = new List<Visits>();
      json['visits'].forEach((v) {
        visits.add(new Visits.fromJson(v));
      });
    }
    if (json['payments'] != null) {
      payments = new List<Payments>();
      json['payments'].forEach((v) {
        payments.add(new Payments.fromJson(v));
      });
    }
  }

  Map<String, String> toJson() {
    final Map<String, String> data = new Map<String, String>();
    data['id'] = this.id.toString();
    data['name'] = this.name;
    data['mobile'] = this.mobile;
    data['sms_token'] = this.smsToken;
    data['mobile_verified_at'] = this.mobileVerifiedAt;
    data['email'] = this.email;
    data['email_token'] = this.emailToken;
    data['email_verified_at'] = this.emailVerifiedAt;
    data['password'] = this.password;
    data['remember_token'] = this.rememberToken;
    data['avatar'] = this.avatar;
    data['address'] = this.address;
    data['city'] = this.city;
    data['state'] = this.state;
    data['country'] = this.country;
    data['pincode'] = this.pincode.toString();
    data['location_id'] = this.locationId.toString();
    data['travelled'] = this.travelled;
    data['adharcard'] = this.adharcard;
    data['pancard'] = this.pancard;
    data['specialisation'] = this.specialisation;
    data['services'] = jsonEncode(this.services);
    data['min_charge'] = this.minCharge;
    data['max_charge'] = this.maxCharge;
    data['online_charge'] = this.onlineCharge;
    data['qualification'] = this.qualification;
    data['experience'] = this.experience;
    data['language'] = this.language;
    data['active'] = this.active;
    data['varify'] = this.varify;
    if (this.paymentMode != null) {
      data['payment_mode'] = jsonEncode(this.paymentMode.toJson());
    }
    data['created_at'] = this.createdAt;
    data['updated_at'] = this.updatedAt;
    data['rating'] = this.rating;
    if (this.clients != null) {
      data['clients'] = this.clients.map((v) => v.toJson()).toList().toString();
    }
    if (this.visits != null) {
      data['visits'] = this.visits.map((v) => v.toJson()).toList().toString();
    }
    if (this.payments != null) {
      data['payments'] =
          this.payments.map((v) => v.toJson()).toList().toString();
    }
    return data;
  }
}

class PaymentMode {
  String bankName;
  String bankAddress;
  String ifscCode;
  String accountNo;
  String accountHolder;

  PaymentMode(
      {this.bankName, this.ifscCode, this.accountNo, this.accountHolder});

  PaymentMode.fromJson(Map<String, dynamic> json) {
    bankName = json['bank_name'];
    bankAddress = json['bank_address'];
    ifscCode = json['ifsc_code'];
    accountNo = json['account_no'];
    accountHolder = json['account_holder'];
  }

  Map<String, String> toJson() {
    final Map<String, String> data = new Map<String, String>();
    data['bank_name'] = this.bankName;
    data['bank_address'] = this.bankAddress;
    data['ifsc_code'] = this.ifscCode;
    data['account_no'] = this.accountNo;
    data['account_holder'] = this.accountHolder;
    return data;
  }
}

class Clients {
  int id;
  int clientId;
  String perpose;
  String details;
  String when;
  int acceptedBy;
  String name;
  String mobile;
  String email;
  String orgName;
  String address;
  String city;
  String state;
  String pincode;
  String country;
  String latitude;
  String longitude;
  String clientIp;
  String device;
  String createdAt;
  String updatedAt;

  Clients(
      {this.id,
      this.clientId,
      this.perpose,
      this.details,
      this.when,
      this.acceptedBy,
      this.name,
      this.mobile,
      this.email,
      this.orgName,
      this.address,
      this.city,
      this.state,
      this.pincode,
      this.country,
      this.latitude,
      this.longitude,
      this.clientIp,
      this.device,
      this.createdAt,
      this.updatedAt});

  Clients.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    clientId = json['client_id'];
    perpose = json['perpose'];
    details = json['details'];
    when = json['when'];
    acceptedBy = json['accepted_by'];
    name = json['name'];
    mobile = json['mobile'];
    email = json['email'];
    orgName = json['org_name'];
    address = json['address'];
    city = json['city'];
    state = json['state'];
    pincode = json['pincode'];
    country = json['country'];
    latitude = json['latitude'];
    longitude = json['longitude'];
    clientIp = json['client_ip'];
    device = json['device'];
    createdAt = json['created_at'];
    updatedAt = json['updated_at'];
  }

  Map<String, String> toJson() {
    final Map<String, String> data = new Map<String, String>();
    data['id'] = this.id.toString();
    data['client_id'] = this.clientId.toString();
    data['perpose'] = this.perpose;
    data['details'] = this.details;
    data['when'] = this.when;
    data['accepted_by'] = this.acceptedBy.toString();
    data['name'] = this.name;
    data['mobile'] = this.mobile;
    data['email'] = this.email;
    data['org_name'] = this.orgName;
    data['address'] = this.address;
    data['city'] = this.city;
    data['state'] = this.state;
    data['pincode'] = this.pincode;
    data['country'] = this.country;
    data['latitude'] = this.latitude;
    data['longitude'] = this.longitude;
    data['client_ip'] = this.clientIp;
    data['device'] = this.device;
    data['created_at'] = this.createdAt;
    data['updated_at'] = this.updatedAt;
    return data;
  }
}

class Visits {
  int id;
  int panditActivityId;
  int panditId;
  String checkIn;
  String checkOut;
  String createdAt;
  String updatedAt;

  Visits(
      {this.id,
      this.panditActivityId,
      this.panditId,
      this.checkIn,
      this.checkOut,
      this.createdAt,
      this.updatedAt});

  Visits.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    panditActivityId = json['pandit_activity_id'];
    panditId = json['pandit_id'];
    checkIn = json['checkIn'];
    checkOut = json['checkOut'];
    createdAt = json['created_at'];
    updatedAt = json['updated_at'];
  }

  Map<String, String> toJson() {
    final Map<String, String> data = new Map<String, String>();
    data['id'] = this.id.toString();
    data['pandit_activity_id'] = this.panditActivityId.toString();
    data['pandit_id'] = this.panditId.toString();
    data['checkIn'] = this.checkIn;
    data['checkOut'] = this.checkOut;
    data['created_at'] = this.createdAt;
    data['updated_at'] = this.updatedAt;
    return data;
  }
}

class Payments {
  int id;
  int panditId;
  String details;
  String mode;
  String creditAmt;
  String debitAmt;
  String createdAt;
  String updatedAt;

  Payments(
      {this.id,
      this.panditId,
      this.details,
      this.mode,
      this.creditAmt,
      this.debitAmt,
      this.createdAt,
      this.updatedAt});

  Payments.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    panditId = json['pandit_id'];
    details = json['details'];
    mode = json['mode'];
    creditAmt = json['credit_amt'].toString();
    debitAmt = json['debit_amt'].toString();
    createdAt = json['created_at'];
    updatedAt = json['updated_at'];
  }

  Map<String, String> toJson() {
    final Map<String, String> data = new Map<String, String>();
    data['id'] = this.id.toString();
    data['pandit_id'] = this.panditId.toString();
    data['details'] = this.details;
    data['mode'] = this.mode;
    data['credit_amt'] = this.creditAmt;
    data['debit_amt'] = this.debitAmt;
    data['created_at'] = this.createdAt;
    data['updated_at'] = this.updatedAt;
    return data;
  }
}
导入'dart:convert';
导入“包:pandeetap/services/activity.dart”;
类用户{
int-id;
字符串名;
字符串移动;
斯姆斯托克线;
字符串mobileVerifiedAt;
字符串电子邮件;
字符串标记;
空emailVerifiedAt;
字符串密码;
弦记忆;
字符串化身;
字符串地址;
字符串城市;
字符串状态;
弦国;
内pincode;
int locationId;
字符串移动;
弦乐;
线板;
弦乐专业化;
列出服务;
串装;
字符串最大电荷;
在线充电;
字符串限定;
弦乐经验;
字符串语言;
字符串活动;
串变;
支付方式支付方式;
字符串createdAt;
字符串更新数据;
串级;
列出客户名单;
列出访问名单;
列出付款清单;
使用者({
这个身份证,
这个名字,
这个.手机,,
这是斯姆斯托克,
这是mobileVerifiedAt,
这是一封电子邮件,
这个.emailToken,
这是一封电子邮件,
这个密码,
这个,记住,肯,
这个,阿凡达,
这个地址,
这个城市,
这个州,
这个国家,
这是平码,
这个.locationId,
这是一次旅行,
这是阿达卡,
这个,潘卡德,
这就是专业化,
这就是服务,
这是我的职责,
这是maxCharge,
这是网上收费,
这是我的资格,
这个经验,,
这种语言,
这个,主动,,
这个,varify,
这是付费模式,
这个.createdAt,
这个.updatedAt,
这个.评级,,
这是我的客户,
这个,访问,,
这就是支付,
});
Future fetchData()异步{
var data=wait PanditActivity().profile();
//打印(数据);
返回新的User.fromJson(数据);
}
User.fromJson(映射json){
id=json['id'];
name=json['name'];
mobile=json['mobile'];
smsToken=json['sms_token'];
mobileVerifiedAt=json['mobile_-verified_-at'];
email=json['email'];
emailToken=json['email_token'];
emailVerifiedAt=json['email_verified_at'];
password=json['password'];
rememberToken=json['membere_token'];
avatar=json['avatar'];
address=json['address'];
city=json['city'];
state=json['state'];
country=json['country'];
pincode=json['pincode'];
locationId=json['location_id'];
旅行=json['Traveled'];
adharcard=json['adharcard'];
pancard=json['pancard'];
专业化=json[“专业化”];
services=jsonDecode(json['services'])??[];
minCharge=json['min_charge'];
maxCharge=json['max_charge'];
onlineCharge=json['online_charge'];
qualification=json['qualification'];
experience=json['experience'];
language=json['language'];
active=json['active'];
varify=json['varify'];
paymentMode=json['payment_mode']!=null
?新的PaymentMode.fromJson(jsonDecode(json['payment_mode']))
:PaymentMode();
createdAt=json['created_at'];
updatedAt=json['updated_at'];
rating=json['rating'];
if(json['clients']!=null){
clients=新列表();
json['clients'].forEach((v){
clients.add(newclients.fromJson(v));
});
}
if(json['visions']!=null){
访问量=新列表();
json['visions'].forEach((v){
add(new visions.fromJson(v));
});
}
如果(json['payments']!=null){
付款=新列表();
json['payments'].forEach((v){
payments.add(newpayments.fromJson(v));
});
}
}
映射到JSON(){
最终地图数据=新地图();
data['id']=this.id.toString();
数据['name']=this.name;
数据['mobile']=this.mobile;
数据['sms_token']=this.smsToken;
数据['mobile\u verified\u at']=this.mobileVerifiedAt;
数据['email']=this.email;
数据['email_token']=this.emailToken;
数据['email\u verified\u at']=this.emailVerifiedAt;
数据['password']=this.password;
数据['membert_token']=this.rememberToken;
数据['avatar']=this.avatar;
数据['address']=此地址;
数据['city']=本市;
数据['state']=this.state;
数据['country']=这个国家;
数据['pincode']=this.pincode.toString();
data['location_id']=this.locationId.toString();
数据['Traveled']=本次旅行;
数据['adharcard']=this.adharcard;
数据['pancard']=this.pancard;
数据[“专业化”]=本专业化;
数据['services']=jsonEncode(this.services);
数据['minu charge']=this.minCharge;
数据['max_charge']=this.maxCharge;
数据['online_charge']=此.online费用;
数据['qualification']=此项资格;
数据['experience']=这个经验;
数据['language']=this.language;
数据['active']=this.active;
数据['varify']=this.varify;
如果(this.paymentMode!=null){
data['payment_mode']=jsonEncode(this.paymentMode.toJson());
}
数据['created_at']=this.createdAt;
数据['updated_at']=this.updatedAt;
数据['rating']=此等级;
if(this.clients!=null){
data['clients']=this.clients.map((v)=>v.toJson()).toList().toString();
}
if(this.visions!=null){
data['vists']=this.visions.map((v)=>v.toJson()).toList().toString();
}
如果(this.payments!=null){
数据[“付款”]=
this.payments.map((v)=>v.toJson()).toList().toString();
}
返回数据;
}
}
班级支付模式{
银行名称字符串;
字符串银行地址;
字符串ifscCode;
字符串accountNo;
字符串帐户持有人;
付款方式(
{this.bankName,this.ifscCode,this.accountNo,this.accountHolder});
PaymentMode.fromJson(映射json){
bankName=json['bank_name'];
import 'dart:convert';

import 'package:PandeetApp/services/activity.dart';

class User {
  int id;
  String name;
  String mobile;
  String smsToken;
  String mobileVerifiedAt;
  String email;
  String emailToken;
  Null emailVerifiedAt;
  String password;
  String rememberToken;
  String avatar;
  String address;
  String city;
  String state;
  String country;
  int pincode;
  int locationId;
  String travelled;
  String adharcard;
  String pancard;
  String specialisation;
  List services;
  String minCharge;
  String maxCharge;
  String onlineCharge;
  String qualification;
  String experience;
  String language;
  String active;
  String varify;
  PaymentMode paymentMode;
  String createdAt;
  String updatedAt;
  String rating;
  List<Clients> clients;
  List<Visits> visits;
  List<Payments> payments;

  User({
    this.id,
    this.name,
    this.mobile,
    this.smsToken,
    this.mobileVerifiedAt,
    this.email,
    this.emailToken,
    this.emailVerifiedAt,
    this.password,
    this.rememberToken,
    this.avatar,
    this.address,
    this.city,
    this.state,
    this.country,
    this.pincode,
    this.locationId,
    this.travelled,
    this.adharcard,
    this.pancard,
    this.specialisation,
    this.services,
    this.minCharge,
    this.maxCharge,
    this.onlineCharge,
    this.qualification,
    this.experience,
    this.language,
    this.active,
    this.varify,
    this.paymentMode,
    this.createdAt,
    this.updatedAt,
    this.rating,
    this.clients,
    this.visits,
    this.payments,
  });

  Future<User> fetchData() async {
    var data = await PanditActivity().profile();
    // print(data);
    return new User.fromJson(data);
  }

  User.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    name = json['name'];
    mobile = json['mobile'];
    smsToken = json['sms_token'];
    mobileVerifiedAt = json['mobile_verified_at'];
    email = json['email'];
    emailToken = json['email_token'];
    emailVerifiedAt = json['email_verified_at'];
    password = json['password'];
    rememberToken = json['remember_token'];
    avatar = json['avatar'];
    address = json['address'];
    city = json['city'];
    state = json['state'];
    country = json['country'];
    pincode = json['pincode'];
    locationId = json['location_id'];
    travelled = json['travelled'];
    adharcard = json['adharcard'];
    pancard = json['pancard'];
    specialisation = json['specialisation'];
    services = jsonDecode(json['services']) ?? [];
    minCharge = json['min_charge'];
    maxCharge = json['max_charge'];
    onlineCharge = json['online_charge'];
    qualification = json['qualification'];
    experience = json['experience'];
    language = json['language'];
    active = json['active'];
    varify = json['varify'];
    paymentMode = json['payment_mode'] != null
        ? new PaymentMode.fromJson(jsonDecode(json['payment_mode']))
        : PaymentMode();
    createdAt = json['created_at'];
    updatedAt = json['updated_at'];
    rating = json['rating'];
    if (json['clients'] != null) {
      clients = new List<Clients>();
      json['clients'].forEach((v) {
        clients.add(new Clients.fromJson(v));
      });
    }
    if (json['visits'] != null) {
      visits = new List<Visits>();
      json['visits'].forEach((v) {
        visits.add(new Visits.fromJson(v));
      });
    }
    if (json['payments'] != null) {
      payments = new List<Payments>();
      json['payments'].forEach((v) {
        payments.add(new Payments.fromJson(v));
      });
    }
  }

  Map<String, String> toJson() {
    final Map<String, String> data = new Map<String, String>();
    data['id'] = this.id.toString();
    data['name'] = this.name;
    data['mobile'] = this.mobile;
    data['sms_token'] = this.smsToken;
    data['mobile_verified_at'] = this.mobileVerifiedAt;
    data['email'] = this.email;
    data['email_token'] = this.emailToken;
    data['email_verified_at'] = this.emailVerifiedAt;
    data['password'] = this.password;
    data['remember_token'] = this.rememberToken;
    data['avatar'] = this.avatar;
    data['address'] = this.address;
    data['city'] = this.city;
    data['state'] = this.state;
    data['country'] = this.country;
    data['pincode'] = this.pincode.toString();
    data['location_id'] = this.locationId.toString();
    data['travelled'] = this.travelled;
    data['adharcard'] = this.adharcard;
    data['pancard'] = this.pancard;
    data['specialisation'] = this.specialisation;
    data['services'] = jsonEncode(this.services);
    data['min_charge'] = this.minCharge;
    data['max_charge'] = this.maxCharge;
    data['online_charge'] = this.onlineCharge;
    data['qualification'] = this.qualification;
    data['experience'] = this.experience;
    data['language'] = this.language;
    data['active'] = this.active;
    data['varify'] = this.varify;
    if (this.paymentMode != null) {
      data['payment_mode'] = jsonEncode(this.paymentMode.toJson());
    }
    data['created_at'] = this.createdAt;
    data['updated_at'] = this.updatedAt;
    data['rating'] = this.rating;
    if (this.clients != null) {
      data['clients'] = this.clients.map((v) => v.toJson()).toList().toString();
    }
    if (this.visits != null) {
      data['visits'] = this.visits.map((v) => v.toJson()).toList().toString();
    }
    if (this.payments != null) {
      data['payments'] =
          this.payments.map((v) => v.toJson()).toList().toString();
    }
    return data;
  }
}

class PaymentMode {
  String bankName;
  String bankAddress;
  String ifscCode;
  String accountNo;
  String accountHolder;

  PaymentMode(
      {this.bankName, this.ifscCode, this.accountNo, this.accountHolder});

  PaymentMode.fromJson(Map<String, dynamic> json) {
    bankName = json['bank_name'];
    bankAddress = json['bank_address'];
    ifscCode = json['ifsc_code'];
    accountNo = json['account_no'];
    accountHolder = json['account_holder'];
  }

  Map<String, String> toJson() {
    final Map<String, String> data = new Map<String, String>();
    data['bank_name'] = this.bankName;
    data['bank_address'] = this.bankAddress;
    data['ifsc_code'] = this.ifscCode;
    data['account_no'] = this.accountNo;
    data['account_holder'] = this.accountHolder;
    return data;
  }
}

class Clients {
  int id;
  int clientId;
  String perpose;
  String details;
  String when;
  int acceptedBy;
  String name;
  String mobile;
  String email;
  String orgName;
  String address;
  String city;
  String state;
  String pincode;
  String country;
  String latitude;
  String longitude;
  String clientIp;
  String device;
  String createdAt;
  String updatedAt;

  Clients(
      {this.id,
      this.clientId,
      this.perpose,
      this.details,
      this.when,
      this.acceptedBy,
      this.name,
      this.mobile,
      this.email,
      this.orgName,
      this.address,
      this.city,
      this.state,
      this.pincode,
      this.country,
      this.latitude,
      this.longitude,
      this.clientIp,
      this.device,
      this.createdAt,
      this.updatedAt});

  Clients.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    clientId = json['client_id'];
    perpose = json['perpose'];
    details = json['details'];
    when = json['when'];
    acceptedBy = json['accepted_by'];
    name = json['name'];
    mobile = json['mobile'];
    email = json['email'];
    orgName = json['org_name'];
    address = json['address'];
    city = json['city'];
    state = json['state'];
    pincode = json['pincode'];
    country = json['country'];
    latitude = json['latitude'];
    longitude = json['longitude'];
    clientIp = json['client_ip'];
    device = json['device'];
    createdAt = json['created_at'];
    updatedAt = json['updated_at'];
  }

  Map<String, String> toJson() {
    final Map<String, String> data = new Map<String, String>();
    data['id'] = this.id.toString();
    data['client_id'] = this.clientId.toString();
    data['perpose'] = this.perpose;
    data['details'] = this.details;
    data['when'] = this.when;
    data['accepted_by'] = this.acceptedBy.toString();
    data['name'] = this.name;
    data['mobile'] = this.mobile;
    data['email'] = this.email;
    data['org_name'] = this.orgName;
    data['address'] = this.address;
    data['city'] = this.city;
    data['state'] = this.state;
    data['pincode'] = this.pincode;
    data['country'] = this.country;
    data['latitude'] = this.latitude;
    data['longitude'] = this.longitude;
    data['client_ip'] = this.clientIp;
    data['device'] = this.device;
    data['created_at'] = this.createdAt;
    data['updated_at'] = this.updatedAt;
    return data;
  }
}

class Visits {
  int id;
  int panditActivityId;
  int panditId;
  String checkIn;
  String checkOut;
  String createdAt;
  String updatedAt;

  Visits(
      {this.id,
      this.panditActivityId,
      this.panditId,
      this.checkIn,
      this.checkOut,
      this.createdAt,
      this.updatedAt});

  Visits.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    panditActivityId = json['pandit_activity_id'];
    panditId = json['pandit_id'];
    checkIn = json['checkIn'];
    checkOut = json['checkOut'];
    createdAt = json['created_at'];
    updatedAt = json['updated_at'];
  }

  Map<String, String> toJson() {
    final Map<String, String> data = new Map<String, String>();
    data['id'] = this.id.toString();
    data['pandit_activity_id'] = this.panditActivityId.toString();
    data['pandit_id'] = this.panditId.toString();
    data['checkIn'] = this.checkIn;
    data['checkOut'] = this.checkOut;
    data['created_at'] = this.createdAt;
    data['updated_at'] = this.updatedAt;
    return data;
  }
}

class Payments {
  int id;
  int panditId;
  String details;
  String mode;
  String creditAmt;
  String debitAmt;
  String createdAt;
  String updatedAt;

  Payments(
      {this.id,
      this.panditId,
      this.details,
      this.mode,
      this.creditAmt,
      this.debitAmt,
      this.createdAt,
      this.updatedAt});

  Payments.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    panditId = json['pandit_id'];
    details = json['details'];
    mode = json['mode'];
    creditAmt = json['credit_amt'].toString();
    debitAmt = json['debit_amt'].toString();
    createdAt = json['created_at'];
    updatedAt = json['updated_at'];
  }

  Map<String, String> toJson() {
    final Map<String, String> data = new Map<String, String>();
    data['id'] = this.id.toString();
    data['pandit_id'] = this.panditId.toString();
    data['details'] = this.details;
    data['mode'] = this.mode;
    data['credit_amt'] = this.creditAmt;
    data['debit_amt'] = this.debitAmt;
    data['created_at'] = this.createdAt;
    data['updated_at'] = this.updatedAt;
    return data;
  }
}