From dcb7e389eb729a46211e37a6e09e14c548248f93 Mon Sep 17 00:00:00 2001 From: 21pages Date: Sat, 23 Mar 2024 10:10:22 +0800 Subject: [PATCH] opt sytle of ab name (#7484) Signed-off-by: 21pages --- flutter/lib/common/widgets/address_book.dart | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/flutter/lib/common/widgets/address_book.dart b/flutter/lib/common/widgets/address_book.dart index ce0278868..c5d65ed6f 100644 --- a/flutter/lib/common/widgets/address_book.dart +++ b/flutter/lib/common/widgets/address_book.dart @@ -1,6 +1,5 @@ import 'dart:math'; -import 'package:auto_size_text/auto_size_text.dart'; import 'package:dropdown_button2/dropdown_button2.dart'; import 'package:dynamic_layouts/dynamic_layouts.dart'; import 'package:flutter/material.dart'; @@ -200,6 +199,12 @@ class _AddressBookState extends State { bind.setLocalFlutterOption(k: 'current-ab-name', v: value); } }, + underline: Container( + height: 0.7, + color: Theme.of(context).dividerColor.withOpacity(0.1), + ), + buttonStyleData: ButtonStyleData(height: 48), + menuItemStyleData: MenuItemStyleData(height: 36), items: names .map((e) => DropdownMenuItem( value: e, @@ -209,9 +214,11 @@ class _AddressBookState extends State { child: Tooltip( waitDuration: Duration(milliseconds: 500), message: gFFI.abModel.translatedName(e), - child: AutoSizeText( + child: Text( gFFI.abModel.translatedName(e), - maxFontSize: 14, + style: TextStyle(fontSize: 14.0), + maxLines: 1, + overflow: TextOverflow.ellipsis, )), ), ],