From 5e786a9668ff57ba216e9037922f5a9ca9d439a7 Mon Sep 17 00:00:00 2001 From: RikitoNoto <56541594+RikitoNoto@users.noreply.github.com> Date: Mon, 7 Aug 2023 22:35:42 +0900 Subject: [PATCH 1/3] =?UTF-8?q?#108=20web=20link=E3=82=A6=E3=82=A3?= =?UTF-8?q?=E3=82=B8=E3=82=A7=E3=83=83=E3=83=88=E3=81=AB=E6=9C=80=E5=A4=A7?= =?UTF-8?q?=E8=A1=8C=E6=95=B0=E3=81=AE=E3=83=91=E3=83=A9=E3=83=A1=E3=83=BC?= =?UTF-8?q?=E3=82=BF=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/dart_flutter_common/lib/src/widgets/web_link.dart | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/dart_flutter_common/lib/src/widgets/web_link.dart b/packages/dart_flutter_common/lib/src/widgets/web_link.dart index 2a18ada5..0c655d81 100644 --- a/packages/dart_flutter_common/lib/src/widgets/web_link.dart +++ b/packages/dart_flutter_common/lib/src/widgets/web_link.dart @@ -17,6 +17,7 @@ class WebLink extends StatelessWidget { this.textStyle, this.linkStyle, this.onFailLaunch, + this.maxLines, super.key, }); @@ -34,6 +35,9 @@ class WebLink extends StatelessWidget { /// [urlText]のurl部分のスタイル final TextStyle? linkStyle; + /// urlの表示最大行数 + final int? maxLines; + /// リンク遷移が失敗した場合のコールバック final void Function(String url)? onFailLaunch; @@ -48,6 +52,7 @@ class WebLink extends StatelessWidget { onFailLaunch?.call(link.url); } }, + maxLines: maxLines, text: urlText, style: textStyle, linkStyle: linkStyle, From 660f5cd5285caa22bab9b4164b4f93350da5f9a3 Mon Sep 17 00:00:00 2001 From: RikitoNoto <56541594+RikitoNoto@users.noreply.github.com> Date: Mon, 7 Aug 2023 22:36:06 +0900 Subject: [PATCH 2/3] =?UTF-8?q?#108=20=E4=BB=95=E4=BA=8B=E8=A9=B3=E7=B4=B0?= =?UTF-8?q?=E7=94=BB=E9=9D=A2=E3=81=AE=E3=83=AA=E3=83=B3=E3=82=AF=E3=82=92?= =?UTF-8?q?WebLink=E3=82=A6=E3=82=A3=E3=82=B8=E3=82=A7=E3=83=83=E3=83=88?= =?UTF-8?q?=E3=81=AB=E7=BD=AE=E3=81=8D=E6=8F=9B=E3=81=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/job/ui/job_detail.dart | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/packages/mottai_flutter_app/lib/job/ui/job_detail.dart b/packages/mottai_flutter_app/lib/job/ui/job_detail.dart index 89f2c6ea..34fb70f4 100644 --- a/packages/mottai_flutter_app/lib/job/ui/job_detail.dart +++ b/packages/mottai_flutter_app/lib/job/ui/job_detail.dart @@ -184,12 +184,22 @@ class _JobDetail extends ConsumerWidget { titleStyle: Theme.of(context).textTheme.headlineMedium, sectionPadding: const EdgeInsets.only(bottom: 32), content: Column( - //TODO: リンクウィジェットにする。 + crossAxisAlignment: CrossAxisAlignment.start, children: readHost.urls .map( - (url) => Text( - url, - style: Theme.of(context).textTheme.bodyLarge, + (url) => WebLink( + urlText: url, + mode: LaunchMode.externalApplication, + linkStyle: Theme.of(context) + .textTheme + .bodyLarge + ?.copyWith( + color: Colors.blue, + decoration: TextDecoration.underline, + decorationColor: Colors.blue, + ), + textStyle: Theme.of(context).textTheme.bodyLarge, + maxLines: 1, ), ) .toList(), From 96e27324d89724b5f017ecbadf68299581ae2d9e Mon Sep 17 00:00:00 2001 From: RikitoNoto <56541594+RikitoNoto@users.noreply.github.com> Date: Mon, 7 Aug 2023 22:50:07 +0900 Subject: [PATCH 3/3] =?UTF-8?q?#108=20pubspec.yaml=E3=81=AE=E3=82=BD?= =?UTF-8?q?=E3=83=BC=E3=83=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/mottai_flutter_app/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mottai_flutter_app/pubspec.yaml b/packages/mottai_flutter_app/pubspec.yaml index 18bfd21a..973b3de8 100644 --- a/packages/mottai_flutter_app/pubspec.yaml +++ b/packages/mottai_flutter_app/pubspec.yaml @@ -9,10 +9,10 @@ environment: dependencies: auto_route: ^7.7.0 cached_network_image: ^3.2.3 - cloud_functions: ^4.3.4 # TODO: mottai_flutter_app で geoflutterfire_plus の DocumentSnapshot 型を使用する # 必要がなくなるようにリファクタする or geoflutterfire_plus 自体を改善する。 cloud_firestore: ^4.8.4 + cloud_functions: ^4.3.4 crypto: ^3.0.3 dart_flutter_common: path: ../dart_flutter_common