import 'dart:typed_data';

import 'package:fis_measure/view/frame_view/interface/frame_view.dart';
import 'package:fis_vid/processors/base.dart';
import 'package:flutter/material.dart';

class VidFrameView extends StatelessWidget implements VidFrameViewInterface {
  const VidFrameView(
    this.data, {
    Key? key,
    this.width,
    this.height,
    this.processors,
  }) : super(key: key);

  @override
  final Uint8List data;

  @override
  final double? height;

  @override
  final double? width;

  @override
  final List<VidFrameProcessor>? processors;

  @override
  Widget build(BuildContext context) {
    return Image.memory(
      data,
      width: width,
      height: height,
      isAntiAlias: true,
      fit: BoxFit.contain,
      gaplessPlayback: true,
    );
  }
}
