본문 바로가기
Flutter

[Flutter] 쉬운 플러터 5강 숙제

by ♡˖GYURI˖♡ 2023. 6. 21.
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());  // 앱 메인페이지 구동
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);
  @override
  Widget build(BuildContext context) {

    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(),
        body: Container(
          height: 150,
          padding: EdgeInsets.all(20),
          child: Row(
            children: [
              Image.asset('dog.jpg', width: 150),
              Flexible(
                  flex: 1,
                  child: Container(
                  child: Column(
                    crossAxisAlignment: CrossAxisAlignment.start,
                    children: [
                      Text('귀여운 강아지',
                        style: TextStyle(
                            fontWeight: FontWeight.w800,
                            fontSize: 20,
                            ),
                      ),
                      Text('화난 강아지',
                          style: TextStyle(
                            color: Colors.green
                          )),
                      Text('앙증맞은 강아지'),
                      Row(
                        mainAxisAlignment: MainAxisAlignment.end,
                        children: [
                          Icon(Icons.favorite),
                          Text('100'),
                        ],
                      )
                    ],
                  ),
                )
              )
            ],
          )
        )
      )
    );
  }
}

 

 

 

 

 

참조 : https://www.youtube.com/watch?v=H_zCqRqg1F0&list=PLfLgtT94nNq1izG4R2WDN517iPX4WXH3C&index=6 

 

'Flutter' 카테고리의 다른 글

[Flutter] 쉬운 플러터 6강 숙제  (0) 2023.06.21
[Flutter] 쉬운 플러터 2강 숙제  (0) 2023.06.21
[Flutter] StatelessWidget, StatefulWidget  (0) 2023.06.21
[Flutter] Dart  (0) 2023.06.21
[Flutter] 플러터 시작하기  (0) 2023.06.20