1
0
mirror of https://github.com/krawieck/lemmur/ synced 2024-12-13 00:56:13 +01:00
lemmur-app-android/lib/widgets/fullscreenable_image.dart
2020-10-06 22:28:10 +02:00

27 lines
619 B
Dart

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import '../pages/media_view.dart';
import '../util/goto.dart';
/// If the media is pressed, it opens itself in a [MediaViewPage]
class FullscreenableImage extends StatelessWidget {
final String url;
final Widget child;
const FullscreenableImage({
Key key,
@required this.url,
@required this.child,
}) : super(key: key);
@override
Widget build(BuildContext context) => InkWell(
onTap: () => goToMedia(context, url),
child: Hero(
tag: url,
child: child,
),
);
}