ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • Flutter 1
    CodeingTestPrac 2022. 1. 20. 15:36
    class MyApp extends StatelessWidget
    {
      const MyApp({Key? key}) : super(key: key);
    
      @override
      Widget build(BuildContext context) {
    
        return MaterialApp(
            home: Scaffold(
              appBar: AppBar(title:Text('앱임')),
              body: Text('안녕'),
              bottomNavigationBar: BottomAppBar(
                child: Container(
                  height: 100,
                  child: Row(
                    mainAxisAlignment: MainAxisAlignment.spaceEvenly,
                    children: [
                      Icon(Icons.phone),
                      Icon(Icons.message),
                      Icon(Icons.contact_page)
                    ],
                  ),
                )
              ),
        )
        );
    
    
    
    
      }
    }
        return MaterialApp(
            home: Scaffold(
              body: Column(
              children : [
                Icon(Icons.star),
                Icon(Icons.star),
                Icon(Icons.star),
            ],
          ),
        )
        );
            home: Scaffold(
              body: Row(
                mainAxisAlignment: MainAxisAlignment.spaceEvenly,
                children : [
                  Icon(Icons.star),
                  Icon(Icons.star),
                  Icon(Icons.star),
            ],
        return MaterialApp(
            home: Scaffold(
              body: Row(
                mainAxisAlignment: MainAxisAlignment.spaceEvenly, // Row, 정축 정렬 가로
                crossAxisAlignment: CrossAxisAlignment.center,
                children : [
                  Icon(Icons.star),
                  Icon(Icons.star),
                  Icon(Icons.star),
            ],
          ),
        )
        );
    import 'package:flutter/material.dart';
    void main() 
    {
      runApp(const MyApp());
      // app 시작을 runApp
    }
    //App의 main page
    class MyApp extends StatelessWidget
    {
      const MyApp({Key? key}) : super(key: key);
    
      @override
      Widget build(BuildContext context) {
    
        return MaterialApp(
            home: Scaffold(
              appBar: AppBar(title:Text('text')),
              body: Row(
                children: [
                  Flexible(child: Container(color: Colors.blue,),flex: 3),
                  Flexible(child: Container(color: Colors.red),flex: 7),
                ],
              )
            )
        );
      }
    }
    return MaterialApp(
        home: Scaffold(
          appBar: AppBar(title:Text('text')),
          body: Column(
            children: [
              Expanded(child: Container(color: Colors.purple)),  // 정해진 부분 말고 전
              Flexible(child: Container(color: Colors.blue,),flex: 5),
              Flexible(child: Container(color: Colors.green),flex: 5),
              Flexible(child: Container(color: Colors.red),flex: 5),
            ],

     

     

     

    class 이용 custom widget.  -> kotlin과 같음

     

    web 과 app 사진 차이 ? : - > 경로 수정 

     

    @override.   => extends 로 받아온 기능들  기능 중복 없엠 

    build()

     

    수정 변경 많은것 -> 커스텀 위젯 , 재사용이 많은것으로 구성한다

    -> state 관리가 힘들어진다 

     

     

    수정 변경 거의 안하는것  -> 변수 

     

     

     

    class MyApp extends StatelessWidget
    {
      const MyApp({Key? key}) : super(key: key);
    
      @override
      Widget build(BuildContext context) {
        return MaterialApp(
          home: Scaffold(
            appBar: AppBar(),
            body: ShopItem(),
          )
        );
    
      }
    }
    
    
    class ShopItem extends StatelessWidget {
      const ShopItem({Key? key}) : super(key: key);
      @override
      Widget build(BuildContext context) {
        return SizedBox(
          child: Text('안')
        );
      }
    }
    

    'CodeingTestPrac' 카테고리의 다른 글

    2월 9일  (0) 2022.02.09
    2월 1일 -Flutter,Flash app ,Class, navigation button, Heroaction  (0) 2022.02.01
    1월 31일-Flutter 4 /json 파싱  (0) 2022.01.31
    1월 28일 -Flutter 3  (0) 2022.01.29
    Flutter2  (0) 2022.01.21
Designed by Tistory.