abf1cc3f7d
- Introduced BoardService and BoardRepository for managing board-related data. - Updated app routes to reflect the new board screen structure. - Added new board-related assets to the asset manager. - Refactored BoardScreen navigation to utilize the new provider structure.
35 lines
889 B
Dart
35 lines
889 B
Dart
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
|
|
import '../error/error_model.dart';
|
|
|
|
part 'board_response.freezed.dart';
|
|
part 'board_response.g.dart';
|
|
|
|
@freezed
|
|
abstract class BoardResponse with _$BoardResponse {
|
|
const factory BoardResponse({
|
|
required bool? success,
|
|
required String? message,
|
|
required List<BoardData>? data,
|
|
required ErrorModel? error,
|
|
}) = _BoardResponse;
|
|
|
|
factory BoardResponse.fromJson(Map<String, Object?> json) =>
|
|
_$BoardResponseFromJson(json);
|
|
}
|
|
|
|
@freezed
|
|
abstract class BoardData with _$BoardData {
|
|
const factory BoardData({
|
|
required String? id,
|
|
required String? description,
|
|
required DateTime? deadline,
|
|
required String? assignedTo,
|
|
required bool? isReady,
|
|
required String? status,
|
|
}) = _BoardData;
|
|
|
|
factory BoardData.fromJson(Map<String, Object?> json) =>
|
|
_$BoardDataFromJson(json);
|
|
}
|