Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions components/HomeContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ export const HomeContent = () => {
<HighlightedCode code={`// Style can live outside the widget
final cardStyle = BoxStyler()
.color(Colors.blue)
.paddingAll(16)
.borderRounded(8);
.padding(.all(16))
.borderRadius(.circular(8));

// Widget stays clean
Box(style: cardStyle, child: ...)`} />
Expand Down
2 changes: 1 addition & 1 deletion packages/mix_docs_preview/lib/components/chip_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ final chipButtonContainer = BoxStyler()
.height(40)
.width(120)
.color(Colors.blue)
.borderRounded(20)
.borderRadius(.circular(20))
.onHovered(.color(Colors.blue.shade700))
.variant(ContextVariant.widgetState(.selected), .color(Colors.black))
.alignment(.center)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class _ExampleState extends State<Example> {
.color(Colors.black)
.height(100)
.width(100)
.borderRounded(10)
.borderRadius(.circular(10))
.translate(appear ? 0 : -50, 0)
.scale(appear ? 1 : 0.1)
.animate(.easeInOut(1.s));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class _ExampleState extends State<Example> {
.color(Colors.black)
.height(100)
.width(100)
.borderRounded(10)
.borderRadius(.circular(10))
.transform(.identity())
.translate(0, _translated ? 100 : -100)
.animate(.spring(300.ms, bounce: 0.6));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class ImplicitVariantHoverExample extends StatelessWidget {
final box = BoxStyler()
.color(Colors.black)
.size(100, 100)
.borderRounded(10)
.borderRadius(.circular(10))
.scale(1)
.onHovered(.color(Colors.blue).scale(1.5))
.animate(.spring(800.ms));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ class _PhaseTapCompressExampleState extends State<PhaseTapCompressExample> {
.color(Colors.deepPurple)
.height(100)
.width(100)
.borderRounded(40)
.borderRadius(.circular(40))
.phaseAnimation(
trigger: _isExpanded,
phases: AnimationPhases.values,
styleBuilder: (phase, style) => switch (phase) {
.initial => style.scale(1),
.compress => style.scale(0.75).color(Colors.red.shade800),
.expanded =>
style.scale(1.25).borderRounded(20).color(Colors.yellow.shade300),
style.scale(1.25).borderRadius(.circular(20)).color(Colors.yellow.shade300),
},
configBuilder: (phase) => switch (phase) {
.initial => .springWithDampingRatio(800.ms, ratio: 0.3),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Example extends StatelessWidget {
.color(Colors.red)
.height(100)
.width(100)
.borderRounded(10)
.borderRadius(.circular(10))
.onHovered(.color(Colors.blue).width(200));

final styleB = styleA.onHovered(.color(Colors.green));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class _ExampleState extends State<Example> {
style: BoxStyler()
.color(Colors.red)
.size(100, 100)
.borderRounded(10)
.borderRadius(.circular(10))
.variant(
ContextVariant('custom_flag', (context) {
return CustomInheritedWidget.of(context)?.flag ?? false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Example extends StatelessWidget {
.color(Colors.red)
.height(100)
.width(100)
.borderRounded(10)
.borderRadius(.circular(10))
.onDisabled(.color(Colors.grey));

return Pressable(enabled: false, child: box());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class _ExampleState extends State<Example> {
.color(Colors.red)
.height(100)
.width(100)
.borderRounded(10)
.borderRadius(.circular(10))
.wrap(.new().opacity(0.4))
.onFocused(
.color(Colors.blue).border(.all(.color(Colors.blue.shade700).width(3))),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Example extends StatelessWidget {
.color(Colors.red)
.height(100)
.width(100)
.borderRounded(10)
.borderRadius(.circular(10))
.onHovered(.color(Colors.blue));

return box();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class _ExampleState extends State<Example> {
.color(Colors.red)
.height(100)
.width(100)
.borderRounded(10)
.borderRadius(.circular(10))
.onHovered(hoverStyle);

return MediaQuery(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class _ExampleState extends State<Example> {
final buttonStyle = BoxStyler()
.height(60)
.width(60)
.borderRounded(30)
.borderRadius(.circular(30))
.color(Colors.grey.shade200)
.animate(.easeInOut(600.ms))
.onDark(.color(Colors.grey.shade800))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Example extends StatelessWidget {
.color(Colors.red)
.height(100)
.width(100)
.borderRounded(10)
.borderRadius(.circular(10))
.onPressed(.color(Colors.blue));

return Pressable(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Example extends StatelessWidget {
.height(100)
.color(Colors.blue.shade400)
.onBreakpoint(Breakpoint.maxWidth(575), .color(Colors.green))
.borderRounded(16)
.borderRadius(.circular(16))
.shadow(.color(Colors.black.withValues(alpha: 0.2)).blurRadius(20))
.wrap(
WidgetModifierConfig.defaultText(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class _ExampleState extends State<Example> {
.color(Colors.red)
.height(100)
.width(100)
.borderRounded(10)
.borderRadius(.circular(10))
.variant(ContextVariant.widgetState(.selected), .color(Colors.blue));

return Pressable(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class _ExampleState extends State<Example> {
final style = BoxStyler()
.height(60)
.width(120)
.borderRounded(30)
.borderRadius(.circular(30))
.color(Colors.grey.shade200)
.border(.all(.color(Colors.grey.shade300).width(2)))
.animate(.spring(300.ms))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class Example extends StatelessWidget {
@override
Widget build(BuildContext context) {
final style = BoxStyler.size(200, 100)
.borderRounded(16)
.borderRadius(.circular(16))
.shadow(
.color(Colors.purple.shade200).offset(x: 0, y: 8).blurRadius(20),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Example extends StatelessWidget {
@override
Widget build(BuildContext context) {
final style = BoxStyler.size(150, 150)
.borderRounded(75)
.borderRadius(.circular(75))
.shadow(.color(Colors.orange.shade400).blurRadius(30).spreadRadius(5))
.radialGradient(
colors: [Colors.orange.shade300, Colors.deepOrange.shade600],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Example extends StatelessWidget {
@override
Widget build(BuildContext context) {
final style = BoxStyler.size(120, 120)
.borderRounded(60)
.borderRadius(.circular(60))
.shadow(.color(Colors.purple.shade300).blurRadius(25).spreadRadius(2))
.sweepGradient(
colors: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Example extends StatelessWidget {
final base = BoxStyler()
.paddingX(16)
.paddingY(8)
.borderRounded(8)
.borderRadius(.circular(8))
.color(Colors.black);

final solid = base.color(Colors.blue);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Example extends StatelessWidget {
final buttonStyle = BoxStyler()
.height(40)
.paddingX(14)
.borderRounded(10)
.borderRadius(.circular(10))
.alignment(.center)
.animate(.easeInOut(180.ms))
.scale(1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Example extends StatelessWidget {
// #docregion showcase
final boxStyle = BoxStyler()
.size(120, 120)
.borderRounded(16)
.borderRadius(.circular(16))
.color(Colors.deepPurple);

return boxStyle();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Example extends StatelessWidget {
// #docregion showcase
final cardStyle = BoxStyler()
.size(120, 120)
.borderRounded(16)
.borderRadius(.circular(16))
.color(Colors.cyan)
.alignment(.center)
.animate(.easeInOut(220.ms))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class CustomMixWidget extends StatelessWidget {

BoxStyler get customBoxStyle => BoxStyler()
.padding(.symmetric(horizontal: 12, vertical: 8))
.borderRounded(10)
.borderRadius(.circular(10))
.color(surfaceColor)
.border(.all(.color(surfaceColor)))
.animate(.easeInOut(100.ms))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Example extends StatelessWidget {
.size(240, 100)
.color(Colors.blue)
.alignment(.center)
.borderRounded(12)
.borderRadius(.circular(12))
.border(.all(.color(Colors.black).width(1).style(BorderStyle.solid)));

TextStyler get _text => TextStyler().color(Colors.white).fontSize(18);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Example extends StatelessWidget {
final boxStyle = BoxStyler()
.color(Colors.red)
.size(100, 100)
.borderRounded(10);
.borderRadius(.circular(10));

return Box(style: boxStyle);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class Example extends StatelessWidget {
.color(Colors.blueAccent)
.paddingX(24)
.paddingY(12)
.borderRounded(8),
.borderRadius(.circular(8)),
TextStyler().color(Colors.white).fontSize(16).fontWeight(.w500),
),
const SizedBox(height: 12),
Expand All @@ -48,7 +48,7 @@ class Example extends StatelessWidget {
.border(.all(.color(Colors.blueAccent).width(1.5)))
.paddingX(24)
.paddingY(12)
.borderRounded(8),
.borderRadius(.circular(8)),
TextStyler().color(Colors.blueAccent).fontSize(16).fontWeight(.w500),
),
const SizedBox(height: 12),
Expand All @@ -58,7 +58,7 @@ class Example extends StatelessWidget {
.color(Colors.blueAccent)
.paddingX(24)
.paddingY(12)
.borderRounded(8)
.borderRadius(.circular(8))
.shadow(
.color(
Colors.blueAccent.shade700.withValues(alpha: 0.5),
Expand All @@ -73,7 +73,7 @@ class Example extends StatelessWidget {
.color(Colors.transparent)
.paddingX(24)
.paddingY(12)
.borderRounded(8),
.borderRadius(.circular(8)),
TextStyler()
.color(Colors.blueAccent)
.fontSize(16)
Expand All @@ -88,7 +88,7 @@ class Example extends StatelessWidget {
.color(Colors.blueGrey.shade100)
.paddingX(24)
.paddingY(12)
.borderRounded(8),
.borderRadius(.circular(8)),
child: StyledText(
'Disabled',
style: TextStyler()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Example extends StatelessWidget {
Widget build(BuildContext context) {
final style = BoxStyler.height(50)
.width(100)
.borderRounded(10)
.borderRadius(.circular(10))
.linearGradient(
colors: [Colors.deepPurple.shade700, Colors.deepPurple.shade200],
begin: .topLeft,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Example extends StatelessWidget {
.color(Colors.grey.shade50)
.paddingX(12)
.paddingY(10)
.borderRounded(10)
.borderRadius(.circular(10))
.border(.all(.color(Colors.blueGrey.shade400).width(1)))
.height(150)
.width(120)
Expand Down
Loading
Loading