mirror of
https://github.com/git-touch/git-touch
synced 2024-12-16 10:20:55 +01:00
26 lines
696 B
Dart
26 lines
696 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:git_touch/models/theme.dart';
|
|
import 'package:git_touch/scaffolds/common.dart';
|
|
import 'package:photo_view/photo_view.dart';
|
|
import 'package:provider/provider.dart';
|
|
|
|
class ImageViewScreen extends StatelessWidget {
|
|
final String url;
|
|
final Widget title;
|
|
|
|
ImageViewScreen(this.url, {this.title = const Text('Image')});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final theme = Provider.of<ThemeModel>(context);
|
|
|
|
return CommonScaffold(
|
|
title: title,
|
|
body: PhotoView(
|
|
imageProvider: NetworkImage(url),
|
|
backgroundDecoration: BoxDecoration(color: theme.palette.background),
|
|
),
|
|
);
|
|
}
|
|
}
|