Enable skia in web
This commit is contained in:
parent
70806d9f4d
commit
d6836ad3df
8 changed files with 104 additions and 150 deletions
|
|
@ -496,7 +496,9 @@ class _ChatState extends State<_Chat> {
|
|||
),
|
||||
)
|
||||
: Message(timeline.events[i - 1],
|
||||
onSelect: (Event event) {
|
||||
onAvatarTab: (Event event) {
|
||||
sendController.text += ' ${event.senderId}';
|
||||
}, onSelect: (Event event) {
|
||||
if (!event.redacted) {
|
||||
if (selectedEvents.contains(event)) {
|
||||
setState(
|
||||
|
|
|
|||
|
|
@ -1,45 +0,0 @@
|
|||
import 'package:famedlysdk/famedlysdk.dart';
|
||||
import 'package:fluffychat/components/matrix.dart';
|
||||
import 'package:fluffychat/utils/app_route.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:photo_view/photo_view.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
class ImageViewer extends StatelessWidget {
|
||||
final MxContent mxContent;
|
||||
|
||||
const ImageViewer(this.mxContent);
|
||||
|
||||
static show(BuildContext context, MxContent content) {
|
||||
Navigator.of(context).push(
|
||||
AppRoute(
|
||||
ImageViewer(content),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final String url = mxContent.getDownloadLink(Matrix.of(context).client);
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.black,
|
||||
appBar: AppBar(
|
||||
brightness: Brightness.dark,
|
||||
backgroundColor: Colors.black,
|
||||
iconTheme: IconThemeData(color: Colors.white),
|
||||
actions: <Widget>[
|
||||
IconButton(
|
||||
icon: Icon(Icons.file_download),
|
||||
onPressed: () => launch(url),
|
||||
),
|
||||
],
|
||||
),
|
||||
body: PhotoView(
|
||||
loadingBuilder: (c, i) => Center(child: CircularProgressIndicator()),
|
||||
imageProvider: NetworkImage(
|
||||
url,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue