@@ -1097,37 +1097,6 @@ abstract class _ComposeBoxBody extends StatelessWidget {
1097
1097
}
1098
1098
}
1099
1099
1100
- sealed class ComposeBoxController {
1101
- ComposeContentController get content => _content;
1102
- final _content = ComposeContentController ();
1103
-
1104
- FocusNode get contentFocusNode => _contentFocusNode;
1105
- final _contentFocusNode = FocusNode ();
1106
-
1107
- @mustCallSuper
1108
- void dispose () {
1109
- _content.dispose ();
1110
- _contentFocusNode.dispose ();
1111
- }
1112
- }
1113
-
1114
- class StreamComposeBoxController extends ComposeBoxController {
1115
- ComposeTopicController get topic => _topic;
1116
- final _topic = ComposeTopicController ();
1117
-
1118
- FocusNode get topicFocusNode => _topicFocusNode;
1119
- final _topicFocusNode = FocusNode ();
1120
-
1121
- @override
1122
- void dispose () {
1123
- _topic.dispose ();
1124
- _topicFocusNode.dispose ();
1125
- super .dispose ();
1126
- }
1127
- }
1128
-
1129
- class FixedDestinationComposeBoxController extends ComposeBoxController {}
1130
-
1131
1100
/// A compose box for use in a channel narrow.
1132
1101
///
1133
1102
/// This offers a text input for the topic to send to,
@@ -1163,27 +1132,6 @@ class _StreamComposeBoxBody extends _ComposeBoxBody {
1163
1132
);
1164
1133
}
1165
1134
1166
- class _ErrorBanner extends StatelessWidget {
1167
- const _ErrorBanner ({required this .label});
1168
-
1169
- final String label;
1170
-
1171
- @override
1172
- Widget build (BuildContext context) {
1173
- final designVariables = DesignVariables .of (context);
1174
- return Container (
1175
- padding: const EdgeInsets .all (8 ),
1176
- decoration: BoxDecoration (
1177
- color: designVariables.errorBannerBackground,
1178
- border: Border .all (color: designVariables.errorBannerBorder),
1179
- borderRadius: BorderRadius .circular (5 )),
1180
- child: Text (label,
1181
- style: TextStyle (fontSize: 18 , color: designVariables.errorBannerLabel),
1182
- ),
1183
- );
1184
- }
1185
- }
1186
-
1187
1135
class _FixedDestinationComposeBoxBody extends _ComposeBoxBody {
1188
1136
_FixedDestinationComposeBoxBody ({required this .narrow, required this .controller});
1189
1137
@@ -1208,6 +1156,58 @@ class _FixedDestinationComposeBoxBody extends _ComposeBoxBody {
1208
1156
);
1209
1157
}
1210
1158
1159
+ sealed class ComposeBoxController {
1160
+ ComposeContentController get content => _content;
1161
+ final _content = ComposeContentController ();
1162
+
1163
+ FocusNode get contentFocusNode => _contentFocusNode;
1164
+ final _contentFocusNode = FocusNode ();
1165
+
1166
+ @mustCallSuper
1167
+ void dispose () {
1168
+ _content.dispose ();
1169
+ _contentFocusNode.dispose ();
1170
+ }
1171
+ }
1172
+
1173
+ class StreamComposeBoxController extends ComposeBoxController {
1174
+ ComposeTopicController get topic => _topic;
1175
+ final _topic = ComposeTopicController ();
1176
+
1177
+ FocusNode get topicFocusNode => _topicFocusNode;
1178
+ final _topicFocusNode = FocusNode ();
1179
+
1180
+ @override
1181
+ void dispose () {
1182
+ _topic.dispose ();
1183
+ _topicFocusNode.dispose ();
1184
+ super .dispose ();
1185
+ }
1186
+ }
1187
+
1188
+ class FixedDestinationComposeBoxController extends ComposeBoxController {}
1189
+
1190
+ class _ErrorBanner extends StatelessWidget {
1191
+ const _ErrorBanner ({required this .label});
1192
+
1193
+ final String label;
1194
+
1195
+ @override
1196
+ Widget build (BuildContext context) {
1197
+ final designVariables = DesignVariables .of (context);
1198
+ return Container (
1199
+ padding: const EdgeInsets .all (8 ),
1200
+ decoration: BoxDecoration (
1201
+ color: designVariables.errorBannerBackground,
1202
+ border: Border .all (color: designVariables.errorBannerBorder),
1203
+ borderRadius: BorderRadius .circular (5 )),
1204
+ child: Text (label,
1205
+ style: TextStyle (fontSize: 18 , color: designVariables.errorBannerLabel),
1206
+ ),
1207
+ );
1208
+ }
1209
+ }
1210
+
1211
1211
class ComposeBox extends StatefulWidget {
1212
1212
ComposeBox ({super .key, required this .narrow})
1213
1213
: assert (ComposeBox .hasComposeBox (narrow));
0 commit comments