@@ -275,6 +275,45 @@ 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,
292
+ // The Figma uses a weight of SemiBold,
293
+ // which is a variable equivalent to this value.
294
+ wght: 600 ));
295
+
296
+ final padding = (action == null )
297
+ // Ensure that the text is centered when it is the only element.
298
+ ? const EdgeInsets .symmetric (horizontal: 16 , vertical: 9 )
299
+ : const EdgeInsetsDirectional .fromSTEB (16 , 9 , 8 , 9 );
300
+
301
+ return Container (
302
+ constraints: const BoxConstraints (minHeight: 40 ),
303
+ decoration: BoxDecoration (color: designVariables.bannerBgIntDanger),
304
+ child: Row (
305
+ mainAxisAlignment: MainAxisAlignment .spaceBetween,
306
+ crossAxisAlignment: CrossAxisAlignment .start,
307
+ children: [
308
+ Expanded (
309
+ child: Padding (
310
+ padding: padding,
311
+ child: Text (label, style: labelTextStyle))),
312
+ if (action != null ) action! ,
313
+ ]));
314
+ }
315
+ }
316
+
278
317
class _TopBar extends StatelessWidget {
279
318
const _TopBar ({required this .showProgressIndicator, required this .sendMessageError});
280
319
@@ -1301,45 +1340,6 @@ class _StreamComposeBoxState extends State<_StreamComposeBox> implements Compose
1301
1340
}
1302
1341
}
1303
1342
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,
1318
- // The Figma uses a weight of SemiBold,
1319
- // which is a variable equivalent to this value.
1320
- wght: 600 ));
1321
-
1322
- final padding = (action == null )
1323
- // Ensure that the text is centered when it is the only element.
1324
- ? const EdgeInsets .symmetric (horizontal: 16 , vertical: 9 )
1325
- : const EdgeInsetsDirectional .fromSTEB (16 , 9 , 8 , 9 );
1326
-
1327
- return Container (
1328
- constraints: const BoxConstraints (minHeight: 40 ),
1329
- decoration: BoxDecoration (color: designVariables.bannerBgIntDanger),
1330
- child: Row (
1331
- mainAxisAlignment: MainAxisAlignment .spaceBetween,
1332
- crossAxisAlignment: CrossAxisAlignment .start,
1333
- children: [
1334
- Expanded (
1335
- child: Padding (
1336
- padding: padding,
1337
- child: Text (label, style: labelTextStyle))),
1338
- if (action != null ) action! ,
1339
- ]));
1340
- }
1341
- }
1342
-
1343
1343
class _FixedDestinationComposeBox extends StatefulWidget {
1344
1344
const _FixedDestinationComposeBox ({super .key, required this .narrow});
1345
1345
0 commit comments