ToothArchWidget class

A top-down occlusal view of the human dental arch.

Runs an internal breathing animation for the currently-brushed tooth's glow highlight. All state (completed set, active tooth) is fed in by the parent; the widget itself is a pure view.

Layout: the widget lays out to a self-computed aspect ratio (roughly 0.78), clamped to a sensible width when placed inside an Expanded.

Example:

ToothArchWidget(
  mode: ToothChartMode.adult,
  completedFdis: const {18, 17, 16},
  currentFdi: 15,
)
Inheritance

Constructors

ToothArchWidget({Key? key, ToothChartMode mode = ToothChartMode.adult, Set<int> completedFdis = const <int>{}, int? currentFdi, Set<int> currentSectorFdis = const <int>{}, ToothChartPalette? palette, void onToothTap(int fdi)?, bool showGumBackground = true, bool showArchLabels = true, String upperLabel = 'Upper', String lowerLabel = 'Lower', bool showActiveFdiLabel = true, Duration breathPeriod = const Duration(milliseconds: 1600)})
const

Properties

breathPeriod → Duration
Duration of one full breath of the active-tooth glow. Two full cycles (in + out) equal breathPeriod * 2 since the animation reverses.
final
completedFdis → Set<int>
FDI set of teeth already completed (e.g. {18, 17, 16, 15, 14}).
final
currentFdi → int?
FDI of the tooth currently being brushed (rendered with a pulsing glow), or null when idle.
final
currentSectorFdis → Set<int>
FDI set of teeth in the currently-active sector. Currently unused visually; forwarded to the painter for future use.
final
hashCode → int
The hash code for this object.
no setterinherited
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
lowerLabel → String
Text drawn below the lower arch.
final
mode → ToothChartMode
Which arch to render.
final
onToothTap → void Function(int fdi)?
Optional callback when a tooth is tapped. Not yet implemented — the occlusal painter uses a single CustomPaint, so hit-testing individual teeth requires future work. Reserved in the API for stability.
final
palette → ToothChartPalette?
Colour theme. Defaults to ToothChartPalette.dark.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
showActiveFdiLabel → bool
Whether to render the FDI number above the currently-active tooth.
final
showArchLabels → bool
Whether to render the small labels above/below the arch.
final
showGumBackground → bool
Whether to render the gum background beneath the teeth.
final
upperLabel → String
Text drawn above the upper arch.
final

Methods

createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → State<ToothArchWidget>
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