pub struct InertPlatform;Expand description
Platform for hand-pumped tests.
Trait Implementations§
Source§impl Platform for InertPlatform
impl Platform for InertPlatform
Source§fn target_platform(&self) -> TargetPlatform
fn target_platform(&self) -> TargetPlatform
Android, which is what Flutter’s own test binding defaults
debugDefaultTargetPlatform to: a bare App has no host to speak of,
and a deterministic answer beats the machine’s.
Source§fn request_frame(&self)
fn request_frame(&self)
Requests one isolate frame at the host’s next appropriate opportunity.
Source§fn implicit_view(&self) -> Option<ViewRef>
fn implicit_view(&self) -> Option<ViewRef>
The stable implicit view, when this embedding provides one.
Source§fn request_view_focus_change(
&self,
view_id: ViewId,
state: ViewFocusState,
direction: ViewFocusDirection,
)
fn request_view_focus_change( &self, view_id: ViewId, state: ViewFocusState, direction: ViewFocusDirection, )
Flutter
PlatformDispatcher.requestViewFocusChange: asks the host to move view focus.
A host without native focus support ignores the request.Source§fn locales(&self) -> Vec<Locale>
fn locales(&self) -> Vec<Locale>
The full system-reported supported locales of the device (Flutter
PlatformDispatcher.locales), in order of preference; empty until the host
reports them.Source§fn set_application_locale(&self, locale: &Locale)
fn set_application_locale(&self, locale: &Locale)
Tells the host which locale the application resolved to (Flutter
PlatformDispatcher.setApplicationLocale); the default drops it.Source§fn platform_brightness(&self) -> Brightness
fn platform_brightness(&self) -> Brightness
The platform’s light/dark preference (Flutter
PlatformDispatcher.platformBrightness). Read moreSource§fn default_route_name(&self) -> String
fn default_route_name(&self) -> String
The route the application was started with (Flutter
PlatformDispatcher.defaultRouteName). Read moreSource§fn font_source(&self) -> Option<Box<dyn FontSource>>
fn font_source(&self) -> Option<Box<dyn FontSource>>
The platform’s own font lookup: faces by family name and by codepoint, the way
Flutter’s engine asks the OS.
None for a host without one; text then shapes only
against fonts the application registers.Source§fn open_image_codec(&self, bytes: Arc<[u8]>) -> ImageCodecFuture
fn open_image_codec(&self, bytes: Arc<[u8]>) -> ImageCodecFuture
Open an encoded image, answering with a codec for its frames. Read more
Source§fn import_pixels(&self, pixels: PixelBuffer) -> Option<Image>
fn import_pixels(&self, pixels: PixelBuffer) -> Option<Image>
An image from pixels the app already holds, with no codec in between: Flutter’s
decodeImageFromPixels. None when the host has no renderer to put it on yet.Source§fn windowing_owner(&self) -> Option<Rc<dyn WindowingOwner>>
fn windowing_owner(&self) -> Option<Rc<dyn WindowingOwner>>
The host’s window maker, for an app that opens windows of its own.
None, the
default, where the implicit view is the only one there can be: mobile and the web.Source§fn clipboard(&self) -> Option<&dyn Clipboard>
fn clipboard(&self) -> Option<&dyn Clipboard>
The system clipboard, or
None where the host has none.Source§fn system_chrome(&self) -> Option<&dyn SystemChrome>
fn system_chrome(&self) -> Option<&dyn SystemChrome>
The system UI drawn around the app, or
None where the host has none.Source§fn haptics(&self) -> Option<&dyn Haptics>
fn haptics(&self) -> Option<&dyn Haptics>
Haptic feedback on the device, or
None where the host has none.The system’s own menu over a text selection, or
None where the host has none.Native pop-up menus shown at the pointer, or
None where the host has none.Source§fn text_services(&self) -> Option<&dyn TextServices>
fn text_services(&self) -> Option<&dyn TextServices>
The system services a selection toolbar offers, or
None where the host has none.Source§fn mouse_cursor(&self) -> Option<&dyn MouseCursor>
fn mouse_cursor(&self) -> Option<&dyn MouseCursor>
The system cursor shown for a pointing device, or
None where the host has none.Source§fn restoration(&self) -> Option<&dyn Restoration>
fn restoration(&self) -> Option<&dyn Restoration>
Application state kept across relaunches, or
None where the host has none.Auto Trait Implementations§
impl Freeze for InertPlatform
impl RefUnwindSafe for InertPlatform
impl Send for InertPlatform
impl Sync for InertPlatform
impl Unpin for InertPlatform
impl UnsafeUnpin for InertPlatform
impl UnwindSafe for InertPlatform
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