Skip to content

Commit 1e0b039

Browse files
committed
Fix drop area in knowledge base
1 parent 3787f6b commit 1e0b039

File tree

2 files changed

+34
-34
lines changed

2 files changed

+34
-34
lines changed

lib/pages/knowledge_base/widgets/documents_list.dart

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -175,38 +175,38 @@ class _DocumentsListState extends State<DocumentsList> {
175175
filteredDocuments = filteredDocuments.reversed.toList();
176176
}
177177

178-
return DropArea(
179-
type: "a document or folder",
180-
showChild: documents.isNotEmpty,
181-
onUpload: (files) => processUpload(context, files),
182-
child: Column(
183-
crossAxisAlignment: CrossAxisAlignment.start,
184-
children: [
185-
Padding(
186-
padding: const EdgeInsets.only(bottom: 25),
187-
child: Row(
188-
mainAxisAlignment: MainAxisAlignment.spaceBetween,
189-
children: [
190-
SearchBar(
191-
onChange: (val) => setState(() => search = val),
192-
placeholder: "Find file",
193-
),
194-
FilledButton(
195-
onPressed: selectDocuments,
196-
child: Row(
197-
children: [
198-
const Padding(
199-
padding: const EdgeInsets.only(right: 8),
200-
child: Icon(FluentIcons.upload),
201-
),
202-
const Text("Upload"),
203-
],
204-
),
178+
return Column(
179+
crossAxisAlignment: CrossAxisAlignment.start,
180+
children: [
181+
Padding(
182+
padding: const EdgeInsets.only(bottom: 25),
183+
child: Row(
184+
mainAxisAlignment: MainAxisAlignment.spaceBetween,
185+
children: [
186+
SearchBar(
187+
onChange: (val) => setState(() => search = val),
188+
placeholder: "Find file",
189+
),
190+
FilledButton(
191+
onPressed: selectDocuments,
192+
child: Row(
193+
children: [
194+
const Padding(
195+
padding: const EdgeInsets.only(right: 8),
196+
child: Icon(FluentIcons.upload),
197+
),
198+
const Text("Upload"),
199+
],
205200
),
206-
],
207-
),
201+
),
202+
],
208203
),
209-
Table(
204+
),
205+
DropArea(
206+
type: "a document or folder",
207+
showChild: documents.isNotEmpty,
208+
onUpload: (files) => processUpload(context, files),
209+
child: Table(
210210
columnWidths: const <int, TableColumnWidth>{
211211
0: FixedColumnWidth(20),
212212
1: FlexColumnWidth(),
@@ -288,8 +288,8 @@ class _DocumentsListState extends State<DocumentsList> {
288288
),
289289
],
290290
),
291-
],
292-
)
291+
),
292+
],
293293
);
294294
}
295295
),

lib/widgets/controls/drop_area.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ class _DropAreaState extends State<DropArea> {
7878

7979
final theme = FluentTheme.of(context);
8080
final String text = _showReleaseMessage
81-
? "Release to drop media"
82-
: "Drag and drop ${widget.type} here for testing";
81+
? "Release to drop"
82+
: "Drag and drop ${widget.type}";
8383

8484
return Center(
8585
child: SizedBox(

0 commit comments

Comments
 (0)