Clean up design
This commit is contained in:
parent
7e8ad4a42c
commit
a6dd9072a2
16 changed files with 141 additions and 201 deletions
|
|
@ -2,7 +2,6 @@ import 'package:cached_network_image/cached_network_image.dart';
|
|||
import 'package:famedlysdk/famedlysdk.dart';
|
||||
import 'package:fluffychat/components/matrix.dart';
|
||||
import 'package:fluffychat/utils/app_route.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:photo_view/photo_view.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
|
@ -13,15 +12,11 @@ class ImageViewer extends StatelessWidget {
|
|||
const ImageViewer(this.mxContent);
|
||||
|
||||
static show(BuildContext context, MxContent content) {
|
||||
if (kIsWeb) {
|
||||
launch(content.getDownloadLink(Matrix.of(context).client));
|
||||
} else {
|
||||
Navigator.of(context).push(
|
||||
AppRoute(
|
||||
ImageViewer(content),
|
||||
),
|
||||
);
|
||||
}
|
||||
Navigator.of(context).push(
|
||||
AppRoute(
|
||||
ImageViewer(content),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
@ -29,6 +24,9 @@ class ImageViewer extends StatelessWidget {
|
|||
final String url = mxContent.getDownloadLink(Matrix.of(context).client);
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
brightness: Brightness.dark,
|
||||
backgroundColor: Colors.black,
|
||||
iconTheme: IconThemeData(color: Colors.white),
|
||||
actions: <Widget>[
|
||||
IconButton(
|
||||
icon: Icon(Icons.file_download),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue