22 lines
456 B
Dart
22 lines
456 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
class Owner extends ChangeNotifier {
|
|
Owner({
|
|
required this.firstName,
|
|
required this.lastName,
|
|
required this.contact,
|
|
required this.id,
|
|
});
|
|
|
|
String firstName;
|
|
String lastName;
|
|
String contact;
|
|
int id;
|
|
|
|
factory Owner.fromJSON(Map<String, dynamic> json) => Owner(
|
|
contact: json["contact"],
|
|
firstName: json["first_name"],
|
|
lastName: json["last_name"],
|
|
id: json["id"],
|
|
);
|
|
}
|