Search code examples
flutterflutter-dependenciesflutter-packagesflutter-video-player

How to remove backspace between the frames in video_trimmer package


I would like to remove the black space between each frame video. I using the package called video_trimmer: https://pub.dev/packages/video_trimmer

trimmer video example

This is my Trim Editor so far:

TrimEditor(
    trimmer: controller.trimmer!,
    viewerHeight: 50,
    viewerWidth: Get.width,
    maxVideoLength: const Duration(seconds: 30),
    onChangeStart: (value) {
     controller.startValue.value = value;
    },
    onChangeEnd: (value) {
      controller.endValue.value = value;
    },
    onChangePlaybackState: (value) {
     controller.isPlaying.value = value;
    },
  ),

Thanks!


Solution

  • I found the solution!

    TrimEditor(
    
        trimmer: controller.trimmer!,
        fit: BoxFit.fill, // Add this line <===
        viewerHeight: 50,
        viewerWidth: Get.width,
        maxVideoLength: const Duration(seconds: 30),
        onChangeStart: (value) {
         controller.startValue.value = value;
        },
        onChangeEnd: (value) {
          controller.endValue.value = value;
        },
        onChangePlaybackState: (value) {
         controller.isPlaying.value = value;
        },
      ),