@@ -870,13 +870,11 @@ class _ComposeBoxLayout extends StatelessWidget {
870
870
required this .sendButton,
871
871
required this .contentController,
872
872
required this .contentFocusNode,
873
- this .blockingErrorBanner,
874
873
});
875
874
876
875
final Widget ? topicInput;
877
876
final Widget contentInput;
878
877
final Widget sendButton;
879
- final Widget ? blockingErrorBanner;
880
878
final ComposeContentController contentController;
881
879
final FocusNode contentFocusNode;
882
880
@@ -900,30 +898,28 @@ class _ComposeBoxLayout extends StatelessWidget {
900
898
);
901
899
902
900
return _ComposeBoxContainer (
903
- child: blockingErrorBanner != null
904
- ? SizedBox (width: double .infinity, child: blockingErrorBanner)
905
- : Column (children: [
906
- Row (crossAxisAlignment: CrossAxisAlignment .end, children: [
907
- Expanded (
908
- child: Theme (
909
- data: inputThemeData,
910
- child: Column (children: [
911
- if (topicInput != null ) topicInput! ,
912
- if (topicInput != null ) const SizedBox (height: 8 ),
913
- contentInput,
914
- ]))),
915
- const SizedBox (width: 8 ),
916
- sendButton,
917
- ]),
918
- Theme (
919
- data: themeData.copyWith (
920
- iconTheme: themeData.iconTheme.copyWith (color: colorScheme.onSurfaceVariant)),
921
- child: Row (children: [
922
- _AttachFileButton (contentController: contentController, contentFocusNode: contentFocusNode),
923
- _AttachMediaButton (contentController: contentController, contentFocusNode: contentFocusNode),
924
- _AttachFromCameraButton (contentController: contentController, contentFocusNode: contentFocusNode),
925
- ])),
926
- ]));
901
+ child: Column (children: [
902
+ Row (crossAxisAlignment: CrossAxisAlignment .end, children: [
903
+ Expanded (
904
+ child: Theme (
905
+ data: inputThemeData,
906
+ child: Column (children: [
907
+ if (topicInput != null ) topicInput! ,
908
+ if (topicInput != null ) const SizedBox (height: 8 ),
909
+ contentInput,
910
+ ]))),
911
+ const SizedBox (width: 8 ),
912
+ sendButton,
913
+ ]),
914
+ Theme (
915
+ data: themeData.copyWith (
916
+ iconTheme: themeData.iconTheme.copyWith (color: colorScheme.onSurfaceVariant)),
917
+ child: Row (children: [
918
+ _AttachFileButton (contentController: contentController, contentFocusNode: contentFocusNode),
919
+ _AttachMediaButton (contentController: contentController, contentFocusNode: contentFocusNode),
920
+ _AttachFromCameraButton (contentController: contentController, contentFocusNode: contentFocusNode),
921
+ ])),
922
+ ]));
927
923
}
928
924
}
929
925
@@ -1054,6 +1050,13 @@ class _FixedDestinationComposeBoxState extends State<_FixedDestinationComposeBox
1054
1050
1055
1051
@override
1056
1052
Widget build (BuildContext context) {
1053
+ final errorBanner = _errorBanner (context);
1054
+ if (errorBanner != null ) {
1055
+ return _ComposeBoxContainer (
1056
+ child: SizedBox (width: double .infinity,
1057
+ child: errorBanner));
1058
+ }
1059
+
1057
1060
return _ComposeBoxLayout (
1058
1061
contentController: _contentController,
1059
1062
contentFocusNode: _contentFocusNode,
@@ -1067,8 +1070,7 @@ class _FixedDestinationComposeBoxState extends State<_FixedDestinationComposeBox
1067
1070
topicController: null ,
1068
1071
contentController: _contentController,
1069
1072
getDestination: () => widget.narrow.destination,
1070
- ),
1071
- blockingErrorBanner: _errorBanner (context));
1073
+ ));
1072
1074
}
1073
1075
}
1074
1076
0 commit comments