main.dart
import 'package:flutter/material.dart';
import 'package:main/screens/home_screen/home_screen.dart';
void main() => runApp(const App());
class App extends StatelessWidget{
const App({super.key});
@override
Widget build(BuildContext context) {
return const MaterialApp(
debugShowCheckedModeBanner: false,
home: HomeScreen(),
);
}
}
home_screen.dart
import 'package:flutter/material.dart';
class HomeScreen extends StatelessWidget {
const HomeScreen({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Colors.deepPurpleAccent,
title: const Text(
"Talabalar uz",
style: TextStyle(color: Colors.yellow),
),
),
body: const Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
"Welcome to my first app",
style: TextStyle(
fontSize: 18,
color: Colors.orange,
backgroundColor: Colors.black,
),
),
Text("Dasturchi UZ"),
Text("Dasturchi UZ - Kechagidanda yaxshiroq bo'ling"),
],
),
);
}
}
Do'stlaringiz bilan baham: |