-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #105 from seigi0714/feature/trip_belonging_page
持ち物一覧タブの処理実装
- Loading branch information
Showing
24 changed files
with
626 additions
and
82 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
lib/features/trips/controller/trip_belonging_controller.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import 'package:riverpod_annotation/riverpod_annotation.dart'; | ||
import 'package:trip_app_nativeapp/features/trips/domain/entity/trip/trip_belonging.dart'; | ||
import 'package:trip_app_nativeapp/features/trips/domain/interactor/trip_interactor.dart'; | ||
|
||
part 'trip_belonging_controller.g.dart'; | ||
|
||
@riverpod | ||
class TripBelongingsController extends _$TripBelongingsController { | ||
@override | ||
FutureOr<List<AddedTripBelonging>> build({required int tripId}) async { | ||
return ref | ||
.read(tripInteractorProvider) | ||
.fetchTripBelongings(tripId); | ||
} | ||
} |
131 changes: 131 additions & 0 deletions
131
lib/features/trips/controller/trip_belonging_controller.g.dart
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
17 changes: 0 additions & 17 deletions
17
lib/features/trips/data/models/add_trip_belonging_response.dart
This file was deleted.
Oops, something went wrong.
15 changes: 15 additions & 0 deletions
15
lib/features/trips/data/models/fetch_trip_belongings_response.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import 'package:freezed_annotation/freezed_annotation.dart'; | ||
import 'package:trip_app_nativeapp/features/trips/data/models/trip_belonging_response.dart'; | ||
|
||
part 'fetch_trip_belongings_response.freezed.dart'; | ||
part 'fetch_trip_belongings_response.g.dart'; | ||
|
||
@freezed | ||
class FetchTripBelongingsResponse with _$FetchTripBelongingsResponse { | ||
const factory FetchTripBelongingsResponse({ | ||
required List<TripBelongingResponse> items, | ||
}) = _FetchTripBelongingsResponse; | ||
|
||
factory FetchTripBelongingsResponse.fromJson(Map<String, dynamic> json) => | ||
_$FetchTripBelongingsResponseFromJson(json); | ||
} |
170 changes: 170 additions & 0 deletions
170
lib/features/trips/data/models/fetch_trip_belongings_response.freezed.dart
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
33 changes: 33 additions & 0 deletions
33
lib/features/trips/data/models/fetch_trip_belongings_response.g.dart
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.