feat: Sending multiple files at once
This commit is contained in:
parent
b328e95980
commit
b83503585f
6 changed files with 165 additions and 58 deletions
|
|
@ -128,6 +128,7 @@ class ChatController extends State<ChatPageWithRoom>
|
|||
builder: (c) => SendFileDialog(
|
||||
files: details.files,
|
||||
room: room,
|
||||
outerContext: context,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
@ -483,7 +484,7 @@ class ChatController extends State<ChatPageWithRoom>
|
|||
final result = await AppLock.of(context).pauseWhile(
|
||||
FilePicker.platform.pickFiles(
|
||||
compressionQuality: 0,
|
||||
allowMultiple: false,
|
||||
allowMultiple: true,
|
||||
),
|
||||
);
|
||||
if (result == null || result.files.isEmpty) return;
|
||||
|
|
@ -492,6 +493,7 @@ class ChatController extends State<ChatPageWithRoom>
|
|||
builder: (c) => SendFileDialog(
|
||||
files: result.xFiles,
|
||||
room: room,
|
||||
outerContext: context,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
@ -503,6 +505,7 @@ class ChatController extends State<ChatPageWithRoom>
|
|||
builder: (c) => SendFileDialog(
|
||||
files: [XFile.fromData(image)],
|
||||
room: room,
|
||||
outerContext: context,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
@ -512,7 +515,7 @@ class ChatController extends State<ChatPageWithRoom>
|
|||
FilePicker.platform.pickFiles(
|
||||
compressionQuality: 0,
|
||||
type: FileType.image,
|
||||
allowMultiple: false,
|
||||
allowMultiple: true,
|
||||
),
|
||||
);
|
||||
if (result == null || result.files.isEmpty) return;
|
||||
|
|
@ -522,6 +525,7 @@ class ChatController extends State<ChatPageWithRoom>
|
|||
builder: (c) => SendFileDialog(
|
||||
files: result.xFiles,
|
||||
room: room,
|
||||
outerContext: context,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
@ -537,6 +541,7 @@ class ChatController extends State<ChatPageWithRoom>
|
|||
builder: (c) => SendFileDialog(
|
||||
files: [file],
|
||||
room: room,
|
||||
outerContext: context,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
@ -555,6 +560,7 @@ class ChatController extends State<ChatPageWithRoom>
|
|||
builder: (c) => SendFileDialog(
|
||||
files: [file],
|
||||
room: room,
|
||||
outerContext: context,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue