We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
We will provide wallpaper size, name and its dimentions
The text was updated successfully, but these errors were encountered:
to get the dimentions of a wallpaper use this method
final Image image = const Image( image: NetworkImage( 'https://i.pinimg.com/564x/54/6c/14/546c14575789924ec3e302296f82d75f.jpg')); Future<ui.Image> _getImageInfo() { Completer<ui.Image> completer = Completer<ui.Image>(); image.image.resolve(const ImageConfiguration()).addListener( ImageStreamListener( (ImageInfo info, bool _) => completer.complete(info.image))); return completer.future; }
Sorry, something went wrong.
to get the dimensions of a wallpaper this will be the implementation
FutureBuilder<ui.Image>( future: _getImageInfo(), builder: (BuildContext context, AsyncSnapshot<ui.Image> snapshot) { if (snapshot.hasData) { ui.Image? image = snapshot.data; return Text( '${image?.width}x${image?.height}', ); } else { return const Text('Loading...'); } }, ),
No branches or pull requests
We will provide wallpaper size, name and its dimentions
The text was updated successfully, but these errors were encountered: