MaterialStageSource constructor
const
MaterialStageSource({})
A stage of kind; without one, a fragment stage when fragment is
true and a vertex stage otherwise.
Implementation
const MaterialStageSource({
required this.name,
bool fragment = false,
ShaderStageKind? kind,
required this.glsl,
}) : assert(
kind == null || !fragment || identical(kind, ShaderStageKind.fragment),
'a stage named fragment and given another kind',
),
kind =
kind ??
(fragment ? ShaderStageKind.fragment : ShaderStageKind.vertex),
fragment = kind == null
? fragment
: identical(kind, ShaderStageKind.fragment);