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
Add profile share. #252
Add profile share. #252
Conversation
@FlutterKaigi/conference-app-2023 |
@@ -1,3 +1,4 @@ | |||
org.gradle.jvmargs=-Xmx1536M | |||
android.useAndroidX=true | |||
android.enableJetifier=true | |||
dev.steenbakker.mobile_scanner.useUnbundled=true |
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.
pubspec.yaml
Outdated
@@ -36,6 +36,7 @@ dependencies: | |||
|
|||
adaptive_dialog: ^1.9.0-0 | |||
auto_size_text: ^3.0.0 | |||
mobile_scanner: ^3.0.0 |
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.
image_pickerの次の行に追加でどうでしょう。
@override | ||
Widget build(BuildContext context, GoRouterState state) { | ||
return const ScanCodePage(); | ||
} |
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.
@override
Page<void> buildPage(BuildContext context, GoRouterState state) {
return MaterialPage(
key: state.pageKey,
child: const ScanCodePage(),
fullscreenDialog: true,
);
}
こちらのコードに書き換えて、iOSだとmodalとして下から開くようになります。
また、自動的にBackButton
がCloseButton
に置き換わります。こちらの方が意図通りかなと。
TargetPlatform.android || TargetPlatform.iOS => true, | ||
_ => false, | ||
}; | ||
final canReadQrCode = id != null && name.isNotEmpty; |
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.
nameの入力後、キーボード上で done
をしないと、値が切り替わらない状態になっていました。
onChange
をある程度監視するか、submit
的なボタンを用意した方が良さそうです。
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.
これはある程度意図的でした。onChange
だと文字を入力するたびにQRコードが変化したりセクション自体が消えたりするのでUIに変化がありすぎるかなと思ってます。
} else { | ||
final imageUrl = ref.watch(imageDownloadUrlProvider(url)); | ||
image = switch (imageUrl) { | ||
AsyncData(value: final value) => value.isEmpty |
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.
isNotEmpty
の方が自然な気がします。
Profile画面でQRを出した際、スクロール時に若干フレームが落ちてますね。Androidだと注意深く見ると気になる程度、iOSだとスクロールのfpsが足りてないのがぱっと見でわかる程度です。なんでだろう。 |
Commented by GitHub Bot PR: #252 |
Description
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Checklist
flutter format lib
.dart fix --apply lib
.