Flutter

[Flutter] UI 연습

귀뚜래미 2022. 11. 14. 10:54
728x90

 

 

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(
            appBar: AppBar(),
            body: Container(
              height: 150,
              padding: EdgeInsets.all(10),
              child: Row(
                children: [
                  Image.asset(
                    'images/camera.jpeg',
                    width: 150,
                  ),
                  // Icon(Icons.camera),
                  Flexible(
                    child: Container(
                      child: Column(
                        crossAxisAlignment: CrossAxisAlignment.start,
                        children: [
                          Text(
                            '캐논 DSLR 100D',
                            style: TextStyle(
                              fontSize: 20,
                              fontWeight: FontWeight.bold,
                            ),
                          ),
                          Text('마포구, 10분전'),
                          Text('500,000원'),
                          Row(
                            mainAxisAlignment: MainAxisAlignment.end,
                            children: [Icon(Icons.favorite), Text('4')],
                          )
                        ],
                      ),
                    ),
                  ),
                ],
              ),
            )));
  }
}

728x90

'Flutter' 카테고리의 다른 글

[Flutter] 온보딩 스크린(Onboarding Screen)  (0) 2022.11.15
[Flutter] Custom Widget 사용하기  (0) 2022.11.14
[Flutter] Flexible & Expanded 이해하기  (0) 2022.11.09
[Flutter] AppBar 사용하기  (0) 2022.11.09
[Flutter] 버튼 디자인  (0) 2022.10.31