2020-04-05 14:00:44 +00:00
|
|
|
import 'package:flutter/material.dart';
|
2020-05-01 18:20:12 +00:00
|
|
|
import 'package:photos/core/configuration.dart';
|
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
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|