File tree Expand file tree Collapse file tree
packages/mix_docs_preview Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,28 +22,30 @@ class Example extends StatelessWidget {
2222 .animate (.easeInOut (180. ms))
2323 .scale (1 )
2424 .onPressed (.scale (0.95 ))
25- .wrap (. defaultText ( TextStyler (). fontSize (14 ).fontWeight (.w600)));
25+ .textStyle (. fontSize (14 ).fontWeight (.w600). color ( Colors .white ));
2626
2727 final solidButtonStyle = buttonStyle
2828 .color (Colors .deepPurpleAccent)
29- .wrap (. defaultText (. color (Colors .white) ));
29+ .textStyle (. fontSize ( 14 ). fontWeight (.w600). color (Colors .white));
3030
3131 final outlinedButtonStyle = buttonStyle
3232 .border (.all (.color (Colors .deepPurpleAccent).width (1.5 )))
33- .wrap (.defaultText (.color (Colors .deepPurpleAccent)));
33+ .textStyle (
34+ .fontSize (14 ).fontWeight (.w600).color (Colors .deepPurpleAccent),
35+ );
3436
3537 return Center (
3638 child: Row (
3739 mainAxisSize: MainAxisSize .min,
3840 children: [
3941 Pressable (
4042 onPress: () {},
41- child: solidButtonStyle (child: const Text ('Solid' )),
43+ child: solidButtonStyle (child: StyledText ('Solid' )),
4244 ),
4345 const SizedBox (width: 12 ),
4446 Pressable (
4547 onPress: () {},
46- child: outlinedButtonStyle (child: const Text ('Outlined' )),
48+ child: outlinedButtonStyle (child: StyledText ('Outlined' )),
4749 ),
4850 ],
4951 ),
Original file line number Diff line number Diff line change @@ -19,16 +19,12 @@ class Example extends StatelessWidget {
1919 .borderRadius (.circular (16 ))
2020 .color (Colors .cyan)
2121 .alignment (.center)
22- .animate (. easeInOut ( 220. ms ))
22+ .textStyle (. color ( Colors .white). fontSize ( 16 ))
2323 .scale (1 )
24- .onHovered (.color (Colors .cyanAccent).scale (1.2 ));
24+ .onHovered (.color (Colors .cyanAccent).scale (1.2 ))
25+ .animate (.easeInOut (220. ms));
2526
26- return box (
27- child: const Text (
28- 'Hover' ,
29- style: TextStyle (color: Colors .white, fontSize: 16 ),
30- ),
31- );
27+ return box (child: StyledText ('Hover' ));
3228 // #enddocregion showcase
3329 }
3430}
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ dependencies:
1111 cupertino_icons : ^1.0.8
1212 flutter :
1313 sdk : flutter
14- mix : ^2.0.1
14+ mix : ^2.0.2
1515 mix_tailwinds : ^0.0.1-alpha.1
1616 remix : ^0.2.0
1717
You can’t perform that action at this time.
0 commit comments