ente/lib/ui/network_image_detail_page.dart

42 lines
978 B
Dart
Raw Normal View History

2020-04-05 14:00:44 +00:00
import 'package:flutter/material.dart';
2020-04-30 15:18:26 +00:00
import 'package:myapp/core/configuration.dart';
2020-04-09 19:03:11 +00:00
import 'package:myapp/core/constants.dart' as Constants;
2020-04-05 14:00:44 +00:00
class NetworkImageDetailPage extends StatelessWidget {
2020-04-09 19:03:11 +00:00
final String _path;
2020-04-05 14:00:44 +00:00
2020-04-09 19:03:11 +00:00
const NetworkImageDetailPage(this._path, {Key key}) : super(key: key);
2020-04-05 14:00:44 +00:00
@override
Widget build(Object context) {
return Scaffold(
appBar: AppBar(
actions: <Widget>[
// action button
IconButton(
icon: Icon(Icons.share),
onPressed: () {
// TODO
},
)
],
),
body: Center(
child: Container(
child: _buildContent(context),
),
),
);
}
Widget _buildContent(BuildContext context) {
return GestureDetector(
onVerticalDragUpdate: (details) {
Navigator.pop(context);
},
2020-04-30 15:18:26 +00:00
child:
Image.network(Configuration.instance.getHttpEndpoint() + "/" + _path),
2020-04-05 14:00:44 +00:00
);
}
}