-
Notifications
You must be signed in to change notification settings - Fork 28
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
Implements sessions screen. #165
Conversation
} | ||
|
||
extension LocaleTextEx on LocaleText { | ||
String get(Locale locale) => switch (locale.languageCode) { |
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.
👍
lib/ui/screen/sessions/sessions.dart
Outdated
|
||
return SelectionContainer.disabled( | ||
child: ListView( | ||
padding: const EdgeInsets.symmetric(vertical: 16), |
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.
dartfmtが現時点で対応できていないので、個別にチェックになってしまうのですが、trailing commaを入れてもらっても良いでしょうか 🙏
ref dart-lang/dart_style#1253
また、 horizontal
に context.spacing
を入れてもらえると、他のページと揃ったmarginがある程度入るようになるかなと思います。
lib/ui/screen/sessions/sessions.dart
Outdated
], | ||
onSelectionChanged: (rooms) { | ||
if (rooms.isEmpty) return; | ||
ref.read(selectedRoomProvider.notifier).update(rooms.first); |
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.
ページ内に閉じる状態管理であれば、ConsumerStatefulWidget
で対応してもいいかもしれないです 🤔
この辺りは、tabの状態をURLと紐づけるかどうかで検討していただければ、と言う感じです! (仕様を考えましたが、SegmentedButtonで管理する場合には、どちらでもいいかなと思いました)
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.
それで言うと、むしろURLベースにして ?room=1
とかクエリパラメータで飛べるようにするのもありかなと思ったんですがどうですか?
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.
ありだと思います!
lib/ui/screen/sessions/sessions.dart
Outdated
} | ||
|
||
class _SessionSection extends ConsumerWidget { | ||
const _SessionSection({super.key, required this.session}); |
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.
半ばanalyzerのご検知のようなのですが、未使用で参照していないことは明らか(private classのため)なので、super.key
は削除で良さそうに思います。
_ => null, | ||
}; | ||
|
||
return Card( |
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.
outline style 👍
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!
よければ、suggestをadd suggestion to batch
でまとめて追加しておいていただけますと 🙏
Co-authored-by: Koji Wakamiya <koji.wakamiya@gmail.com>
Commented by GitHub Bot PR: #165 |
Description
Fixes #17
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Checklist
flutter format lib
.dart fix --apply lib
.