adding tests to the flutter results widget - lightly designing it. Added in a testing widget for being able to test widgets without a camera - camera components needs to be updated not to crash the app later though.
Also added real building and testing to the CICD
This commit is contained in:
@@ -3,11 +3,11 @@ import 'package:tensordex_mobile/widgets/poke_finder.dart';
|
||||
import '../tflite/model/outputs/recognition.dart';
|
||||
import '../tflite/model/outputs/stats.dart';
|
||||
|
||||
|
||||
/// [PokeFinder] sends each frame for inference
|
||||
class Results extends StatefulWidget {
|
||||
final List<Recognition> recognitions;
|
||||
final Stats stats;
|
||||
|
||||
/// Constructor
|
||||
const Results(this.recognitions, this.stats, {Key? key}) : super(key: key);
|
||||
|
||||
@@ -23,6 +23,15 @@ class _ResultsState extends State<Results> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Text(widget.recognitions.toString());
|
||||
return Column(
|
||||
children: widget.recognitions
|
||||
.map((recognition) => Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
Text(recognition.label.toString()),
|
||||
Text(recognition.score.toString()),
|
||||
],
|
||||
)).toList(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user