import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: HomePage(),
);
}
}
class HomePage extends StatelessWidget {
const HomePage({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
body: SafeArea(
child: Column(
children: [
Expanded(
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text("Top 1", style: TextStyle(fontSize: 40, fontWeight: FontWeight.bold)),
Text("num : 1", style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold))
],
),
),
),
Expanded(
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text("Top 2", style: TextStyle(fontSize: 40, fontWeight: FontWeight.bold)),
ElevatedButton(onPressed: (){}, child: Icon(Icons.add))
],
),
),
),
Expanded(
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text("Bottom", style: TextStyle(fontSize: 40, fontWeight: FontWeight.bold)),
],
),
),
),
],
),
),
);
}
}