Skip to content

Commit b38f5c9

Browse files
committed
add isTwoToneOnly bool
1 parent 134d9a7 commit b38f5c9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/src/api/models/icon_model.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,9 @@ class MaterialIcon extends IconModel {
120120
required this.supportedStyles,
121121
});
122122

123+
/// Whether this icon is two tone only.
124+
bool get isTwoToneOnly => supportedStyles.length == 1 && supportedStyles.first == MaterialIconStyle.twoTone;
125+
123126
/// Duplicates this instance of [MaterialIcon] with given data overrides.
124127
MaterialIcon copyWith({
125128
int? codepoint,

0 commit comments

Comments
 (0)