NBCard class

A Nativebase Design card: a panel with slightly rounded corners and an elevation shadow along with padding .

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

An basic example of the NBText widget

Example

NBCard(
  child: NBText(
    text: "This Card looks awesome",
  ),
)
Inheritance

Constructors

NBCard({Key? key, String? bgImage, LinearGradient? gradient, String? mt, String? p, String? m, String? mb, String? mr, String? ml, String? mx, String? my, String? pt, String? pb, String? pl, String? pr, String? px, String? py, String? alignment, String? h, String? w, String? maxW, String? maxH, String? minH, String? minW, String? borderWidth, String? borderLeft, String? borderRight, String? borderTop, String? borderBottom, String? borderStyle, String? borderColor, String? borderRadius, String? borderBottomLeftRadius, String? borderBottomRightRadius, String? borderTopLeftRadius, String? borderTopRightRadius, String? borderLeftRadius, String? borderRightRadius, String? borderTopRadius, String? borderBottomRadius, String? color = 'white', String? shadow, Widget? child})
A Nativebase Design card: a panel with slightly rounded corners and an elevation shadow along with padding .
const

Properties

alignment String?
The Box child alignment will be set using alignment. Use nativebase alignment tokens as string like wise
finalinherited
bgImage String?
Sets the background image of the box
finalinherited
borderBottom String?
Sets the bottom border width of the box.
finalinherited
borderBottomLeftRadius String?
Sets the Radius of bottom right corner of the box.
finalinherited
borderBottomRadius String?
Sets the Radius of bottom right and left corner of the box.
finalinherited
borderBottomRightRadius String?
Sets the Radius of bottom right corner of the box.
finalinherited
borderColor String?
Sets the border color of the box.
finalinherited
borderLeft String?
Sets the right border width of the box.
finalinherited
borderLeftRadius String?
Sets the Radius of left top and bottom corner of the box.
finalinherited
borderRadius String?
Sets the corner Radius of the box.
finalinherited
borderRight String?
Sets the right border width of the box.
finalinherited
borderRightRadius String?
Sets the Radius of right top and bottom corner of the box.
finalinherited
borderStyle String?
Sets the border color of the box.
finalinherited
borderTop String?
Sets the top border width of the box.
finalinherited
borderTopLeftRadius String?
Sets the Radius of top left corner of the box.
finalinherited
borderTopRadius String?
Sets the Radius of top right and left corner of the box.
finalinherited
borderTopRightRadius String?
Sets the Radius of top right corner of the box.
finalinherited
borderWidth String?
Sets the border width of the box from all the side.
finalinherited
child Widget?
Sets child to the box
finalinherited
color String?
The Box background color. Use nativebase color tokens as string like wise
finalinherited
gradient LinearGradient?
Sets linearGradient to the box
finalinherited
h String?
Sets the box height
finalinherited
hashCode int
The hash code for this object.
no setterinherited
height String?
Sets the box height
finalinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
m String?
Sets the box margin from all the side of box
finalinherited
maxH String?
Sets the max height of the box
finalinherited
maxW String?
Sets the max width of the box
finalinherited
mb String?
Sets the box margin from bottom
finalinherited
minH String?
Sets the min height of the box
finalinherited
minW String?
Sets the min width of the box
finalinherited
ml String?
Sets the box margin from left
finalinherited
mr String?
Sets the box margin from right
finalinherited
mt String?
Sets the box margin from top
finalinherited
mx String?
Sets the box margin on X-Axis
finalinherited
my String?
Sets the box margin on Y-Axis
finalinherited
p String?
Sets the box padding from all the side
finalinherited
pb String?
Sets the box padding from bottom
finalinherited
pl String?
Sets the box padding from left
finalinherited
pr String?
Sets the box padding from right
finalinherited
pt String?
Sets the box padding from top
finalinherited
px String?
Sets the box padding on X-Axis
finalinherited
py String?
Sets the box padding on Y-Axis
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shadow String?
The Box elevation shadow. Use nativebase shadow tokens as string like wise
finalinherited
w String?
Sets the box width
finalinherited
width String?
Sets the box height
finalinherited

Methods

build(BuildContext context) Widget
Build method is responsible for building the entire widget by using the resolvers
inherited
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
resolveComponentLevelTheme(BuildContext context, Map<String, dynamic> styles, {String? component}) Map<String, dynamic>
inherited
resolveProps({required Map<String, dynamic> resolvedTokens}) Map<String, dynamic>
inherited
resolveTokens({required Map<String, dynamic> toJson, required BuildContext context, Component? component}) Map<String, dynamic>
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
toJson() Map<String, dynamic>
Holds the override implementation of the widget to get json format of the widget class
override
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