@@ -374,13 +374,13 @@ class _ContentInput extends StatefulWidget {
374
374
required this .narrow,
375
375
required this .destination,
376
376
required this .controller,
377
- required this .hintText ,
377
+ required this .hint ,
378
378
});
379
379
380
380
final Narrow narrow;
381
381
final SendableNarrow destination;
382
382
final ComposeBoxController controller;
383
- final String hintText ;
383
+ final Widget hint ;
384
384
385
385
@override
386
386
State <_ContentInput > createState () => _ContentInputState ();
@@ -487,6 +487,10 @@ class _ContentInputState extends State<_ContentInput> with WidgetsBindingObserve
487
487
@override
488
488
Widget build (BuildContext context) {
489
489
final designVariables = DesignVariables .of (context);
490
+ final contentTextStyle = TextStyle (
491
+ fontSize: _fontSize,
492
+ height: _lineHeightRatio,
493
+ color: designVariables.textInput);
490
494
491
495
return ComposeAutocomplete (
492
496
narrow: widget.narrow,
@@ -505,10 +509,7 @@ class _ContentInputState extends State<_ContentInput> with WidgetsBindingObserve
505
509
// Let the content show through the `contentPadding` so that
506
510
// our [InsetShadowBox] can fade it smoothly there.
507
511
clipBehavior: Clip .none,
508
- style: TextStyle (
509
- fontSize: _fontSize,
510
- height: _lineHeightRatio,
511
- color: designVariables.textInput),
512
+ style: contentTextStyle,
512
513
// From the spec at
513
514
// https://www.figma.com/design/1JTNtYo9memgW7vV6d0ygq/Zulip-Mobile?node-id=3960-5147&node-type=text&m=dev
514
515
// > Compose box has the height to fit 2 lines. This is [done] to
@@ -527,9 +528,10 @@ class _ContentInputState extends State<_ContentInput> with WidgetsBindingObserve
527
528
// that 54px distance while also making the scrolling work like
528
529
// this and offering two lines of touchable area.
529
530
contentPadding: const EdgeInsets .symmetric (vertical: _verticalPadding),
530
- hintText: widget.hintText,
531
- hintStyle: TextStyle (
532
- color: designVariables.textInput.withFadedAlpha (0.5 ))))))));
531
+ hint: DefaultTextStyle .merge (
532
+ style: contentTextStyle.copyWith (
533
+ color: designVariables.textInput.withFadedAlpha (0.5 )),
534
+ child: widget.hint)))))));
533
535
}
534
536
}
535
537
@@ -586,8 +588,8 @@ class _StreamContentInputState extends State<_StreamContentInput> {
586
588
narrow: widget.narrow,
587
589
destination: TopicNarrow (widget.narrow.streamId, topic),
588
590
controller: widget.controller,
589
- hintText : zulipLocalizations.composeBoxChannelContentHint (
590
- streamName, topic.displayName));
591
+ hint : Text ( zulipLocalizations.composeBoxChannelContentHint (
592
+ streamName, topic.displayName))) ;
591
593
}
592
594
}
593
595
@@ -668,7 +670,7 @@ class _FixedDestinationContentInput extends StatelessWidget {
668
670
narrow: narrow,
669
671
destination: narrow,
670
672
controller: controller,
671
- hintText : _hintText (context));
673
+ hint : Text ( _hintText (context) ));
672
674
}
673
675
}
674
676
0 commit comments