build method
- dynamic context
Implementation
@override
Widget build(BuildContext context) {
final aspect = result.width > 0 && result.height > 0
? result.width / result.height
: 4 / 3;
return AspectRatio(
aspectRatio: aspect,
child: Stack(
fit: StackFit.expand,
children: [
Image.memory(image, fit: BoxFit.fill, gaplessPlayback: true),
DetectionBoxes(result: result),
],
),
);
}