import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(debugShowCheckedModeBanner: false, home: Home());
}
}
class Home extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('GeeksforGeeks'),
backgroundColor: Colors.green,
foregroundColor: Colors.white,
),
body: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(height: 15),
SizedBox(height: 20, child: Text('Demonstration of Row')),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Card(
margin: EdgeInsets.all(10),
elevation: 8,
child: Container(
padding: EdgeInsets.all(25),
child: Text(
'GeeksforGeeks',
style: TextStyle(color: Colors.green),
),
),
),
SizedBox(width: 2),
Card(
margin: EdgeInsets.all(10),
elevation: 8,
child: Container(
padding: EdgeInsets.all(25),
child: Text(
'GeeksforGeeks',
style: TextStyle(color: Colors.green),
),
),
),
],
),
SizedBox(height: 30),
SizedBox(height: 20, child: Text('Demonstration of Column')),
Column(
children: [
Card(
margin: EdgeInsets.all(10),
elevation: 8,
child: Container(
padding: EdgeInsets.all(25),
child: Text(
'GeeksforGeeks',
style: TextStyle(color: Colors.green),
),
),
),
SizedBox(width: 4),
Card(
margin: EdgeInsets.all(10),
elevation: 8,
child: Container(
padding: EdgeInsets.all(25),
child: Text(
'GeeksforGeeks',
style: TextStyle(color: Colors.green),
),
),
),
],
),
],
),
);
}
}