defineCSS function
CssStyleDeclaration
defineCSS(
- CssStyleDeclaration? currentCSS,
- CssStyleDeclaration? appendCSS, [
- dynamic defaultCSS
Defines a new CssStyleDeclaration merging currentCSS
and appendCSS
.
defaultCSS
if currentCSS
and appendCSS
are null
.
Implementation
CssStyleDeclaration defineCSS(
CssStyleDeclaration? currentCSS, CssStyleDeclaration? appendCSS,
[dynamic defaultCSS]) {
if (currentCSS == null) {
return appendCSS ?? asCssStyleDeclaration(defaultCSS);
} else if (appendCSS == null) {
return currentCSS;
} else {
return CssStyleDeclaration()
..cssText = '${currentCSS.cssText!} ; ${appendCSS.cssText!}';
}
}