Skip to content

Commit

Permalink
#108 web linkウィジェットに最大行数のパラメータを追加
Browse files Browse the repository at this point in the history
  • Loading branch information
RikitoNoto committed Aug 7, 2023
1 parent d26d8b1 commit 5e786a9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/dart_flutter_common/lib/src/widgets/web_link.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class WebLink extends StatelessWidget {
this.textStyle,
this.linkStyle,
this.onFailLaunch,
this.maxLines,
super.key,
});

Expand All @@ -34,6 +35,9 @@ class WebLink extends StatelessWidget {
/// [urlText]のurl部分のスタイル
final TextStyle? linkStyle;

/// urlの表示最大行数
final int? maxLines;

/// リンク遷移が失敗した場合のコールバック
final void Function(String url)? onFailLaunch;

Expand All @@ -48,6 +52,7 @@ class WebLink extends StatelessWidget {
onFailLaunch?.call(link.url);
}
},
maxLines: maxLines,
text: urlText,
style: textStyle,
linkStyle: linkStyle,
Expand Down

0 comments on commit 5e786a9

Please sign in to comment.