MinimalShapes class

The corner scale every framed part reads, on MinimalThemeData.shapes: each size is derived from the base radius.

step from radius at 8 parts
mark 4 px squarer 4 a checkbox's box, a tag, a status label, a key cap, a segment's plate
small radius 8 buttons, fields, selects, the segmented track, steppers, picker cells, a button group
medium 2 px rounder 10 cards, list sections, menus, the snack bar, banners, the command palette
large 6 px rounder 14 dialogs and bottom sheets
pill a capsule chips, a switch's track, progress and slider tracks, count badges, page dots

MinimalShapes(radius: 0) squares every step, the capsules too. A part inside another takes its frame's shape inset by the gap between them, so the two stay concentric. What is round by meaning stays round whatever the scale: a radio, a slider's thumb, an avatar, a status dot and a step's marker. One part's own corners are its component theme's shape.

final softer = MinimalThemeData.standard().copyWith(
  shapes: const MinimalShapes(radius: 12),
);
Mixed-in types
Annotations

Constructors

MinimalShapes({double radius = 8})
The scale from radius; 8 is the look's own.
const

Properties

hashCode → int
The hash code for this object.
no setteroverride
large → OutlinedBorder
Dialogs and bottom sheets.
no setter
mark → OutlinedBorder
A checkbox's box, a tag, a key cap, a segment's plate.
no setter
medium → OutlinedBorder
Cards, list sections, menus, the snack bar and the command palette.
no setter
pill → OutlinedBorder
What a capsule role draws on this scale — a switch's track, a progress bar, a slider's track, a count badge, a chip, page dots: a capsule, square at a radius of 0.
no setter
radius → double
The one radius the steps derive from: small's.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
small → OutlinedBorder
Buttons, fields, selects, the segmented track, chips and steppers.
no setter

Methods

copyWith({double? radius}) → MinimalShapes
This at another radius.
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
override
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
toStringShort() → String
A brief description of this object, usually just the runtimeType and the hashCode.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
override

Static Methods

inset(OutlinedBorder shape, double inset) → OutlinedBorder
shape drawn inset px inside another, for a plate that sits within a frame (a segment in its track, a thumb in its slot): its corners shrink by inset, never below 0, so the two stay concentric. A capsule, a circle or a shape this does not know comes back as given.
lerp(MinimalShapes a, MinimalShapes b, double t) → MinimalShapes
Between a and b: the radius eases.
radiusOf(ShapeBorder? shape) → double
The corner radius shape draws, for a part that paints a BorderRadius rather than a shape: a rounded rectangle's (and a bevel's, a squircle's) top-start corner, a capsule's or a circle's fullRadius, 0 for any other shape.

Constants

fullRadius → const double
A radius that rounds any part's ends fully: what radiusOf says for a capsule or a circle.
look → const MinimalShapes
The look's own scale: 4, 8, 10 and 14 px corners.