FlutstrapCard class

Flutstrap Card Component

A container for displaying content and actions in a card format with comprehensive theming, flexible layouts, and performance optimizations.

Inheritance
Annotations

Constructors

FlutstrapCard({Key? key, Widget? header, String? headerText, Widget? body, String? bodyText, Widget? footer, String? footerText, EdgeInsetsGeometry? padding, Color? backgroundColor, Color? borderColor, double? elevation, double borderRadius = _CardConstants.defaultBorderRadius, double borderWidth = _CardConstants.defaultBorderWidth, List<BoxShadow>? shadow, bool showDividers = true, FSCardVariant variant = FSCardVariant.elevated, VoidCallback? onTap, VoidCallback? onLongPress, bool interactive = false})
const
FlutstrapCard.action({required String title, required String content, required List<Widget> actions, EdgeInsetsGeometry? padding, FSCardVariant variant = FSCardVariant.elevated})
factory
FlutstrapCard.image({required Widget image, String? title, String? content, List<Widget>? actions, EdgeInsetsGeometry? padding, FSCardVariant variant = FSCardVariant.elevated})
factory
FlutstrapCard.interactive({required String title, required String content, required VoidCallback onTap, Widget? trailing, EdgeInsetsGeometry? padding, FSCardVariant variant = FSCardVariant.elevated})
factory
FlutstrapCard.simple({required String title, required String content, String? footer, EdgeInsetsGeometry? padding, FSCardVariant variant = FSCardVariant.elevated})
factory
FlutstrapCard.themed({Key? key, required BuildContext context, Widget? header, String? headerText, Widget? body, String? bodyText, Widget? footer, String? footerText, EdgeInsetsGeometry? padding, Color? backgroundColor, Color? borderColor, double? elevation, double? borderRadius, double? borderWidth, List<BoxShadow>? shadow, bool? showDividers, FSCardVariant? variant, VoidCallback? onTap, VoidCallback? onLongPress, bool? interactive})
Create a card using theme configuration
factory

Properties

backgroundColor Color?
final
body Widget?
final
bodyText String?
final
borderColor Color?
final
borderRadius double
final
borderWidth double
final
elevation double?
final
final
footerText String?
final
hashCode int
The hash code for this object.
no setterinherited
final
headerText String?
final
interactive bool
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onLongPress VoidCallback?
final
onTap VoidCallback?
final
padding EdgeInsetsGeometry?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shadow List<BoxShadow>?
final
showDividers bool
final
variant FSCardVariant
final

Methods

asElevated() FlutstrapCard
asFilled() FlutstrapCard
asInteractive() FlutstrapCard
asOutlined() FlutstrapCard
build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
copyWith({Key? key, Widget? header, String? headerText, Widget? body, String? bodyText, Widget? footer, String? footerText, EdgeInsetsGeometry? padding, Color? backgroundColor, Color? borderColor, double? elevation, double? borderRadius, double? borderWidth, List<BoxShadow>? shadow, bool? showDividers, FSCardVariant? variant, VoidCallback? onTap, VoidCallback? onLongPress, bool? interactive}) FlutstrapCard
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited
withBackground(Color color) FlutstrapCard
withBody(String bodyText) FlutstrapCard
withFooter(String footerText) FlutstrapCard
withHeader(String headerText) FlutstrapCard
withoutDividers() FlutstrapCard
withPadding(EdgeInsetsGeometry customPadding) FlutstrapCard

Operators

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