ModelSizeSegmentedControl class

Picks the active YOLO26 model size using a CupertinoSlidingSegmentedControl styled to match yolo-ios-app's Main.storyboard modelSegmentedControl. Chips read YOLO26n / YOLO26s / YOLO26m / YOLO26l / YOLO26x; sizes not yet on disk get a ↓ prefix to signal a download-on-tap. When downloadingSize matches a chip a thin LinearProgressIndicator tracks downloadFraction under the label.

Visual tokens: translucent black background, 18% white selected thumb, 11pt system-weight labels in white (light weight bump when active).

Inheritance

Constructors

ModelSizeSegmentedControl({Key? key, required String currentSize, required Set<String> availableSizes, required ValueChanged<String> onSizeChanged, String? downloadingSize, double? downloadFraction, Set<String> supportedSizes = const {'n', 's', 'm', 'l', 'x'}})
const

Properties

availableSizes → Set<String>
Sizes already present on-disk; missing sizes still appear with the ↓ prefix so the user can tap to start a download.
final
currentSize → String
Currently-selected size (one of n s m l x).
final
downloadFraction → double?
Fraction in [0,1] for the active download. null while indeterminate.
final
downloadingSize → String?
Size currently being downloaded (renders a progress indicator on that chip). null when no download is in-flight.
final
hashCode → int
The hash code for this object.
no setterinherited
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onSizeChanged → ValueChanged<String>
Invoked with the tapped size. Tapping a missing size is treated as a download request — the parent kicks off the resolver.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
supportedSizes → Set<String>
Sizes the resolver can fetch on the current platform. Sizes outside this set are hidden from the segmented control so users can't tap a chip that has no asset to download. Defaults to all five.
final

Methods

build(BuildContext context) → Widget
Describes the part of the user interface represented by this widget.
override
createElement() → StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
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