@@ -1376,23 +1376,26 @@ class StreamComposeBoxController extends ComposeBoxController {
1376
1376
1377
1377
class FixedDestinationComposeBoxController extends ComposeBoxController {}
1378
1378
1379
- class _ErrorBanner extends StatelessWidget {
1380
- const _ErrorBanner ({required this .label});
1379
+ abstract class _Banner extends StatelessWidget {
1380
+ const _Banner ({required this .label});
1381
1381
1382
1382
final String label;
1383
1383
1384
+ Color getLabelColor (DesignVariables designVariables);
1385
+ Color getBackgroundColor (DesignVariables designVariables);
1386
+
1384
1387
@override
1385
1388
Widget build (BuildContext context) {
1386
1389
final designVariables = DesignVariables .of (context);
1387
1390
final labelTextStyle = TextStyle (
1388
1391
fontSize: 17 ,
1389
1392
height: 22 / 17 ,
1390
- color: designVariables.btnLabelAttMediumIntDanger ,
1393
+ color: getLabelColor ( designVariables) ,
1391
1394
).merge (weightVariableTextStyle (context, wght: 600 ));
1392
1395
1393
1396
return DecoratedBox (
1394
1397
decoration: BoxDecoration (
1395
- color: designVariables.bannerBgIntDanger ),
1398
+ color: getBackgroundColor ( designVariables) ),
1396
1399
child: SafeArea (
1397
1400
minimum: const EdgeInsetsDirectional .only (start: 8 )
1398
1401
// (SafeArea.minimum doesn't take an EdgeInsetsDirectional)
@@ -1405,12 +1408,24 @@ class _ErrorBanner extends StatelessWidget {
1405
1408
child: Text (style: labelTextStyle,
1406
1409
label))),
1407
1410
const SizedBox (width: 8 ),
1408
- // TODO(#720) "x" button goes here.
1411
+ // TODO(#720) "x" button for the error banner goes here.
1409
1412
// 24px square with 8px touchable padding in all directions?
1410
1413
])));
1411
1414
}
1412
1415
}
1413
1416
1417
+ class _ErrorBanner extends _Banner {
1418
+ const _ErrorBanner ({required super .label});
1419
+
1420
+ @override
1421
+ Color getLabelColor (DesignVariables designVariables) =>
1422
+ designVariables.btnLabelAttMediumIntDanger;
1423
+
1424
+ @override
1425
+ Color getBackgroundColor (DesignVariables designVariables) =>
1426
+ designVariables.bannerBgIntDanger;
1427
+ }
1428
+
1414
1429
/// The compose box.
1415
1430
///
1416
1431
/// Takes the full screen width, covering the horizontal insets with its surface.
0 commit comments