pub struct AssetImage {
pub name: String,
pub scale: f64,
}Expand description
Decodes an image the application bundles. Flutter ExactAssetImage.
Dart’s AssetImage also picks among the resolution variants a manifest declares — the two-
and three-times copies of the same picture. Without a manifest this names one asset exactly,
which is Dart’s ExactAssetImage; see PORTING.md.
Fields§
§name: StringThe asset’s name in the bundle.
scale: f64Linear pixels per logical point in the decoded image.
Implementations§
Source§impl AssetImage
impl AssetImage
Sourcepub fn new(name: impl Into<String>) -> AssetImage
pub fn new(name: impl Into<String>) -> AssetImage
Creates a provider for a bundled asset at the natural scale.
Sourcepub fn scale(self, scale: f64) -> AssetImage
pub fn scale(self, scale: f64) -> AssetImage
Dart ExactAssetImage(scale:).
Trait Implementations§
Source§impl Clone for AssetImage
impl Clone for AssetImage
Source§fn clone(&self) -> AssetImage
fn clone(&self) -> AssetImage
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AssetImage
impl Debug for AssetImage
Source§impl ImageProvider for AssetImage
impl ImageProvider for AssetImage
Source§fn key(&self, configuration: &ImageConfiguration) -> ImageCacheKey
fn key(&self, configuration: &ImageConfiguration) -> ImageCacheKey
What names this image in the cache. Flutter
obtainKey. Read moreSource§fn load_image(
&self,
app: &mut App,
key: &ImageCacheKey,
) -> Retained<Handle<ImageStreamCompleter>>
fn load_image( &self, app: &mut App, key: &ImageCacheKey, ) -> Retained<Handle<ImageStreamCompleter>>
Starts decoding, answering with the completer that will carry the frame. Flutter
loadImage. Read moreSource§fn resolve(
&self,
app: &mut App,
configuration: &ImageConfiguration,
) -> Retained<Handle<ImageStream>>
fn resolve( &self, app: &mut App, configuration: &ImageConfiguration, ) -> Retained<Handle<ImageStream>>
The stream for this image, sharing whatever the cache already has. Flutter
resolve.Auto Trait Implementations§
impl Forget for AssetImage
impl Freeze for AssetImage
impl Move for AssetImage
impl RefUnwindSafe for AssetImage
impl Send for AssetImagewhere
RawVecInner: Send,
impl Sync for AssetImagewhere
RawVecInner: Sync,
impl Unpin for AssetImage
impl UnsafeUnpin for AssetImage
impl UnwindSafe for AssetImagewhere
RawVecInner: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more