@@ -1173,25 +1173,25 @@ class _SendButtonState extends State<_SendButton> {
11731173class _ComposeBoxContainer extends StatelessWidget {
11741174 const _ComposeBoxContainer ({
11751175 required this .body,
1176- this .errorBanner ,
1177- }) : assert (body != null || errorBanner != null );
1176+ this .banner ,
1177+ }) : assert (body != null || banner != null );
11781178
11791179 /// The text inputs, compose-button row, and send button.
11801180 ///
11811181 /// This widget does not need a [SafeArea] to consume any device insets.
11821182 ///
1183- /// Can be null, but only if [errorBanner ] is non-null.
1183+ /// Can be null, but only if [banner ] is non-null.
11841184 final Widget ? body;
11851185
1186- /// An error bar that goes at the top.
1186+ /// A bar that goes at the top.
11871187 ///
11881188 /// This may be present on its own or with a [body] .
11891189 /// If [body] is null this must be present.
11901190 ///
11911191 /// This widget should use a [SafeArea] to pad the left, right,
11921192 /// and bottom device insets.
11931193 /// (A bottom inset may occur if [body] is null.)
1194- final Widget ? errorBanner ;
1194+ final Widget ? banner ;
11951195
11961196 Widget _paddedBody () {
11971197 assert (body != null );
@@ -1203,15 +1203,15 @@ class _ComposeBoxContainer extends StatelessWidget {
12031203 Widget build (BuildContext context) {
12041204 final designVariables = DesignVariables .of (context);
12051205
1206- final List <Widget > children = switch ((errorBanner , body)) {
1206+ final List <Widget > children = switch ((banner , body)) {
12071207 (Widget (), Widget ()) => [
12081208 // _paddedBody() already pads the bottom inset,
1209- // so make sure the error banner doesn't double-pad it.
1209+ // so make sure the banner doesn't double-pad it.
12101210 MediaQuery .removePadding (context: context, removeBottom: true ,
1211- child: errorBanner ! ),
1211+ child: banner ! ),
12121212 _paddedBody (),
12131213 ],
1214- (Widget (), null ) => [errorBanner ! ],
1214+ (Widget (), null ) => [banner ! ],
12151215 (null , Widget ()) => [_paddedBody ()],
12161216 (null , null ) => throw UnimplementedError (), // not allowed, see dartdoc
12171217 };
@@ -1556,7 +1556,7 @@ class _ComposeBoxState extends State<ComposeBox> with PerAccountStoreAwareStateM
15561556
15571557 final errorBanner = _errorBannerComposingNotAllowed (context);
15581558 if (errorBanner != null ) {
1559- return _ComposeBoxContainer (body: null , errorBanner : errorBanner);
1559+ return _ComposeBoxContainer (body: null , banner : errorBanner);
15601560 }
15611561
15621562 final controller = this .controller;
@@ -1577,6 +1577,6 @@ class _ComposeBoxState extends State<ComposeBox> with PerAccountStoreAwareStateM
15771577 // errorBanner = _ErrorBanner(label:
15781578 // ZulipLocalizations.of(context).errorSendMessageTimeout);
15791579 // }
1580- return _ComposeBoxContainer (body: body, errorBanner : null );
1580+ return _ComposeBoxContainer (body: body, banner : null );
15811581 }
15821582}
0 commit comments