Skip to content
Closed
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
9 changes: 4 additions & 5 deletions packages/remix/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@ targets:
enabled: true
generate_for:
- lib/**/*.dart
# Remix stylers now come from @MixableSpec. The Fortal widget wrappers
# stay source-authored because a @MixWidget builder cannot resolve a
# Styler generated into the same library during a clean build.
mix_generator|mix_widget_generator:
enabled: true
generate_for:
- lib/**/*.dart
mix_generator|styler_generator:
enabled: false
mix_generator|mixable_generator:
enabled: false
mix_generator|mix_widget_generator:
enabled: false
mix_generator|modifier_generator:
enabled: false
131 changes: 131 additions & 0 deletions packages/remix/lib/src/components/accordion/accordion.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ enum FortalAccordionSize { size1, size2, size3 }
enum FortalAccordionVariant { surface, soft }

/// Fortal-themed preset for [RemixAccordion].
@MixWidget(
name: 'FortalAccordion',
target: RemixAccordion.new,
factoryParameters: .only({'variant', 'size'}),
)
RemixAccordionStyler fortalAccordionStyler({
FortalAccordionVariant variant = .surface,
FortalAccordionSize size = .size2,
Expand Down Expand Up @@ -98,130 +103,3 @@ RemixAccordionStyler _fortalAccordionSizeStyler(FortalAccordionSize size) {
}

/// Fortal-themed preset for [RemixAccordion].
class FortalAccordion<T> extends StatelessWidget {
const FortalAccordion({
super.key,
this.variant = .surface,
this.size = .size2,
required this.value,
required this.child,
this.title,
this.leadingIcon,
this.trailingIcon,
this.builder,
this.enabled = true,
this.mouseCursor = SystemMouseCursors.click,
this.enableFeedback = true,
this.autofocus = false,
this.focusNode,
this.onFocusChange,
this.onHoverChange,
this.onPressChange,
this.semanticLabel,
this.transitionBuilder,
});

const FortalAccordion.surface({
super.key,
this.size = .size2,
required this.value,
required this.child,
this.title,
this.leadingIcon,
this.trailingIcon,
this.builder,
this.enabled = true,
this.mouseCursor = SystemMouseCursors.click,
this.enableFeedback = true,
this.autofocus = false,
this.focusNode,
this.onFocusChange,
this.onHoverChange,
this.onPressChange,
this.semanticLabel,
this.transitionBuilder,
}) : variant = FortalAccordionVariant.surface;

const FortalAccordion.soft({
super.key,
this.size = .size2,
required this.value,
required this.child,
this.title,
this.leadingIcon,
this.trailingIcon,
this.builder,
this.enabled = true,
this.mouseCursor = SystemMouseCursors.click,
this.enableFeedback = true,
this.autofocus = false,
this.focusNode,
this.onFocusChange,
this.onHoverChange,
this.onPressChange,
this.semanticLabel,
this.transitionBuilder,
}) : variant = FortalAccordionVariant.soft;

final FortalAccordionVariant variant;

final FortalAccordionSize size;

final T value;

final Widget child;

final String? title;

final IconData? leadingIcon;

final IconData? trailingIcon;

final NakedAccordionTriggerBuilder<T>? builder;

final bool enabled;

final MouseCursor mouseCursor;

final bool enableFeedback;

final bool autofocus;

final FocusNode? focusNode;

final ValueChanged<bool>? onFocusChange;

final ValueChanged<bool>? onHoverChange;

final ValueChanged<bool>? onPressChange;

final String? semanticLabel;

final Widget Function(Widget, Animation<double>)? transitionBuilder;

@override
Widget build(BuildContext context) {
return fortalAccordionStyler(
variant: this.variant,
size: this.size,
).call<T>(
key: this.key,
value: this.value,
title: this.title,
leadingIcon: this.leadingIcon,
trailingIcon: this.trailingIcon,
enabled: this.enabled,
mouseCursor: this.mouseCursor,
enableFeedback: this.enableFeedback,
autofocus: this.autofocus,
focusNode: this.focusNode,
onFocusChange: this.onFocusChange,
onHoverChange: this.onHoverChange,
onPressChange: this.onPressChange,
semanticLabel: this.semanticLabel,
transitionBuilder: this.transitionBuilder,
child: this.child,
builder: this.builder,
);
}
}
89 changes: 89 additions & 0 deletions packages/remix/lib/src/components/avatar/avatar.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading