Skip to content
On this page

Card

A themed surface that groups related content and optional actions.

Card in FluttyUICard in FluttyUI dark theme

Import

import 'package:flutter/widgets.dart';
import 'package:fluttyui/fluttyui.dart' as ui;

Usage

const ui.Card(
  child: Text('Your content goes here'),
)

API Reference

The declarations below match the current FluttyUI source. Types are shown without the optional ui. import prefix.

Card

const Card({
  super.key,
  required this.child,
  this.padding,
  this.margin = EdgeInsets.zero,
  this.backgroundColor,
  this.borderRadius,
  this.border,
  this.boxShadow,
  this.width,
  this.height,
  this.onTap,
  this.clipBehavior = Clip.antiAlias,
});
ParameterTypeRequiredDefault
keyKey?Nonull
childWidgetYes—
paddingEdgeInsetsGeometry?Nonull
marginEdgeInsetsGeometryNoEdgeInsets.zero
backgroundColorColor?Nonull
borderRadiusdouble?Nonull
borderBoxBorder?Nonull
boxShadowList<BoxShadow>?Nonull
widthdouble?Nonull
heightdouble?Nonull
onTapVoidCallback?Nonull
clipBehaviorClipNoClip.antiAlias

Application Setup

Place components under FluttyApp to provide theme, navigation, localization, and overlay defaults. Use theme tokens for shared appearance settings.

Source

lib/src/widgets/layouts/card/card.dart

This reference is generated from the Card declaration in the FluttyUI core checkout. The component catalog lists the other available building blocks.

DartFlutter

Get started with FluttyUI