- Created CMakeLists.txt for Flutter and runner components. - Implemented resource script (Runner.rc) for application metadata. - Developed main entry point (main.cpp) for the Windows application. - Added FlutterWindow class to manage the Flutter view within a Win32 window. - Implemented utility functions for console management and command line argument parsing. - Established Win32Window class for high DPI-aware window handling. - Included application icon and manifest for proper Windows integration. - Set up build configurations and dependencies for the Flutter application on Windows.
38 lines
1.1 KiB
Dart
38 lines
1.1 KiB
Dart
class AttendanceModel {
|
|
final int id;
|
|
final String name;
|
|
final String projectAddress;
|
|
final String contactPerson;
|
|
final DateTime startDate;
|
|
final DateTime endDate;
|
|
final int teamSize;
|
|
final int completedWork;
|
|
final int plannedWork;
|
|
|
|
AttendanceModel({
|
|
required this.id,
|
|
required this.name,
|
|
required this.projectAddress,
|
|
required this.contactPerson,
|
|
required this.startDate,
|
|
required this.endDate,
|
|
required this.teamSize,
|
|
required this.completedWork,
|
|
required this.plannedWork,
|
|
});
|
|
|
|
factory AttendanceModel.fromJson(Map<String, dynamic> json) {
|
|
return AttendanceModel(
|
|
id: int.tryParse(json['id'].toString()) ?? 0,
|
|
name: json['name'] ?? '',
|
|
projectAddress: json['projectAddress'] ?? '',
|
|
contactPerson: json['contactPerson'] ?? '',
|
|
startDate: DateTime.tryParse(json['startDate'].toString()) ?? DateTime.now(),
|
|
endDate: DateTime.tryParse(json['endDate'].toString()) ?? DateTime.now(),
|
|
teamSize: int.tryParse(json['teamSize'].toString()) ?? 0,
|
|
completedWork: int.tryParse(json['completedWork'].toString()) ?? 0,
|
|
plannedWork: int.tryParse(json['plannedWork'].toString()) ?? 0,
|
|
);
|
|
}
|
|
}
|