Skip to content

Commit 88b2ff9

Browse files
committed
compose [nfc]: Extract compose buttons as a list
Signed-off-by: Zixuan James Li <[email protected]>
1 parent 58debf5 commit 88b2ff9

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

lib/widgets/compose_box.dart

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1020,6 +1020,12 @@ class _ComposeBoxLayout extends StatelessWidget {
10201020
),
10211021
);
10221022

1023+
final composeButtons = [
1024+
_AttachFileButton(contentController: contentController, contentFocusNode: contentFocusNode),
1025+
_AttachMediaButton(contentController: contentController, contentFocusNode: contentFocusNode),
1026+
_AttachFromCameraButton(contentController: contentController, contentFocusNode: contentFocusNode),
1027+
];
1028+
10231029
return _ComposeBoxContainer(
10241030
child: Column(children: [
10251031
Row(crossAxisAlignment: CrossAxisAlignment.end, children: [
@@ -1034,11 +1040,7 @@ class _ComposeBoxLayout extends StatelessWidget {
10341040
const SizedBox(width: 8),
10351041
sendButton,
10361042
]),
1037-
Row(children: [
1038-
_AttachFileButton(contentController: contentController, contentFocusNode: contentFocusNode),
1039-
_AttachMediaButton(contentController: contentController, contentFocusNode: contentFocusNode),
1040-
_AttachFromCameraButton(contentController: contentController, contentFocusNode: contentFocusNode),
1041-
]),
1043+
Row(children: composeButtons),
10421044
]));
10431045
}
10441046
}

0 commit comments

Comments
 (0)