Implement image viewer
This commit is contained in:
parent
7d1358228e
commit
0276a81173
6 changed files with 112 additions and 40 deletions
|
|
@ -1,8 +1,18 @@
|
|||
import 'package:famedlysdk/famedlysdk.dart';
|
||||
import 'package:fluffychat/components/dialogs/simple_dialogs.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'matrix_file_extension.dart';
|
||||
|
||||
extension LocalizedBody on Event {
|
||||
void openFile(BuildContext context) async {
|
||||
final MatrixFile matrixFile =
|
||||
await SimpleDialogs(context).tryRequestWithLoadingDialog(
|
||||
downloadAndDecryptAttachment(),
|
||||
);
|
||||
matrixFile.open();
|
||||
}
|
||||
|
||||
IconData get statusIcon {
|
||||
switch (status) {
|
||||
case -1:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue