GemCameraPlayer class Sensor Data Source

Widget for rendering camera feed frames from a controller.

Displays camera frames from a GemCameraPlayerController by rendering RGBA8888 pixel data from Camera.rgba8888. Handles iOS-specific rotation for portrait mode (applies 90-degree rotation), maintains aspect ratio, and provides flexible layout options with customizable widgets for loading, error, and end states.

This widget requires that the camera data source provides frames with Camera.rgba8888 available. May not be compatible with all external camera data sources if they do not support RGBA8888 conversion. Automatically updates when new frames arrive via the controller's ValueNotifier mechanism.

See also:

Inheritance

Constructors

GemCameraPlayer({required GemCameraPlayerController controller, Widget? fallbackWidget, Widget? loadingWidget, Widget? endWidget, BoxFit? fit, Key? key})
Creates a camera player widget with the specified controller.
const

Properties

controller GemCameraPlayerController
The controller managing camera feed playback and state.
final
endWidget Widget?
Widget displayed after camera feed playback has ended.
final
fallbackWidget Widget?
Widget displayed when camera frames cannot be decoded (error state).
final
fit BoxFit?
How the camera frames should be scaled within the widget bounds.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
loadingWidget Widget?
Widget displayed while waiting for the first camera frame (loading state).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<GemCameraPlayer>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited