Import 'package: flutter/material dart'; import 'package: main/screens/home screen dart'; void main => runApp const


Download 13.39 Kb.
Sana18.11.2023
Hajmi13.39 Kb.
#1784897
Bog'liq
bor


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"),
],
),

);
}


}
Download 13.39 Kb.

Do'stlaringiz bilan baham:




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling