Skip to content

Commit 71c9c6f

Browse files
committed
in progress
1 parent 35ef9d3 commit 71c9c6f

File tree

7 files changed

+66
-10
lines changed

7 files changed

+66
-10
lines changed

dartdoc_options.yaml

+5-4
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ dartdoc:
4040
- 'lib/src/attributes/exports.dart'
4141
- 'lib/src/attributes/text/text_short.utils.dart'
4242
- 'lib/src/attributes/text/text.props.dart'
43-
- 'lib/src/attributes/text/text.attributes.dart'
44-
- 'lib/src/attributes/text/text.utils.dart'
4543
- 'lib/src/attributes/text/text.notifier.dart'
4644
- 'lib/src/attributes/icon/icon.attributes.dart'
4745
- 'lib/src/attributes/icon/icon.props.dart'
@@ -85,15 +83,18 @@ dartdoc:
8583
- 'lib/src/widgets/remixable.widget.dart'
8684
- 'lib/src/widgets/flex.widget.dart'
8785
- 'lib/src/widgets/nothing.widget.dart'
88-
- 'lib/src/widgets/text.widget.dart'
8986
- 'lib/src/widgets/decorator.widget.dart'
9087
processed:
9188
- 'lib/src/widgets/box.widget.dart'
9289
- 'lib/src/mixer/mix_factory.dart'
9390
- 'lib/src/widgets/pressable.widget.dart'
9491
- 'lib/src/attributes/box/box.attributes.dart'
9592
- 'lib/src/attributes/box/box.utils.dart'
96-
93+
- 'lib/src/widgets/text.widget.dart'
94+
- 'lib/src/attributes/text/text.attributes.dart'
95+
- 'lib/src/attributes/text/text.utils.dart'
96+
97+
9798

9899

99100

lib/src/attributes/box/box.attributes.dart

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ import 'package:mix/src/dto/edge_insets.dto.dart';
77
import 'package:mix/src/helpers/extensions.dart';
88

99
import '../common/attribute.dart';
10-
10+
/// ## Widget:
11+
/// - [Box](Box-class.html)
1112
/// {@category Attributes}
1213
class BoxAttributes extends Attribute {
1314
final EdgeInsetsDto? margin;

lib/src/attributes/box/box.utils.dart

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ import 'package:mix/src/dto/border_radius.dto.dart';
55
import 'package:mix/src/dto/box_shadow.dto.dart';
66
import 'package:mix/src/dto/edge_insets.dto.dart';
77
import 'package:mix/src/helpers/extensions.dart';
8-
8+
///
9+
/// ## Widget:
10+
/// - [Box](Box-class.html)
911
/// {@category Utilities}
1012
class BoxUtility {
1113
const BoxUtility._();

lib/src/attributes/text/text.attributes.dart

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ import 'package:mix/src/helpers/extensions.dart';
33
import 'package:mix/src/theme/refs/refs.dart';
44

55
import '../common/attribute.dart';
6-
6+
/// ## Widget:
7+
/// - [TextMix](TextMix-class.html)
8+
/// {@category Attributes}
79
class TextAttributes extends Attribute {
810
final TextStyle? style;
911
// Ref for context

lib/src/attributes/text/text.utils.dart

+38-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import 'dart:ui';
22

33
import 'package:flutter/material.dart';
44
import 'package:mix/src/attributes/text/text.attributes.dart';
5-
5+
/// @nodoc
66
class TextFriendlyUtility {
77
const TextFriendlyUtility._();
88

@@ -83,176 +83,212 @@ class TextFriendlyUtility {
8383
]);
8484
}
8585
}
86-
86+
/// ## Widget:
87+
/// - [TextMix](TextMix-class.html)
88+
/// {@category Utilities}
8789
class TextUtility {
8890
const TextUtility._();
8991

92+
/// Short Utils: style
9093
static TextAttributes style(TextStyle? style) {
9194
return TextAttributes(style: style);
9295
}
9396

97+
/// Short Utils: strutStyle
9498
static TextAttributes strutStyle(StrutStyle? strutStyle) {
9599
return TextAttributes(strutStyle: strutStyle);
96100
}
97101

102+
/// Short Utils: textAlign
98103
static TextAttributes textAlign(TextAlign? textAlign) {
99104
return TextAttributes(textAlign: textAlign);
100105
}
101106

107+
/// Short Utils: locale
102108
static TextAttributes locale(Locale? locale) {
103109
return TextAttributes(locale: locale);
104110
}
105111

112+
/// Short Utils: softWrap
106113
static TextAttributes softWrap(bool? softWrap) {
107114
return TextAttributes(softWrap: softWrap);
108115
}
109116

117+
/// Short Utils: overflow
110118
static TextAttributes overflow(TextOverflow? overflow) {
111119
return TextAttributes(overflow: overflow);
112120
}
113121

122+
/// Short Utils: textScaleFactor
114123
static TextAttributes textScaleFactor(double? textScaleFactor) {
115124
return TextAttributes(textScaleFactor: textScaleFactor);
116125
}
117126

127+
/// Short Utils: maxLines
118128
static TextAttributes maxLines(int? maxLines) {
119129
return TextAttributes(maxLines: maxLines);
120130
}
121131

132+
/// Short Utils: textWidthBasis
122133
static TextAttributes textWidthBasis(TextWidthBasis? textWidthBasis) {
123134
return TextAttributes(textWidthBasis: textWidthBasis);
124135
}
125136
}
126137

138+
/// ## Widget:
139+
/// - [TextMix](TextMix-class.html)
140+
/// {@category Utilities}
127141
class TextStyleUtility {
128142
const TextStyleUtility._();
129143

144+
/// Short Utils: textBackground
130145
static TextAttributes background(Paint? background) {
131146
return TextAttributes(
132147
style: TextStyle(background: background),
133148
);
134149
}
135150

151+
/// Short Utils: textBgColor
136152
static TextAttributes backgroundColor(Color? backgroundColor) {
137153
return TextAttributes(
138154
style: TextStyle(backgroundColor: backgroundColor),
139155
);
140156
}
141157

158+
/// Short Utils: textColor
142159
static TextAttributes color(Color? color) {
143160
return TextAttributes(
144161
style: TextStyle(color: color),
145162
);
146163
}
147164

165+
/// Short Utils: debugLabel
148166
static TextAttributes debugLabel(String? debugLabel) {
149167
return TextAttributes(
150168
style: TextStyle(debugLabel: debugLabel),
151169
);
152170
}
153171

172+
/// Short Utils: textDecoration
154173
static TextAttributes decoration(TextDecoration? decoration) {
155174
return TextAttributes(
156175
style: TextStyle(decoration: decoration),
157176
);
158177
}
159178

179+
/// Short Utils: textDecorationColor
160180
static TextAttributes decorationColor(Color? decorationColor) {
161181
return TextAttributes(
162182
style: TextStyle(decorationColor: decorationColor),
163183
);
164184
}
165185

186+
/// Short Utils: textDecorationStyle
166187
static TextAttributes decorationStyle(TextDecorationStyle? decorationStyle) {
167188
return TextAttributes(
168189
style: TextStyle(decorationStyle: decorationStyle),
169190
);
170191
}
171192

193+
/// Short Utils: textDecorationThickness
172194
static TextAttributes decorationThickness(double? decorationThickness) {
173195
return TextAttributes(
174196
style: TextStyle(decorationThickness: decorationThickness),
175197
);
176198
}
177199

200+
/// Short Utils: (none)
178201
static TextAttributes fontFamily(String? fontFamily) {
179202
return TextAttributes(
180203
style: TextStyle(fontFamily: fontFamily),
181204
);
182205
}
183206

207+
/// Short Utils: fontFamilyFallback
184208
static TextAttributes fontFamilyFallback(List<String>? fontFamilyFallback) {
185209
return TextAttributes(
186210
style: TextStyle(fontFamilyFallback: fontFamilyFallback),
187211
);
188212
}
189213

214+
/// Short Utils: fontFeatures
190215
static TextAttributes fontFeatures(List<FontFeature>? fontFeatures) {
191216
return TextAttributes(
192217
style: TextStyle(fontFeatures: fontFeatures),
193218
);
194219
}
195220

221+
/// Short Utils: fontSize
196222
static TextAttributes fontSize(double? fontSize) {
197223
return TextAttributes(
198224
style: TextStyle(fontSize: fontSize),
199225
);
200226
}
201227

228+
/// Short Utils: fontStyle
202229
static TextAttributes fontStyle(FontStyle? fontStyle) {
203230
return TextAttributes(
204231
style: TextStyle(fontStyle: fontStyle),
205232
);
206233
}
207234

235+
/// Short Utils: (none)
208236
static TextAttributes fontWeight(FontWeight? fontWeight) {
209237
return TextAttributes(
210238
style: TextStyle(fontWeight: fontWeight),
211239
);
212240
}
213241

242+
/// Short Utils: textForeground
214243
static TextAttributes foreground(Paint? foreground) {
215244
return TextAttributes(
216245
style: TextStyle(foreground: foreground),
217246
);
218247
}
219248

249+
/// Short Utils: textHeight
220250
static TextAttributes height(double? height) {
221251
return TextAttributes(
222252
style: TextStyle(height: height),
223253
);
224254
}
225255

256+
/// Short Utils: inherit
226257
static TextAttributes inherit({inherit = true}) {
227258
return TextAttributes(
228259
style: TextStyle(inherit: inherit),
229260
);
230261
}
231262

263+
/// Short Utils: letterSpacing
232264
static TextAttributes letterSpacing(double? letterSpacing) {
233265
return TextAttributes(
234266
style: TextStyle(letterSpacing: letterSpacing),
235267
);
236268
}
237269

270+
/// Short Utils: (none - see under TextAttributes)
238271
static TextAttributes locale(Locale? locale) {
239272
return TextAttributes(
240273
style: TextStyle(locale: locale),
241274
);
242275
}
243276

277+
/// Short Utils: textShadows
244278
static TextAttributes shadows(List<Shadow> shadows) {
245279
return TextAttributes(
246280
style: TextStyle(shadows: shadows),
247281
);
248282
}
249283

284+
/// Short Utils: textBaseline
250285
static TextAttributes textBaseline(TextBaseline? textBaseline) {
251286
return TextAttributes(
252287
style: TextStyle(textBaseline: textBaseline),
253288
);
254289
}
255290

291+
/// Short Utils: wordSpacing
256292
static TextAttributes wordSpacing(double? wordSpacing) {
257293
return TextAttributes(
258294
style: TextStyle(wordSpacing: wordSpacing),

lib/src/widgets/box.widget.dart

+5-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ import '../mixer/mix_factory.dart';
66
import 'decorator.widget.dart';
77
import 'mixable.widget.dart';
88
import 'nothing.widget.dart';
9-
9+
/// ## Attributes:
10+
/// - [BoxAttributes](BoxAttributes-class.html)
11+
/// ## Utilities:
12+
/// - [BoxUtility](BoxUtility-class.html)
13+
///
1014
/// {@category Mixable Widgets}
1115
class Box extends MixableWidget {
1216
const Box({

lib/src/widgets/text.widget.dart

+10
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@ import '../mixer/mix_context.dart';
88
import '../mixer/mix_factory.dart';
99
import 'mixable.widget.dart';
1010

11+
/// _Mix_ corollary to Flutter _Text_ widget
12+
/// Use wherever you would use a Flutter _Text_ widget
13+
///
14+
/// ## Attributes:
15+
/// - [TextAttributes](TextAttributes-class.html)
16+
/// ## Utilities:
17+
/// - [TextUtility](TextUtility-class.html)
18+
/// - [TextStyleUtility](TextStyleUtility-class.html)
19+
/// {@category Mixable Widgets}
1120
class TextMix extends MixableWidget {
1221
const TextMix(
1322
this.text, {
@@ -37,6 +46,7 @@ class TextMix extends MixableWidget {
3746
}
3847
}
3948

49+
/// @nodoc
4050
class TextMixerWidget extends MixedWidget {
4151
const TextMixerWidget(
4252
MixContext mixer, {

0 commit comments

Comments
 (0)