mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-20 03:06:59 +08:00
handle relation url
Closes #1566 Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
34
lib/common/widgets/button/more_btn.dart
Normal file
34
lib/common/widgets/button/more_btn.dart
Normal file
@@ -0,0 +1,34 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
Widget moreTextButton({
|
||||
String text = '查看更多',
|
||||
required VoidCallback onTap,
|
||||
EdgeInsets? padding,
|
||||
Color? color,
|
||||
}) {
|
||||
Widget child = Text.rich(
|
||||
style: TextStyle(color: color, height: 1),
|
||||
strutStyle: const StrutStyle(leading: 0, height: 1),
|
||||
TextSpan(
|
||||
children: [
|
||||
TextSpan(text: text),
|
||||
WidgetSpan(
|
||||
alignment: PlaceholderAlignment.middle,
|
||||
child: Icon(
|
||||
size: 22,
|
||||
color: color,
|
||||
Icons.keyboard_arrow_right,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
if (padding != null) {
|
||||
child = Padding(padding: padding, child: child);
|
||||
}
|
||||
return GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: onTap,
|
||||
child: child,
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user