-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#157 感想投稿ページの実装 #201
base: main
Are you sure you want to change the base?
#157 感想投稿ページの実装 #201
Conversation
imageFile: pickedImageFile, | ||
); | ||
} | ||
//TODO: 登録 or 更新完了の旨をユーザーに示すUIが必要か? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
現状だと、登録 or 更新完了した際に何もアクションがないので、ユーザーに何かしら通知する
といった対応が必要かと思うのですが、これは別issueで対応でも良さそうでしょうか?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@haterain0203 ありがとうございます!いったん OK です!たんに SnackBar を出せば良さそうかなと思います!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kosukesaigusa
ありがとうございます!
承知しました!
一旦このままとしておきます!
} | ||
} | ||
|
||
//TODO JobForm で使用しているものと同様のため、dart_flutter_common で共通化すべきか? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
上記について、
こういった場合は、dart_flutter_common で共通化すべきですかね?
それとも、mottai_flutter_app 内のどこかで共通化すべきですか??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mottai_flutter_app で共通化できればしたいです!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kosukesaigusa
ありがとうございます!
mottai_flutter_app で共通化してみます!
出来次第またレビュー依頼させていただきます!
final asyncValue = ref.watch(reviewFutureProvider(reviewId)); | ||
final review = asyncValue.valueOrNull; | ||
final isLoading = asyncValue.isLoading; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
更新時はパスパラメータの reviewId
を使って該当の Review
を取得していますが、
更新する場合、前の画面ですでに Review
を取得済みの場合が多いかと思うので、Review
ごと渡すことで都度の取得処理が不要になる?かと思ったのですが、どうでしょうか・・・?
(そもそもauto_routeでそういったことができないかもですが)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
インスタンスごと渡すという考え方ですね!読み取り回数を減らすという意味ではいいアイディアですし、実際にそうするプロジェクトもよくあると思います!が、
- 一応ここで明示的に取得することで最新であることを担保する
- このページは関係ないですが、auto_route を使ってどんな画面にもパスパラメータ、クエリパラメータで必要な情報とともに遷移できるようにしているので、プッシュ通知をタップして特定の画面に飛びたい時(つまり Dart のインスタンスは渡せない)や、Flutter Web で URL を直接入力して特定の画面を開きたい時(同じく Dart のインスタンスは渡せない)にも対応できるようにする方針で統一している
という理由でこれでいいと思います!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kosukesaigusa
なるほど!勉強になりました!
ありがとうございます!
imageFile: pickedImageFile, | ||
); | ||
} | ||
//TODO: 登録 or 更新完了の旨をユーザーに示すUIが必要か? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@haterain0203 ありがとうございます!いったん OK です!たんに SnackBar を出せば良さそうかなと思います!
|
||
class ReviewFormState extends ConsumerState<ReviewForm> { | ||
/// フォームのグローバルキー | ||
final formKey = GlobalKey<FormState>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Job などを参考にしていただいたと思うのですが、簡便化のために辞める予定です!いまはこのままでいいです!
final asyncValue = ref.watch(reviewFutureProvider(reviewId)); | ||
final review = asyncValue.valueOrNull; | ||
final isLoading = asyncValue.isLoading; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
インスタンスごと渡すという考え方ですね!読み取り回数を減らすという意味ではいいアイディアですし、実際にそうするプロジェクトもよくあると思います!が、
- 一応ここで明示的に取得することで最新であることを担保する
- このページは関係ないですが、auto_route を使ってどんな画面にもパスパラメータ、クエリパラメータで必要な情報とともに遷移できるようにしているので、プッシュ通知をタップして特定の画面に飛びたい時(つまり Dart のインスタンスは渡せない)や、Flutter Web で URL を直接入力して特定の画面を開きたい時(同じく Dart のインスタンスは渡せない)にも対応できるようにする方針で統一している
という理由でこれでいいと思います!
Issue
close #157
説明
job
の投稿画面および実装を参考にしました!UI
投稿画面
更新画面
その他
チェックリスト