GFCard class

A material design card. A card has slightly rounded corners and a shadow.

A card is a sheet of Material used to represent some related information, for example an album, a geographical location, a meal, contact details, etc.

Inheritance

Constructors

GFCard({Key? key, Color? color, double? elevation, ShapeBorder? shape, bool borderOnForeground = true, EdgeInsetsGeometry padding = const EdgeInsets.symmetric(horizontal: 12, vertical: 8), EdgeInsetsGeometry? margin, Clip? clipBehavior, bool? semanticContainer, GFListTile? title, Widget? content, Image? image, bool showImage = false, bool showOverlayImage = false, GFButtonBar? buttonBar, ImageProvider<Object>? imageOverlay, GFPosition? titlePosition, BorderRadiusGeometry? borderRadius, Border? border, BoxFit? boxFit, ColorFilter? colorFilter, double? height, LinearGradient? gradient})
Creates a material design card.
const

Properties

border Border?
A border to draw above the GFCard.
final
borderOnForeground bool
Whether to paint the shape border in front of the child.
final
borderRadius BorderRadiusGeometry?
The corners of this GFCard are rounded by this BorderRadius.
final
boxFit BoxFit?
How the image should be inscribed into the box. The default is BoxFit.scaleDown if centerSlice is null, and BoxFit.fill if centerSlice is not null. boxFit for only GFImageOverlay
final
buttonBar GFButtonBar?
widget can be used to define buttons bar, see GFButtonBar
final
clipBehavior Clip?
If this property is null then ThemeData.cardTheme.clipBehavior is used.
final
color Color?
The card's background color.
final
colorFilter ColorFilter?
A color filter to apply to the image before painting it.
final
content Widget?
widget can be used to define content
final
elevation double?
The z-coordinate at which to place this card. This controls the size of the shadow below the card.
final
gradient LinearGradient?
defines the gradient background
final
hashCode int
The hash code for this object.
no setterinherited
height double?
defines the card's height
final
image Image?
image widget can be used
final
imageOverlay ImageProvider<Object>?
overlay image GFImageOverlay widget can be used to display image with shaded overlay
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
margin EdgeInsetsGeometry?
The empty space that surrounds the card. Defines the card's outer Container.margin.
final
padding EdgeInsetsGeometry
The empty space that surrounds the card. Defines the card's outer Container.padding..
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
semanticContainer bool?
Whether this widget represents a single semantic container, or if false a collection of individual semantic nodes.
final
shape ShapeBorder?
The shape of the card's Material.
final
showImage bool
final
showOverlayImage bool
final
title GFListTile?
The title to display inside the GFTitleBar. see GFTitleBar
final
titlePosition GFPosition?
GFPosition titlePosition helps to set titlebar at top of card
final

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
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}) 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

Operators

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