Elevation class abstract
🕴 Elevation double => <BoxShadow>[]
Recreation of Material.elevation utilizing Flutter's top-level
Map<int, List<BoxShadow> kElevationToShadow.
That map only contains values for
key:0, 1, 2, 3, 4, 6, 8, 9, 12, 16, 24
Elevation's decoration methods will utilize
the largest valid key that is at least equal to this elevation
as well as the next highest available key, and BoxShadow.lerpList
the two (where t for lerpList is the percentage between
these two keys that elevation sits ).
Requests in range 24 < elevation <= 100
lerp between established kElevationToShadow.last
and Elevation-created _kArbitraryElevation100.
Left null, color defaults to three different Colors for
three different BoxShadows, as seen in kElevationToShadow:
const Color _kKeyUmbraOpacity = Color(0x33000000); // opacity = 0.2
const Color _kKeyPenumbraOpacity = Color(0x24000000); // opacity = 0.14
const Color _kAmbientShadowOpacity = Color(0x1F000000); // opacity = 0.12
- Providing a
colorwill maintain these opacities in the resultantList<BoxShadow>.- Set
preserveOpacityfalseto use the passedcolor'sopacity.
- Set
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
asBoxDecoration(
double elevation, {Color? color, bool preserveOpacity = true}) → BoxDecoration - kElevationToShadow only contains values for
-
asBoxShadows(
double elevation, {Color? color, bool preserveOpacity = true}) → List< BoxShadow> - kElevationToShadow only contains values for