Add board service and repository, update routes and assets
- 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.
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
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);
|
||||
}
|
||||
Reference in New Issue
Block a user