Divider Class
import "package:flutter/material.dart";
void main()
{
runApp(const MyApp());
}
class MyApp extends StatelessWidget
{
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: "Divider Class",
debugShowCheckedModeBanner: false,
theme: ThemeData(
primarySwatch: Colors.grey,
),
home: const DividerExample(),
);
}
}
class DividerExample extends StatelessWidget
{
const DividerExample({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text("Divider Class"),
centerTitle: true,
backgroundColor: Colors.grey,
),
body: Center(
child: Column(
children: <Widget>[
Expanded(
child: Card(
color: Colors.grey.shade200,
child: const SizedBox.expand(),
),
),
const Divider(),
Expanded(
child: Card(
color: Colors.grey.shade200,
child: const SizedBox.expand(),
),
),
const Divider(),
Expanded(
child: Card(
color: Colors.grey.shade200,
child: const SizedBox.expand(),
),
),
const Divider(),
Expanded(
child: Card(
color: Colors.grey.shade200,
child: const SizedBox.expand(),
),
),
const Divider(),
Expanded(
child: Card(
color: Colors.grey.shade200,
child: const SizedBox.expand(),
),
),
const Divider(),
Expanded(
child: Card(
color: Colors.grey.shade200,
child: const SizedBox.expand(),
),
),
const Divider(),
],
),
),
);
}
}
Comments
Post a Comment