@@ -458,7 +458,7 @@ class _ContentInputNoTypingNotifier extends _ContentInput {
458
458
State <_ContentInput > createState () => _ContentInputStateNoTypingNotifier ();
459
459
}
460
460
461
- class _ContentInputStateBase extends State <_ContentInput > {
461
+ class _ContentInputStateBase < T extends _ContentInput > extends State <T > {
462
462
static double maxHeight (BuildContext context) {
463
463
final clampingTextScaler = MediaQuery .textScalerOf (context)
464
464
.clamp (maxScaleFactor: 1.5 );
@@ -534,10 +534,7 @@ class _ContentInputStateBase extends State<_ContentInput> {
534
534
}
535
535
536
536
537
- class _ContentInputStateWithTypingNotifier extends _ContentInputStateBase with WidgetsBindingObserver , _TypingNotifierMixin {}
538
- class _ContentInputStateNoTypingNotifier extends _ContentInputStateBase {}
539
-
540
- mixin _TypingNotifierMixin on State <_ContentInput >, WidgetsBindingObserver {
537
+ class _ContentInputStateWithTypingNotifier extends _ContentInputStateBase <_ContentInputWithTypingNotifier > with WidgetsBindingObserver {
541
538
@override
542
539
void initState () {
543
540
super .initState ();
@@ -547,7 +544,7 @@ mixin _TypingNotifierMixin on State<_ContentInput>, WidgetsBindingObserver {
547
544
}
548
545
549
546
@override
550
- void didUpdateWidget (covariant _ContentInput oldWidget) {
547
+ void didUpdateWidget (covariant _ContentInputWithTypingNotifier oldWidget) {
551
548
super .didUpdateWidget (oldWidget);
552
549
if (widget.controller != oldWidget.controller) {
553
550
oldWidget.controller.content.removeListener (_contentChanged);
@@ -611,6 +608,8 @@ mixin _TypingNotifierMixin on State<_ContentInput>, WidgetsBindingObserver {
611
608
}
612
609
}
613
610
611
+ class _ContentInputStateNoTypingNotifier extends _ContentInputStateBase <_ContentInputNoTypingNotifier > {}
612
+
614
613
/// The content input for _StreamComposeBox.
615
614
class _StreamContentInput extends StatefulWidget {
616
615
const _StreamContentInput ({required this .narrow, required this .controller});
0 commit comments