1-mashq. Har bir talaba Android Studio dasturini yuklab olish, oʻrnatish, sdk flutterni yuklab olib, oʻrnatish jarayonini koʻrsatib oʻtish va dokument sifatida saqlash


-mashq. Android Studio dasturida MaterialApp widjedidan foydalanish va natijani skrenshot qilib joylash


Download 37.69 Kb.
bet2/3
Sana02.06.2024
Hajmi37.69 Kb.
#1836888
1   2   3
Bog'liq
2-amaliyot mobil ilovalar

2-mashq. Android Studio dasturida MaterialApp widjedidan foydalanish va natijani skrenshot qilib joylash
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(
home: Scaffold(
backgroundColor: Colors.tealAccent,
body: SafeArea(
child: Container(
child: Center(child: Text("Assalomu alaykum 22-21- guruh talabalari "),
),
),

),
),


);

}
}



3-mashq. Android Studio dasturida Scaffold, Appbar widjedlaridan foydalanish va natijani skrenshot qilib joylash.
import 'package:flutter/material.dart';
// import 'package:full_screen_network_image/full_screen_network_image.dart';

void main() {


runApp(const MyApp());
}

class MyApp extends StatelessWidget {


const MyApp({super.key});

// This widget is the root of your application.


@override
Widget build(BuildContext context) {
return new MaterialApp(
theme: ThemeData(
primarySwatch: Colors.purple,
),
home: Scaffold(
appBar: AppBar(
title: Text("Xabarlar"),
),
body: Center(
child: Text("Sizga yangi xabar keldi !!! ",
style: TextStyle(
color: Colors.indigo,
fontSize: 30,
),),
),
)

);

}


}

4-misol. Android Studio dasturida body, Image widjedlaridan foydalanish va natijani skrenshot qilib joylash.
import 'package:flutter/material.dart';
// import 'package:full_screen_network_image/full_screen_network_image.dart';

void main() {


runApp(const MyApp());
}

class MyApp extends StatelessWidget {


const MyApp({super.key});

// This widget is the root of your application.


@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
backgroundColor: Colors.greenAccent,
appBar: AppBar(
backgroundColor: Colors.indigo,
centerTitle: true,
title: Text("Avtomobillar"),
),
body: Image(
image: AssetImage('images/car2.jpg'),
),
)

);

}


}


Download 37.69 Kb.

Do'stlaringiz bilan baham:
1   2   3




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