Search
 
SCRIPT & CODE EXAMPLE
 

DART

flutter video thumbnail from url

Use the package video_thumbnail:
		  
   video_thumbnail: ^0.5.0

//And here's the method to extract a file thumbnail image from video url or file path:
  
  Future<File> getVideoThumbnail (String url) async {

    var thumbTempPath = await VideoThumbnail.thumbnailFile(
      video: url,
      thumbnailPath: (await getTemporaryDirectory()).path,
      imageFormat: ImageFormat.WEBP,
      maxHeight: 64, // specify the height of the thumbnail, let the width auto-scaled to keep the source aspect ratio
      quality: 75, // you can change the thumbnail quality here
    );
    return File(thumbTempPath!);
  }
Comment

PREVIOUS NEXT
Code Example
Dart :: send json to api flutter post 
Dart :: flutter button with icon and text 
Dart :: flutter get platform type 
Dart :: flutter datatypes check 
Dart :: flutter safearea 
Dart :: dart empty check 
Dart :: pass function as parameter in flutter 
Dart :: flutter alertdialog actionsoverflowdirecation 
Dart :: what is final and const verabile in flutter 
Dart :: drawerheader height flutter 
Dart :: dart uri 
Dart :: flutter layout builder 
Dart :: convert string to list in dart 
Dart :: dart deep copy list 
Dart :: flutter run in background every second 
Dart :: dart else if 
Dart :: flutter firestore update a particular document field 
Dart :: flutter: httpclient method 
Dart :: aws ec2 upload file 
Dart :: string validation in dart 
Dart :: A dismissed Slidable widget is still part of the tree. 
Dart :: spacer in singlechildscrollview 
Dart :: upload zip file to ec2 
Dart :: internal shadow flutter 
Dart :: onboarding screen flutter 
Dart :: delay fetching data flutter 
Dart :: Modal overlay in flutter 
Dart :: how to create space between list on flutter 
Dart :: how to load asset image to server in flutter 
Dart :: how to disable float stack in flutter 
ADD CONTENT
Topic
Content
Source link
Name
7+1 =