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: 'Hello',
home: const HelloScreen
);
}
}
class HelloScreen extends StatelessWidget {
const HelloScreen({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text('Привет, Flutter')),
body: const Center(
child: Text(
'Окно работает!',
style: TextStyle(fontSize: 18),
),
),
);
}
}
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: 'Hello',
home: const HelloScreen
);
}
}
class HelloScreen extends StatelessWidget {
const HelloScreen({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text('Привет, Flutter')),
body: const Center(
child: Text(
'Окно работает!',
style: TextStyle(fontSize: 18),
),
),
);
}
}