apptomate_custom_card 0.0.2
apptomate_custom_card: ^0.0.2 copied to clipboard
A versatile and reusable card component with flexible content organization and customizable styling options.
example/lib/main.dart
import 'package:apptomate_custom_card/apptomate_custom_card.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
useMaterial3: true,
),
home: MyHomePage(),
);
}
}
class MyHomePage extends StatelessWidget {
const MyHomePage({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
body: SafeArea(
child: Padding(
padding: const EdgeInsets.all(16.0),
child: Column(
children: [
CustomCard(
titleWidget: Text("Fixed Size Card"),
width: 200,
onTap: () {},
),
SizedBox(height: 20),
CustomCard(
titleWidget: Text(
"Star Card",
style: TextStyle(
color: Colors.black,
fontSize: 18,
fontWeight: FontWeight.bold),
),
descriptionWidget: Text(
"A customizable card with an icon.",
style: TextStyle(
color: Colors.grey,
fontSize: 14,
fontWeight: FontWeight.bold),
),
backgroundColor: Colors.yellow.shade50,
elevation: 8,
shadowColor: Colors.amber,
suffixWidget: Icon(Icons.star),
onTap: () {
print("Star Card Clicked!");
},
),
],
),
),
),
);
}
}