Skip to content

codewave-tech/resolution_detector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Usage

To use the ResolutionDetector class, you first need to import the package:

import 'package:resolution_detector/resolution_detector.dart';

Then, you can create an instance of the ResolutionDetector class and call the getMaxResolution method to get the maximum supported resolution of the device:

final ResolutionDetector resolutionDetector = ResolutionDetector();

MaxSupportedResolution? maxResolution = await resolutionDetector.getMaxResolution();

The getMaxResolution method returns an instance of the MaxSupportedResolution enum which can be one of res4K, res1080p, res720p. You can use this value to determine the maximum supported resolution of the device and adjust your video playback accordingly.

It is also important to note that the getMaxResolution method is only called once and the result is stored in a cache for future usage, so it will not affect performance.

About

A Flutter plugin to get the maximum supported video resolution

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published