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(
debugShowCheckedModeBanner: false,
title: 'Мой первый экран',
theme: ThemeData(
useMaterial3: true,
),
home: const StudentScreen(),
);
}
}
class StudentScreen extends StatelessWidget {
const StudentScreen({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: const Color(0xFF9E9E9E),
body: Center(
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 24),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
// Иконка выпускной шапочки
const Icon(
Icons.school,
size: 76,
color: Colors.white,
),
const SizedBox(height: 24),
// Имя студента
const Text(
'Анна Смирнова',
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 34,
fontWeight: FontWeight.bold,
color: Colors.white,
),
),
const SizedBox(height: 18),
// Информация о студенте
const Text(
'Студент · группа ИС-21',
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 22,
fontWeight: FontWeight.w500,
color: Colors.white,
),
),
const SizedBox(height: 52),
// Описание
const Text(
'Делаю первый экран на Flutter:\n'
'фон, колонка и свои тексты.',
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
height: 1.4,
color: Colors.white,
),
),
],
),
),
),
);
}
}