This repository was archived by the owner on Feb 22, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +27
-1
lines changed Expand file tree Collapse file tree 2 files changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -2150,7 +2150,7 @@ class _InputDecoratorState extends State<InputDecorator> with TickerProviderStat
21502150 hintText,
21512151 style: hintStyle,
21522152 textDirection: decoration.hintTextDirection,
2153- overflow: TextOverflow .ellipsis,
2153+ overflow: hintStyle.overflow ?? TextOverflow .ellipsis,
21542154 textAlign: textAlign,
21552155 maxLines: decoration.hintMaxLines,
21562156 ),
Original file line number Diff line number Diff line change @@ -6050,7 +6050,33 @@ void main() {
60506050 await tester.pumpWidget (buildFrame (true ));
60516051 await tester.pumpAndSettle ();
60526052 expect (tester.getTopLeft (find.text ('label' )).dy, useMaterial3 ? - 4.75 : - 5.5 );
6053+ });
6054+
6055+ testWidgets ('hint style overflow works' , (WidgetTester tester) async {
6056+ final String hintText = 'hint text' * 20 ;
6057+ const TextStyle hintStyle = TextStyle (
6058+ fontFamily: 'Ahem' ,
6059+ fontSize: 14.0 ,
6060+ overflow: TextOverflow .fade,
6061+ );
6062+ final InputDecoration decoration = InputDecoration (
6063+ hintText: hintText,
6064+ hintStyle: hintStyle,
6065+ );
6066+
6067+ await tester.pumpWidget (
6068+ buildInputDecorator (
6069+ useMaterial3: useMaterial3,
6070+ // isEmpty: false (default)
6071+ // isFocused: false (default)
6072+ decoration: decoration,
6073+ ),
6074+ );
6075+ await tester.pumpAndSettle ();
60536076
6077+ final Finder hintTextFinder = find.text (hintText);
6078+ final Text hintTextWidget = tester.widget (hintTextFinder);
6079+ expect (hintTextWidget.style! .overflow, decoration.hintStyle! .overflow);
60546080 });
60556081}
60566082}
You can’t perform that action at this time.
0 commit comments