flutter_tutorial/lib/CardPage.dart
2025-07-28 22:17:58 +08:00

42 lines
1018 B
Dart

import 'package:flutter/material.dart';
import 'AppDrawer.dart';
class CardPage extends StatefulWidget {
const CardPage({super.key});
@override
State<StatefulWidget> createState() => _CardPageState();
}
class _CardPageState extends State<CardPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Card Example'),
),
drawer: AppDrawer(),
body: Center(
child: Card(
elevation: 4,
margin: EdgeInsets.all(16),
child: Padding(
padding: EdgeInsets.all(16),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Text(
'Card Title',
style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold),
),
SizedBox(height: 8),
Text('This is a simple card example.'),
],
),
),
),
),
);
}
}