文字边界

This commit is contained in:
2026-03-05 11:20:14 +08:00
parent fe44848529
commit 02e1946319

View File

@@ -78,12 +78,16 @@ class ReservationPage extends GetView<ReservationController> {
children: [ children: [
Row( Row(
children: [ children: [
Text( Flexible(
child: Text(
controller.name, controller.name,
style: const TextStyle( style: const TextStyle(
fontSize: 18, fontSize: 18,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
), ),
const SizedBox(width: 8), const SizedBox(width: 8),
_buildStatusTag(), _buildStatusTag(),
@@ -103,7 +107,6 @@ class ReservationPage extends GetView<ReservationController> {
if (scanResult == null) { if (scanResult == null) {
controller.msgNotice(); controller.msgNotice();
} }
}, },
style: IconButton.styleFrom( style: IconButton.styleFrom(
backgroundColor: Colors.grey[100], backgroundColor: Colors.grey[100],
@@ -111,9 +114,7 @@ class ReservationPage extends GetView<ReservationController> {
), ),
icon: Badge( icon: Badge(
smallSize: 8, smallSize: 8,
backgroundColor: controller.isNotice backgroundColor: controller.isNotice ? Colors.red : Colors.transparent,
? Colors.red
: Colors.transparent,
child: const Icon( child: const Icon(
Icons.notifications_outlined, Icons.notifications_outlined,
color: Colors.black87, color: Colors.black87,
@@ -232,14 +233,19 @@ class ReservationPage extends GetView<ReservationController> {
label, label,
style: TextStyle(color: Colors.grey, fontSize: 11.sp), style: TextStyle(color: Colors.grey, fontSize: 11.sp),
), ),
Text( Expanded(
child: Text(
value, value,
textAlign: TextAlign.right,
overflow: TextOverflow.ellipsis,
maxLines: 1,
style: TextStyle( style: TextStyle(
color: Color(0xFF333333), color: const Color(0xFF333333),
fontSize: 12.sp, fontSize: 12.sp,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
), ),
),
], ],
), ),
); );
@@ -515,14 +521,15 @@ class ReservationPage extends GetView<ReservationController> {
style: ElevatedButton.styleFrom( style: ElevatedButton.styleFrom(
backgroundColor: kPrimaryColor, backgroundColor: kPrimaryColor,
minimumSize: const Size(double.infinity, 50), minimumSize: const Size(double.infinity, 50),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)), shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
),
), ),
child: const Text("发送广播", style: TextStyle(color: Colors.white)), child: const Text("发送广播", style: TextStyle(color: Colors.white)),
), ),
), ),
], ],
), ),
], ],
), ),
); );