resolution_detector

Last updated:

0 purchases

resolution_detector Image
resolution_detector Images
Add to Cart

Description:

resolution detector

Usage #
To use the ResolutionDetector class, you first need to import the package:
import 'package:resolution_detector/resolution_detector.dart';
copied to clipboard
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();
copied to clipboard
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.

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.