theme property
ThemeData
get
theme
Returns the SDK Material theme, or its fallback without a current context.
Migration notice: this supported getter reads Theme from
package:flutter/material.dart, not the standalone Material theme.
Deprecation is planned after a stable standalone SINT replacement; see the
migration guide.
Implementation
ThemeData get theme {
var theme = ThemeData.fallback();
if (context != null) {
theme = Theme.of(context!);
}
return theme;
}