-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feedpage tableViewスクロールキーボードが隠れるようにする、検索結果0件の状態でテキストフィールドを空にしてPullToRefreshする #48
Conversation
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.
気になる点コメントしましたが、今回修正の必要はございませんので、今後の実装に活かしてください!
LGTMです!
onTap: () { | ||
FocusScope.of(context).unfocus(); // タップでキーボードを閉じる | ||
}, |
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.
👍
child: NotificationListener<ScrollNotification>( | ||
onNotification: (scrollNotification) { | ||
if (scrollNotification is ScrollStartNotification) { | ||
FocusScope.of(context).unfocus(); // スクロール開始でキーボードを閉じる | ||
} | ||
return false; | ||
}, |
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.
この実装だと、ユーザーは何が起きたのか把握しづらいので、RefreshIndicator等のウィジェットを使ってpull to refreshのUIを表示してください!
今回修正の必要はありませんが、表示するかしないかでだいぶUX変わると思います!
return const Center( | ||
child: Column( | ||
children: [ | ||
SizedBox(height: 228), | ||
Text( | ||
'検索にマッチする記事はありませんでした', | ||
style: AppTextStyles.h2BasicBlack, | ||
), | ||
SizedBox(height: 18), | ||
Text( | ||
'検索条件を変えるなどして再度検索をしてください', | ||
style: AppTextStyles.h3BasicSecondary, | ||
) | ||
], | ||
), |
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.
インデントが深くなっているので、UIコンポーネントとして切り分けるといいかもしれませんね!
ここも今回修正の必要はありません。
if (accessToken == null || accessToken.isEmpty) { | ||
debugPrint('Access token is null or empty'); | ||
throw Exception('No access token found'); | ||
} | ||
return accessToken; | ||
return accessToken ?? ''; // アクセストークンがなければ空文字を返す |
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.
ご存じだとは思いますし、今回修正の必要はありませんが、ここは僕も空の文字列よりnullを返す方がいいかもしれないです!
#47 (comment)
概要
tableViewスクロールキーボードが隠れるようにする、検索結果0件の状態でテキストフィールドを空にしてPullToRefreshする
CLIENT_IDとCLIENT_SECRET
https://drive.google.com/file/d/1eDe853r65nVN0CZR-UD7GrW_24_RE6Sk/view?usp=drive_link
実装した内容
tableViewスクロールキーボードが隠れるようにする、検索結果0件の状態でテキストフィールドを空にしてPullToRefreshする
UI
RPReplay_Final1715852465.MP4
動作確認
RPReplay_Final1715866027.MP4
参考
その他