feat: paste image from clipboard
This commit is contained in:
parent
573f76ac89
commit
2ae4551bcc
10 changed files with 56 additions and 0 deletions
|
|
@ -464,6 +464,22 @@ class ChatController extends State<ChatPageWithRoom> {
|
|||
);
|
||||
}
|
||||
|
||||
void sendImageFromClipBoard(Uint8List? image) async {
|
||||
await showDialog(
|
||||
context: context,
|
||||
useRootNavigator: false,
|
||||
builder: (c) => SendFileDialog(
|
||||
files: [
|
||||
MatrixFile(
|
||||
bytes: image!,
|
||||
name: "image from Clipboard",
|
||||
).detectFileType,
|
||||
],
|
||||
room: room,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
void sendImageAction() async {
|
||||
final result = await FilePicker.platform.pickFiles(
|
||||
type: FileType.image,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue