ShadcnMultiPreview class final

A MultiPreview that generates multiple ShadcnPreviews with different configurations.

This is useful for testing shadcn widgets in different themes and brightness modes.

Example:

@ShadcnMultiPreview()
class MyWidgetPreview extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MyWidget();
  }
}
Inheritance

Constructors

ShadcnMultiPreview({String? name, String? group, Size? size, double? textScaleFactor, WidgetWrapper? wrapper, Brightness? brightness, PreviewLocalizationsData localizations()?, ColorScheme? darkColorScheme, ColorScheme? lightColorScheme})
Creates a ShadcnMultiPreview.
const

Properties

brightness Brightness?
The brightness of the preview.
final
darkColorScheme ColorScheme?
The dark color scheme for the preview.
final
group String?
The group of the preview.
final
hashCode int
The hash code for this object.
no setterinherited
lightColorScheme ColorScheme?
The light color scheme for the preview.
final
localizations PreviewLocalizationsData Function()?
The localizations for the preview.
final
name String?
The name of the preview.
final
previews List<Preview>
The set of Previews to be created for the annotated function.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size Size?
The size of the preview.
final
textScaleFactor double?
The text scale factor of the preview.
final
wrapper WidgetWrapper?
The widget wrapper for the preview.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
transform() List<Preview>
Applies a transformation to each Preview in previews.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited