@@ -2,7 +2,7 @@ import 'dart:ui';
2
2
3
3
import 'package:flutter/material.dart' ;
4
4
import 'package:mix/src/attributes/text/text.attributes.dart' ;
5
-
5
+ /// @nodoc
6
6
class TextFriendlyUtility {
7
7
const TextFriendlyUtility ._();
8
8
@@ -83,176 +83,212 @@ class TextFriendlyUtility {
83
83
]);
84
84
}
85
85
}
86
-
86
+ /// ## Widget:
87
+ /// - [TextMix] (TextMix-class.html)
88
+ /// {@category Utilities}
87
89
class TextUtility {
88
90
const TextUtility ._();
89
91
92
+ /// Short Utils: style
90
93
static TextAttributes style (TextStyle ? style) {
91
94
return TextAttributes (style: style);
92
95
}
93
96
97
+ /// Short Utils: strutStyle
94
98
static TextAttributes strutStyle (StrutStyle ? strutStyle) {
95
99
return TextAttributes (strutStyle: strutStyle);
96
100
}
97
101
102
+ /// Short Utils: textAlign
98
103
static TextAttributes textAlign (TextAlign ? textAlign) {
99
104
return TextAttributes (textAlign: textAlign);
100
105
}
101
106
107
+ /// Short Utils: locale
102
108
static TextAttributes locale (Locale ? locale) {
103
109
return TextAttributes (locale: locale);
104
110
}
105
111
112
+ /// Short Utils: softWrap
106
113
static TextAttributes softWrap (bool ? softWrap) {
107
114
return TextAttributes (softWrap: softWrap);
108
115
}
109
116
117
+ /// Short Utils: overflow
110
118
static TextAttributes overflow (TextOverflow ? overflow) {
111
119
return TextAttributes (overflow: overflow);
112
120
}
113
121
122
+ /// Short Utils: textScaleFactor
114
123
static TextAttributes textScaleFactor (double ? textScaleFactor) {
115
124
return TextAttributes (textScaleFactor: textScaleFactor);
116
125
}
117
126
127
+ /// Short Utils: maxLines
118
128
static TextAttributes maxLines (int ? maxLines) {
119
129
return TextAttributes (maxLines: maxLines);
120
130
}
121
131
132
+ /// Short Utils: textWidthBasis
122
133
static TextAttributes textWidthBasis (TextWidthBasis ? textWidthBasis) {
123
134
return TextAttributes (textWidthBasis: textWidthBasis);
124
135
}
125
136
}
126
137
138
+ /// ## Widget:
139
+ /// - [TextMix] (TextMix-class.html)
140
+ /// {@category Utilities}
127
141
class TextStyleUtility {
128
142
const TextStyleUtility ._();
129
143
144
+ /// Short Utils: textBackground
130
145
static TextAttributes background (Paint ? background) {
131
146
return TextAttributes (
132
147
style: TextStyle (background: background),
133
148
);
134
149
}
135
150
151
+ /// Short Utils: textBgColor
136
152
static TextAttributes backgroundColor (Color ? backgroundColor) {
137
153
return TextAttributes (
138
154
style: TextStyle (backgroundColor: backgroundColor),
139
155
);
140
156
}
141
157
158
+ /// Short Utils: textColor
142
159
static TextAttributes color (Color ? color) {
143
160
return TextAttributes (
144
161
style: TextStyle (color: color),
145
162
);
146
163
}
147
164
165
+ /// Short Utils: debugLabel
148
166
static TextAttributes debugLabel (String ? debugLabel) {
149
167
return TextAttributes (
150
168
style: TextStyle (debugLabel: debugLabel),
151
169
);
152
170
}
153
171
172
+ /// Short Utils: textDecoration
154
173
static TextAttributes decoration (TextDecoration ? decoration) {
155
174
return TextAttributes (
156
175
style: TextStyle (decoration: decoration),
157
176
);
158
177
}
159
178
179
+ /// Short Utils: textDecorationColor
160
180
static TextAttributes decorationColor (Color ? decorationColor) {
161
181
return TextAttributes (
162
182
style: TextStyle (decorationColor: decorationColor),
163
183
);
164
184
}
165
185
186
+ /// Short Utils: textDecorationStyle
166
187
static TextAttributes decorationStyle (TextDecorationStyle ? decorationStyle) {
167
188
return TextAttributes (
168
189
style: TextStyle (decorationStyle: decorationStyle),
169
190
);
170
191
}
171
192
193
+ /// Short Utils: textDecorationThickness
172
194
static TextAttributes decorationThickness (double ? decorationThickness) {
173
195
return TextAttributes (
174
196
style: TextStyle (decorationThickness: decorationThickness),
175
197
);
176
198
}
177
199
200
+ /// Short Utils: (none)
178
201
static TextAttributes fontFamily (String ? fontFamily) {
179
202
return TextAttributes (
180
203
style: TextStyle (fontFamily: fontFamily),
181
204
);
182
205
}
183
206
207
+ /// Short Utils: fontFamilyFallback
184
208
static TextAttributes fontFamilyFallback (List <String >? fontFamilyFallback) {
185
209
return TextAttributes (
186
210
style: TextStyle (fontFamilyFallback: fontFamilyFallback),
187
211
);
188
212
}
189
213
214
+ /// Short Utils: fontFeatures
190
215
static TextAttributes fontFeatures (List <FontFeature >? fontFeatures) {
191
216
return TextAttributes (
192
217
style: TextStyle (fontFeatures: fontFeatures),
193
218
);
194
219
}
195
220
221
+ /// Short Utils: fontSize
196
222
static TextAttributes fontSize (double ? fontSize) {
197
223
return TextAttributes (
198
224
style: TextStyle (fontSize: fontSize),
199
225
);
200
226
}
201
227
228
+ /// Short Utils: fontStyle
202
229
static TextAttributes fontStyle (FontStyle ? fontStyle) {
203
230
return TextAttributes (
204
231
style: TextStyle (fontStyle: fontStyle),
205
232
);
206
233
}
207
234
235
+ /// Short Utils: (none)
208
236
static TextAttributes fontWeight (FontWeight ? fontWeight) {
209
237
return TextAttributes (
210
238
style: TextStyle (fontWeight: fontWeight),
211
239
);
212
240
}
213
241
242
+ /// Short Utils: textForeground
214
243
static TextAttributes foreground (Paint ? foreground) {
215
244
return TextAttributes (
216
245
style: TextStyle (foreground: foreground),
217
246
);
218
247
}
219
248
249
+ /// Short Utils: textHeight
220
250
static TextAttributes height (double ? height) {
221
251
return TextAttributes (
222
252
style: TextStyle (height: height),
223
253
);
224
254
}
225
255
256
+ /// Short Utils: inherit
226
257
static TextAttributes inherit ({inherit = true }) {
227
258
return TextAttributes (
228
259
style: TextStyle (inherit: inherit),
229
260
);
230
261
}
231
262
263
+ /// Short Utils: letterSpacing
232
264
static TextAttributes letterSpacing (double ? letterSpacing) {
233
265
return TextAttributes (
234
266
style: TextStyle (letterSpacing: letterSpacing),
235
267
);
236
268
}
237
269
270
+ /// Short Utils: (none - see under TextAttributes)
238
271
static TextAttributes locale (Locale ? locale) {
239
272
return TextAttributes (
240
273
style: TextStyle (locale: locale),
241
274
);
242
275
}
243
276
277
+ /// Short Utils: textShadows
244
278
static TextAttributes shadows (List <Shadow > shadows) {
245
279
return TextAttributes (
246
280
style: TextStyle (shadows: shadows),
247
281
);
248
282
}
249
283
284
+ /// Short Utils: textBaseline
250
285
static TextAttributes textBaseline (TextBaseline ? textBaseline) {
251
286
return TextAttributes (
252
287
style: TextStyle (textBaseline: textBaseline),
253
288
);
254
289
}
255
290
291
+ /// Short Utils: wordSpacing
256
292
static TextAttributes wordSpacing (double ? wordSpacing) {
257
293
return TextAttributes (
258
294
style: TextStyle (wordSpacing: wordSpacing),
0 commit comments