- Created ExpenseModel, Project, ExpenseType, PaymentMode, PaidBy, CreatedBy, and Status classes for expense management. - Implemented JSON serialization and deserialization for expense models. - Added ExpenseStatusModel and ExpenseTypeModel for handling status and type of expenses. - Introduced PaymentModeModel for managing payment modes. - Refactored ExpenseDetailScreen to utilize the new ExpenseModel structure. - Enhanced UI components for better display of expense details. - Added search and filter functionality in ExpenseMainScreen. - Updated dependencies in pubspec.yaml to include geocoding package.
26 lines
596 B
Dart
26 lines
596 B
Dart
class ExpenseStatusModel {
|
|
final String id;
|
|
final String name;
|
|
final String description;
|
|
final bool isSystem;
|
|
final bool isActive;
|
|
|
|
ExpenseStatusModel({
|
|
required this.id,
|
|
required this.name,
|
|
required this.description,
|
|
required this.isSystem,
|
|
required this.isActive,
|
|
});
|
|
|
|
factory ExpenseStatusModel.fromJson(Map<String, dynamic> json) {
|
|
return ExpenseStatusModel(
|
|
id: json['id'],
|
|
name: json['name'],
|
|
description: json['description'] ?? '',
|
|
isSystem: json['isSystem'] ?? false,
|
|
isActive: json['isActive'] ?? false,
|
|
);
|
|
}
|
|
}
|