resolution_detector 2.0.4 copy "resolution_detector: ^2.0.4" to clipboard
resolution_detector: ^2.0.4 copied to clipboard

A Flutter plugin to get the maximum supported video resolution.

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.

1
likes
130
pub points
53%
popularity

Publisher

verified publishertaars.site

A Flutter plugin to get the maximum supported video resolution.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on resolution_detector