ColorMaterial class
Material for rendering colored shapes without texture.
Useful for debug rendering, UI backgrounds, etc.
- Inheritance
-
- Object
- Material2D
- ColorMaterial
Constructors
- ColorMaterial({required Color color, BlendMode blendMode = BlendMode.normal})
- Creates a color material.
Properties
- blendMode → BlendMode
-
The blend mode for this material.
final
- color ↔ Color
-
The solid color.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasShader → bool
-
Whether this material uses custom shaders.
no setterinherited
- id → Object
-
Unique identifier for this material.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- supportsBatching → bool
-
Whether this material supports batching with other instances.
no setterinherited
Methods
-
canBatchWith(
Material2D other) → bool -
Compare if two materials can be batched together.
override
-
copyWith(
{Color? color, BlendMode? blendMode}) → ColorMaterial - Create a copy with optional overrides.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited