Skip to content

Commit 9ac5e5a

Browse files
committed
toast
1 parent 3faac27 commit 9ac5e5a

22 files changed

+293
-275
lines changed

packages/remix/demo/lib/components/badge_use_case.dart

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import 'package:demo/helpers/knob_builder.dart';
21
import 'package:flutter/widgets.dart';
32
import 'package:remix/remix.dart';
43
import 'package:widgetbook/widgetbook.dart';
@@ -12,13 +11,13 @@ Widget buildAvatarUseCase(BuildContext context) {
1211
return Scaffold(
1312
body: Center(
1413
child: Badge(
15-
variants: [
16-
context.knobs.variant(FortalezaBadgeStyle.variants),
17-
],
1814
label: context.knobs.string(
1915
label: 'Label',
2016
initialValue: 'New',
2117
),
18+
variants: const [
19+
// context.knobs.variant(FortalezaBadgeStyle.variants),
20+
],
2221
),
2322
),
2423
);

packages/remix/lib/src/components/button/button_widget.dart

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,10 @@ class Button extends StatelessWidget {
1717
/// The text content displayed in the center of the button.
1818
final String label;
1919

20-
/// {@template remix.component.disabled}
21-
/// When disabled, the component will not respond to user interaction and will
22-
/// appear visually distinct to indicate its disabled state.
23-
/// {@endtemplate}
20+
/// {@macro remix.component.disabled}
2421
final bool disabled;
2522

26-
/// {@template remix.component.loading}
27-
/// When loading, the component will display a spinner and disable user
28-
/// interaction. The component's content will be hidden but maintain its
29-
/// space to prevent layout shifts.
30-
/// {@endtemplate}
23+
/// {@macro remix.component.loading}
3124
final bool loading;
3225

3326
/// The icon displayed in the left side of the button.
@@ -36,11 +29,7 @@ class Button extends StatelessWidget {
3629
/// The icon displayed in the right side of the button.
3730
final IconData? iconRight;
3831

39-
/// {@template remix.component.onPressed}
40-
/// Called when the component is tapped.
41-
/// If null or if [disabled] is true, the component will be disabled and won't
42-
/// respond to touch.
43-
/// {@endtemplate}
32+
/// {@macro remix.component.onPressed}
4433
final VoidCallback? onPressed;
4534

4635
/// A builder that returns a [Widget] for the button's spinner.

packages/remix/lib/src/components/chip/chip_widget.dart

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,7 @@ class Chip extends StatefulWidget {
2525
/// The icon displayed in the right side of the component.
2626
final IconData? iconRight;
2727

28-
/// {@template remix.component.onChanged}
29-
/// Called when the component is tapped.
30-
/// If null or if [disabled] is true, the component will be disabled and won't
31-
/// respond to touch.
32-
/// {@endtemplate}
28+
/// {@macro remix.component.onChanged}
3329
final void Function(bool)? onChanged;
3430

3531
/// {@macro remix.component.disabled}

packages/remix/lib/src/components/menu_item/menu_item.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ part 'menu_item_widget.dart';
1616
class MenuItemSpec extends Spec<MenuItemSpec>
1717
with _$MenuItemSpec, Diagnosticable {
1818
final FlexBoxSpec container;
19-
final FlexSpec titleSubtitleContainer;
19+
final FlexBoxSpec titleSubtitleContainer;
2020
final IconSpec icon;
2121
final TextSpec title;
2222
final TextSpec subtitle;
@@ -28,14 +28,14 @@ class MenuItemSpec extends Spec<MenuItemSpec>
2828

2929
const MenuItemSpec({
3030
FlexBoxSpec? container,
31-
FlexSpec? titleSubtitleContainer,
31+
FlexBoxSpec? titleSubtitleContainer,
3232
IconSpec? icon,
3333
TextSpec? title,
3434
TextSpec? subtitle,
3535
super.modifiers,
3636
super.animated,
3737
}) : container = container ?? const FlexBoxSpec(),
38-
titleSubtitleContainer = titleSubtitleContainer ?? const FlexSpec(),
38+
titleSubtitleContainer = titleSubtitleContainer ?? const FlexBoxSpec(),
3939
icon = icon ?? const IconSpec(),
4040
title = title ?? const TextSpec(),
4141
subtitle = subtitle ?? const TextSpec();

packages/remix/lib/src/components/menu_item/menu_item.g.dart

Lines changed: 5 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/remix/lib/src/components/menu_item/menu_item_style.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ class MenuItemStyle extends SpecStyle<MenuItemSpecUtility> {
88
final $ = spec.utilities;
99

1010
final titleSubtitleContainer = $.titleSubtitleContainer.chain
11-
..mainAxisAlignment.start()
12-
..crossAxisAlignment.start()
13-
..mainAxisSize.min()
11+
..flex.mainAxisAlignment.start()
12+
..flex.crossAxisAlignment.start()
13+
..flex.mainAxisSize.min()
1414
..wrap.expanded()
15-
..gap(4.0);
15+
..flex.gap(4.0);
1616

1717
final title = $.title.style.fontSize(14.0);
1818

packages/remix/lib/src/components/menu_item/menu_item_theme.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class FortalezaMenuItemStyle extends MenuItemStyle {
88
final $ = spec.utilities;
99

1010
final baseStyle = super.makeStyle(spec);
11-
final titleSubtitleLayout = $.titleSubtitleContainer.chain..gap.$space(1);
11+
final titleSubtitleLayout = $.titleSubtitleContainer.flex.gap.$space(1);
1212

1313
final title = $.title.chain
1414
..style.$text(2)

packages/remix/lib/src/components/textfield/textfield.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ class TextFieldSpec extends Spec<TextFieldSpec>
5353
final Brightness keyboardAppearance;
5454
final Color? autocorrectionTextRectColor;
5555

56-
final FlexBoxSpec flexContainer;
57-
final FlexSpec mainFlex;
56+
final FlexBoxSpec textFieldContainer;
57+
final FlexBoxSpec container;
5858
final TextStyle? hintTextStyle;
5959
final TextSpec helperText;
6060
final IconSpec icon;
@@ -89,8 +89,8 @@ class TextFieldSpec extends Spec<TextFieldSpec>
8989
Brightness? keyboardAppearance,
9090
this.autocorrectionTextRectColor,
9191
bool? cursorOpacityAnimates,
92-
FlexBoxSpec? flexContainer,
93-
FlexSpec? mainFlex,
92+
FlexBoxSpec? textFieldContainer,
93+
FlexBoxSpec? container,
9494
this.hintTextStyle,
9595
TextSpec? helperText,
9696
IconSpec? icon,
@@ -114,9 +114,9 @@ class TextFieldSpec extends Spec<TextFieldSpec>
114114
scrollPadding = scrollPadding ?? const EdgeInsets.all(20.0),
115115
clipBehavior = clipBehavior ?? Clip.hardEdge,
116116
keyboardAppearance = keyboardAppearance ?? Brightness.light,
117-
flexContainer = flexContainer ?? const FlexBoxSpec(),
117+
textFieldContainer = textFieldContainer ?? const FlexBoxSpec(),
118118
helperText = helperText ?? const TextSpec(),
119-
mainFlex = mainFlex ?? const FlexSpec(),
119+
container = container ?? const FlexBoxSpec(),
120120
icon = icon ?? const IconSpec(),
121121
floatingLabel = floatingLabel ?? false,
122122
floatingLabelHeight = floatingLabelHeight ?? 14;

packages/remix/lib/src/components/textfield/textfield.g.dart

Lines changed: 35 additions & 33 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)