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:
Lucas Oskorep
2022-07-09 17:37:33 -04:00
parent a6e3038cb8
commit 654f4f2ffd
8 changed files with 115 additions and 50 deletions
+11 -2
View File
@@ -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(),
);
}
}