@@ -108,6 +108,9 @@ class MaterialIcon extends IconModel {
108108 /// Supported styles for this material icon.
109109 final List <MaterialIconStyle > supportedStyles;
110110
111+ /// Version of this material icon.
112+ final int ? version;
113+
111114 @override
112115 final String type = 'MATERIAL_ICON' ;
113116
@@ -118,23 +121,28 @@ class MaterialIcon extends IconModel {
118121 required super .name,
119122 required this .style,
120123 required this .supportedStyles,
124+ this .version = 1 ,
121125 });
122126
123127 /// Whether this icon is two tone only.
124- bool get isTwoToneOnly => supportedStyles.length == 1 && supportedStyles.first == MaterialIconStyle .twoTone;
128+ bool get isTwoToneOnly =>
129+ supportedStyles.length == 1 &&
130+ supportedStyles.first == MaterialIconStyle .twoTone;
125131
126132 /// Duplicates this instance of [MaterialIcon] with given data overrides.
127133 MaterialIcon copyWith ({
128134 int ? codepoint,
129135 String ? name,
130136 MaterialIconStyle ? style,
131137 List <MaterialIconStyle >? supportedStyles,
138+ int ? version,
132139 }) =>
133140 MaterialIcon (
134141 codepoint: codepoint ?? this .codepoint,
135142 name: name ?? this .name,
136143 style: style ?? this .style,
137144 supportedStyles: supportedStyles ?? this .supportedStyles,
145+ version: version ?? this .version,
138146 );
139147
140148 /// Factory constructor for creating a new [MaterialIcon] instance from
@@ -149,6 +157,7 @@ class MaterialIcon extends IconModel {
149157 name,
150158 style,
151159 supportedStyles,
160+ version,
152161 ];
153162
154163 @override
0 commit comments