フラッタウィジェット
There is nothing more then Widgets in Flutter.
ウィジェットの属性とウィジェットが付属していくつかのプロパティが組み込まれている.
appbar: AppBar()
home: Scaffold ()
body: Column()
children: []
どのようにしてこれらのウィジェットが書きますかrunApp: MyApp(MaterialApp(
home: Scaffold (
body: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text("This is My Demo Flutter Application made for Blog 💙❤️")]),
appbar: AppBar(
drawer: Drawer(
child: UserAccountDrawerHeader (
accountName: "Muhammad Rameez"
accountMail: "[email protected]"
picture: Image(image: Circular Avatar ("https://images.app.goo.gl/HakjTuLRRQRnGZAY7"),
),),),),),),),
私はあなたのすべての可能なウィジェットを説明しようとしない心配しないでくださいAPPコードのビジュアル表現
メインウィジェット
フラッターアプリケーションのコードは“void main”から始まります.
void main (runApp: MyApp());
マテリアルアプリウィジェットtheme
themedataを拡張します.MaterialApp (
theme: Theme.dark()) //for Dark Theme
用途Theme.dark.tocopy(
scaffoldcolor : Colors.Blue)
暗いテーマのデフォルト値を変更する// For Custom Color Theme of App
theme: Theme(
primaryswatch : Colors.blue,
assent: Colors.Red,
scaffoldcolor: Colors.white,
text color: ThemeData(
body1: Colors.Pink,
),)
足場ウィジェットフラッタでは、私たちのPubspecの依存関係を含める必要があります.YMLファイルは、アプリケーションでそれを使用する.
There are Two type of Widgets that we use in Flutter as a parent widget
- Stateful Widget
- Stateless Widget
親ウィジェットでは何を意味しますか?
例:
Column(
child: Text("I am a child of Column"),)
ステートフルウィジェットsetState basically update the screen and can be used only with Stateful Widget.
ステートレスウィジェット:
いくつかの最もよく使われるウィジェット
コラムウィジェット
child : Column()
しかし、それは子供のプロパティを持って子供たちの子の属性を使用せずに子供のプロパティを介して列にウィジェットを追加できることを意味child: Column(
children: [
Text (“ This is Muhammad Rameez '’),
Container(
height : 60, width: 120, color: Colors.teal,),],),
行ウィジェット
child: Row(
children: [
Text (“ This is Muhammad Rameez '’),
Container(
height : 60, width: 120, color: Colors.teal,),],),
テキストウィジェット
TextStyle()
ウィジェットtitle: Text('This is Muhammad Rameez',
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
color: Colors.Red,
)),
コンテナウィジェットmargin: EdgeInsect.only (top: 15, left : 5 )
padding: EdgeInsect.only (top: 15, left : 5 )
Container(
height : 60, width: 130,
decoration: BoxDecoration(
color: Colors.yellow,
gradient: LinearGradient(
colors:[
Colors.Blue,
Colors.Purple,
Colors.teal,],),
begin: topLeft[5,5]
end: bottomRight[5,5]))
appbarウィジェットUserAccountDrawerHeader
アカウント名、アカウント電子メール、アカウントの画像、その他の写真のようないくつかのプロパティがあります.また、カラープロパティを使用して引き出しの色を変更することができます.constructor
and overriding
現象.builder
これは何度も何度もリストを構築するために使用します.child: Column(
children[
Expanded (
Container (),)
Text('Bottom of Page'),
カードウィジェットchild: Center(
title: Text('Heading of AppBar'),
sizedbox :Row
幅を追加しますColumn
高さを加えるColumn(
children [
SizedBox(
height: 5,),
Container (),
],)
フラットボタンインクウェル
自噴検出器
続く
Reference
この問題について(フラッタウィジェット), 我々は、より多くの情報をここで見つけました https://dev.to/zapeeosheikh/flutter-widgets-1mm9テキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol