@@ -486,7 +486,7 @@ class _TypingNotifierState extends State<_TypingNotifier> with WidgetsBindingObs
486
486
Widget build (BuildContext context) => widget.child;
487
487
}
488
488
489
- class _ContentInput extends StatefulWidget {
489
+ class _ContentInput extends StatelessWidget {
490
490
const _ContentInput ({
491
491
required this .narrow,
492
492
required this .controller,
@@ -497,11 +497,6 @@ class _ContentInput extends StatefulWidget {
497
497
final ComposeBoxController controller;
498
498
final String hintText;
499
499
500
- @override
501
- State <StatefulWidget > createState () => _ContentInputState ();
502
- }
503
-
504
- class _ContentInputState <T extends _ContentInput > extends State <T > {
505
500
static double maxHeight (BuildContext context) {
506
501
final clampingTextScaler = MediaQuery .textScalerOf (context)
507
502
.clamp (maxScaleFactor: 1.5 );
@@ -532,9 +527,9 @@ class _ContentInputState<T extends _ContentInput> extends State<T> {
532
527
final designVariables = DesignVariables .of (context);
533
528
534
529
return ComposeAutocomplete (
535
- narrow: widget. narrow,
536
- controller: widget. controller.content,
537
- focusNode: widget. controller.contentFocusNode,
530
+ narrow: narrow,
531
+ controller: controller.content,
532
+ focusNode: controller.contentFocusNode,
538
533
fieldViewBuilder: (context) => ConstrainedBox (
539
534
constraints: BoxConstraints (maxHeight: maxHeight (context)),
540
535
// This [ClipRect] replaces the [TextField] clipping we disable below.
@@ -543,8 +538,8 @@ class _ContentInputState<T extends _ContentInput> extends State<T> {
543
538
top: _verticalPadding, bottom: _verticalPadding,
544
539
color: designVariables.composeBoxBg,
545
540
child: TextField (
546
- controller: widget. controller.content,
547
- focusNode: widget. controller.contentFocusNode,
541
+ controller: controller.content,
542
+ focusNode: controller.contentFocusNode,
548
543
// Let the content show through the `contentPadding` so that
549
544
// our [InsetShadowBox] can fade it smoothly there.
550
545
clipBehavior: Clip .none,
@@ -570,7 +565,7 @@ class _ContentInputState<T extends _ContentInput> extends State<T> {
570
565
// that 54px distance while also making the scrolling work like
571
566
// this and offering two lines of touchable area.
572
567
contentPadding: const EdgeInsets .symmetric (vertical: _verticalPadding),
573
- hintText: widget. hintText,
568
+ hintText: hintText,
574
569
hintStyle: TextStyle (
575
570
color: designVariables.textInput.withFadedAlpha (0.5 ))))))));
576
571
}
0 commit comments