@@ -275,6 +275,42 @@ class ComposeContentController extends ComposeController<ContentValidationError>
275
275
}
276
276
}
277
277
278
+ class _ErrorBanner extends StatelessWidget {
279
+ const _ErrorBanner ({required this .label, this .action});
280
+
281
+ final String label;
282
+ final Widget ? action;
283
+
284
+ @override
285
+ Widget build (BuildContext context) {
286
+ final designVariables = DesignVariables .of (context);
287
+ final labelTextStyle = TextStyle (
288
+ fontSize: 17 ,
289
+ height: 22 / 17 ,
290
+ color: designVariables.btnLabelAttMediumDanger,
291
+ ).merge (weightVariableTextStyle (context, wght: 600 ));
292
+
293
+ final padding = (action == null )
294
+ // Ensure that the text is centered when it is the only element.
295
+ ? const EdgeInsets .symmetric (horizontal: 16 , vertical: 9 )
296
+ : const EdgeInsetsDirectional .fromSTEB (16 , 9 , 8 , 9 );
297
+
298
+ return Container (
299
+ constraints: const BoxConstraints (minHeight: 40 ),
300
+ decoration: BoxDecoration (color: designVariables.bannerBgIntDanger),
301
+ child: Row (
302
+ mainAxisAlignment: MainAxisAlignment .spaceBetween,
303
+ crossAxisAlignment: CrossAxisAlignment .start,
304
+ children: [
305
+ Expanded (
306
+ child: Padding (
307
+ padding: padding,
308
+ child: Text (label, style: labelTextStyle))),
309
+ if (action != null ) action! ,
310
+ ]));
311
+ }
312
+ }
313
+
278
314
class _TopBar extends StatelessWidget {
279
315
const _TopBar ({required this .showProgressIndicator, required this .sendMessageError});
280
316
@@ -1301,42 +1337,6 @@ class _StreamComposeBoxState extends State<_StreamComposeBox> implements Compose
1301
1337
}
1302
1338
}
1303
1339
1304
- class _ErrorBanner extends StatelessWidget {
1305
- const _ErrorBanner ({required this .label, this .action});
1306
-
1307
- final String label;
1308
- final Widget ? action;
1309
-
1310
- @override
1311
- Widget build (BuildContext context) {
1312
- final designVariables = DesignVariables .of (context);
1313
- final labelTextStyle = TextStyle (
1314
- fontSize: 17 ,
1315
- height: 22 / 17 ,
1316
- color: designVariables.btnLabelAttMediumDanger,
1317
- ).merge (weightVariableTextStyle (context, wght: 600 ));
1318
-
1319
- final padding = (action == null )
1320
- // Ensure that the text is centered when it is the only element.
1321
- ? const EdgeInsets .symmetric (horizontal: 16 , vertical: 9 )
1322
- : const EdgeInsetsDirectional .fromSTEB (16 , 9 , 8 , 9 );
1323
-
1324
- return Container (
1325
- constraints: const BoxConstraints (minHeight: 40 ),
1326
- decoration: BoxDecoration (color: designVariables.bannerBgIntDanger),
1327
- child: Row (
1328
- mainAxisAlignment: MainAxisAlignment .spaceBetween,
1329
- crossAxisAlignment: CrossAxisAlignment .start,
1330
- children: [
1331
- Expanded (
1332
- child: Padding (
1333
- padding: padding,
1334
- child: Text (label, style: labelTextStyle))),
1335
- if (action != null ) action! ,
1336
- ]));
1337
- }
1338
- }
1339
-
1340
1340
class _FixedDestinationComposeBox extends StatefulWidget {
1341
1341
const _FixedDestinationComposeBox ({super .key, required this .narrow});
1342
1342
0 commit comments