feat: Add svg support and better image handling
This commit is contained in:
parent
7cadcb710d
commit
31aa4c41d4
6 changed files with 289 additions and 126 deletions
|
|
@ -7,8 +7,9 @@ import '../utils/event_extension.dart';
|
|||
|
||||
class ImageView extends StatelessWidget {
|
||||
final Event event;
|
||||
final void Function() onLoaded;
|
||||
|
||||
const ImageView(this.event, {Key key}) : super(key: key);
|
||||
const ImageView(this.event, {Key key, this.onLoaded}) : super(key: key);
|
||||
|
||||
void _forwardAction(BuildContext context) async {
|
||||
Matrix.of(context).shareContent = event.content;
|
||||
|
|
@ -47,6 +48,7 @@ class ImageView extends StatelessWidget {
|
|||
child: ImageBubble(
|
||||
event,
|
||||
tapToView: false,
|
||||
onLoaded: onLoaded,
|
||||
fit: BoxFit.contain,
|
||||
backgroundColor: Colors.black,
|
||||
maxSize: false,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue