@@ -1117,25 +1117,25 @@ class _SendButtonState extends State<_SendButton> {
11171117class _ComposeBoxContainer extends StatelessWidget {
11181118 const _ComposeBoxContainer ({
11191119 required this .body,
1120- this .errorBanner ,
1121- }) : assert (body != null || errorBanner != null );
1120+ this .banner ,
1121+ }) : assert (body != null || banner != null );
11221122
11231123 /// The text inputs, compose-button row, and send button.
11241124 ///
11251125 /// This widget does not need a [SafeArea] to consume any device insets.
11261126 ///
1127- /// Can be null, but only if [errorBanner ] is non-null.
1127+ /// Can be null, but only if [banner ] is non-null.
11281128 final Widget ? body;
11291129
1130- /// An error bar that goes at the top.
1130+ /// A bar that goes at the top.
11311131 ///
11321132 /// This may be present on its own or with a [body] .
11331133 /// If [body] is null this must be present.
11341134 ///
11351135 /// This widget should use a [SafeArea] to pad the left, right,
11361136 /// and bottom device insets.
11371137 /// (A bottom inset may occur if [body] is null.)
1138- final Widget ? errorBanner ;
1138+ final Widget ? banner ;
11391139
11401140 Widget _paddedBody () {
11411141 assert (body != null );
@@ -1147,15 +1147,15 @@ class _ComposeBoxContainer extends StatelessWidget {
11471147 Widget build (BuildContext context) {
11481148 final designVariables = DesignVariables .of (context);
11491149
1150- final List <Widget > children = switch ((errorBanner , body)) {
1150+ final List <Widget > children = switch ((banner , body)) {
11511151 (Widget (), Widget ()) => [
11521152 // _paddedBody() already pads the bottom inset,
1153- // so make sure the error banner doesn't double-pad it.
1153+ // so make sure the banner doesn't double-pad it.
11541154 MediaQuery .removePadding (context: context, removeBottom: true ,
1155- child: errorBanner ! ),
1155+ child: banner ! ),
11561156 _paddedBody (),
11571157 ],
1158- (Widget (), null ) => [errorBanner ! ],
1158+ (Widget (), null ) => [banner ! ],
11591159 (null , Widget ()) => [_paddedBody ()],
11601160 (null , null ) => throw UnimplementedError (), // not allowed, see dartdoc
11611161 };
@@ -1500,7 +1500,7 @@ class _ComposeBoxState extends State<ComposeBox> with PerAccountStoreAwareStateM
15001500
15011501 final errorBanner = _errorBannerComposingNotAllowed (context);
15021502 if (errorBanner != null ) {
1503- return _ComposeBoxContainer (body: null , errorBanner : errorBanner);
1503+ return _ComposeBoxContainer (body: null , banner : errorBanner);
15041504 }
15051505
15061506 final controller = this .controller;
@@ -1521,6 +1521,6 @@ class _ComposeBoxState extends State<ComposeBox> with PerAccountStoreAwareStateM
15211521 // errorBanner = _ErrorBanner(label:
15221522 // ZulipLocalizations.of(context).errorSendMessageTimeout);
15231523 // }
1524- return _ComposeBoxContainer (body: body, errorBanner : null );
1524+ return _ComposeBoxContainer (body: body, banner : null );
15251525 }
15261526}
0 commit comments