ente/lib/ui/face_search_results_page.dart

35 lines
1,000 B
Dart
Raw Normal View History

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';
import 'package:photos/face_search_manager.dart';
import 'package:photos/models/face.dart';
import 'package:photos/ui/circular_network_image_widget.dart';
2020-06-02 14:24:37 +00:00
import 'package:photos/ui/gallery.dart';
2020-04-05 14:00:44 +00:00
class FaceSearchResultsPage extends StatelessWidget {
final FaceSearchManager _faceSearchManager = FaceSearchManager.instance;
2020-06-03 13:53:53 +00:00
final Face face;
2020-04-05 14:00:44 +00:00
2020-06-03 13:53:53 +00:00
FaceSearchResultsPage(this.face, {Key key}) : super(key: key);
2020-04-05 14:00:44 +00:00
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("Search results"),
actions: <Widget>[
2020-06-02 14:24:37 +00:00
CircularNetworkImageWidget(
Configuration.instance.getHttpEndpoint() +
"/" +
2020-06-03 13:53:53 +00:00
face.thumbnailPath,
2020-06-02 14:24:37 +00:00
20),
2020-04-05 14:00:44 +00:00
],
),
body: Container(
child: Gallery(
() => _faceSearchManager.getFaceSearchResults(face),
),
2020-04-05 14:00:44 +00:00
),
);
}
}