Skip to content

Commit 187fe93

Browse files
tilucasoliclaude
andcommitted
chore(preview): bump mix to ^2.0.2 and update showcases for new API
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 225e864 commit 187fe93

3 files changed

Lines changed: 12 additions & 14 deletions

File tree

packages/mix_docs_preview/lib/homepage/buttons_showcase.dart

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff 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
),

packages/mix_docs_preview/lib/homepage/variants_showcase.dart

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff 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
}

packages/mix_docs_preview/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)