pub struct RawImage {
pub key: Option<KeyRef>,
pub image: Option<ImageInfo>,
pub width: Option<f64>,
pub height: Option<f64>,
pub opacity: f64,
pub fit: Option<BoxFit>,
pub alignment: Alignment,
pub repeat: ImageRepeat,
pub match_text_direction: bool,
}Expand description
Draws an image that is already decoded. Flutter RawImage.
Most callers want Image, which finds the image first. This is the widget underneath it,
and what to use when the image is already in hand.
Fields§
§key: Option<KeyRef>See Widget::key.
image: Option<ImageInfo>The image to draw, or nothing while it is still on its way.
width: Option<f64>The width to take, or None to follow the image.
height: Option<f64>The height to take, or None to follow the image.
opacity: f64How opaque to draw it, from zero to one.
fit: Option<BoxFit>How to fit it into the space it is given.
alignment: AlignmentWhere it sits when it does not fill that space.
repeat: ImageRepeatWhat fills the space it does not cover.
match_text_direction: boolWhether to mirror it in a right-to-left layout.
Implementations§
Source§impl RawImage
impl RawImage
Sourcepub fn new(image: Option<ImageInfo>) -> RawImage
pub fn new(image: Option<ImageInfo>) -> RawImage
Creates a RawImage showing image, or nothing when it is None.
Sourcepub fn repeat(self, repeat: ImageRepeat) -> RawImage
pub fn repeat(self, repeat: ImageRepeat) -> RawImage
Dart RawImage(repeat:).
Sourcepub fn match_text_direction(self, match_text_direction: bool) -> RawImage
pub fn match_text_direction(self, match_text_direction: bool) -> RawImage
Dart RawImage(matchTextDirection:).
Trait Implementations§
impl LeafRenderObjectWidget for RawImage
Source§impl RenderObjectWidget for RawImage
impl RenderObjectWidget for RawImage
Source§type RenderObject = RenderImage
type RenderObject = RenderImage
The render object this widget creates; Dart’s
covariant RenderObject parameter type.Source§fn debug_fill_properties(
&self,
_app: &App,
properties: &mut DiagnosticPropertiesBuilder,
)
fn debug_fill_properties( &self, _app: &App, properties: &mut DiagnosticPropertiesBuilder, )
Dart’s
debugFillProperties: the properties a dump shows for this widget, in Dart’s
order. Dart’s Widget base only sets the dense tree style, which the framework does.Source§fn create_render_object(
&self,
app: &mut App,
context: BuildContext,
) -> AnyRenderObject
fn create_render_object( &self, app: &mut App, context: BuildContext, ) -> AnyRenderObject
Creates an instance of the
RenderObject class that this widget represents, using the
configuration described by this widget. Read moreSource§fn update_render_object(
&self,
app: &mut App,
context: BuildContext,
render_object: RenderHandle<RenderImage>,
)
fn update_render_object( &self, app: &mut App, context: BuildContext, render_object: RenderHandle<RenderImage>, )
Copies the configuration described by this widget to the given render object, which
will be of the same type as returned by this object’s
create_render_object. Read moreSource§fn to_string_short(&self) -> String
fn to_string_short(&self) -> String
Dart’s
toStringShort, for a widget that names itself apart from its type, as
SizedBox.expand does; see Widget::to_string_short.Source§fn debug_visit_onstage_children(
&self,
app: &App,
children: &[AnyElement],
visitor: &mut dyn FnMut(AnyElement),
)
fn debug_visit_onstage_children( &self, app: &App, children: &[AnyElement], visitor: &mut dyn FnMut(AnyElement), )
Dart’s
debugVisitOnstageChildren of the element this widget makes, for a widget whose
Dart element subclass overrides it only to hide children (_OffstageElement,
_IndexedStackElement): calls visitor for each of children, in order, that is
onstage. Waft’s generic single- and multi-child elements stand in for those subclasses
and ask their widget here; an element of a widget’s own overrides
Element::debug_visit_onstage_children instead.Source§fn did_unmount_render_object(
&self,
app: &mut App,
render_object: RenderHandle<Self::RenderObject>,
)
fn did_unmount_render_object( &self, app: &mut App, render_object: RenderHandle<Self::RenderObject>, )
A render object previously associated with this widget has been removed from the tree.
The given
RenderObject will be of the same type as returned by this object’s
create_render_object.Auto Trait Implementations§
impl !RefUnwindSafe for RawImage
impl !Send for RawImage
impl !Sync for RawImage
impl !UnwindSafe for RawImage
impl Forget for RawImage
impl Freeze for RawImagewhere
*const RcInner<dyn Key> is !null: Freeze,
PhantomData<RcInner<dyn Key>>: Freeze,
*const ArcInner<ImageInner> is !null: Freeze,
PhantomData<ArcInner<ImageInner>>: Freeze,
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
impl Move for RawImage
impl Unpin for RawImage
impl UnsafeUnpin for RawImagewhere
*const RcInner<dyn Key> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Key>>: UnsafeUnpin,
*const ArcInner<ImageInner> is !null: UnsafeUnpin,
PhantomData<ArcInner<ImageInner>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<W> IntoWidget<LeafRenderObjectKind> for Wwhere
W: LeafRenderObjectWidget,
impl<W> IntoWidget<LeafRenderObjectKind> for Wwhere
W: LeafRenderObjectWidget,
Source§fn into_widget(self) -> Rc<dyn Widget>
fn into_widget(self) -> Rc<dyn Widget>
The widget as a tree node, made where this is called: its
creation_location.