Flutter

Flutter 공부 2일차

2023. 1. 4. 18:05

공부 시작 23년 1월 3일 ㅋ

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(
          title: Text('휴가 마렵네'),
          centerTitle: true,
          leading: IconButton(icon: Icon(Icons.menu), onPressed: null,),
          backgroundColor: Colors.indigo,
          elevation: 100,
        ),
        body: Center(
          child: Text(
            'Hi World',
            style: TextStyle(
              fontSize: 70,
            ),
          ),
        ),
        bottomNavigationBar: BottomAppBar(
          child: SizedBox(
            height: 50,
            child: Row(
              mainAxisAlignment: MainAxisAlignment.spaceEvenly,
              children: [
                Icon(Icons.phone),
                Icon(Icons.message),
                Icon(Icons.contact_page),
              ],
            ),
          ),
        ),
      ),
    );
  }
}

 

결과물

 - Scaffold는 앱 화면의 상중하를 나눠주는 역할 (appBar, body, bottomNavigationBar)

 - Row는 위젯들을 가로로 나열하는 용도

viarect
viarect
viarect
내일부터 진짜 공부한다
viarect
전체
오늘
어제
  • 분류 전체보기 (8)
    • Computer Vision (3)
      • 딥러닝 CNN 완벽 가이드 (3)
      • 데이터 크리에이터 캠프 (0)
    • Flutter (1)
    • Reinforcement Learning (3)
    • 스누온 (0)

블로그 메뉴

  • 홈
  • 태그
  • 방명록

공지사항

인기 글

태그

  • flutter
  • dennybritz
  • Reinforcement
  • 코딩애플
  • 권철민

최근 댓글

최근 글

hELLO · Designed By 정상우.
viarect
Flutter 공부 2일차
상단으로

티스토리툴바

단축키

내 블로그

내 블로그 - 관리자 홈 전환
Q
Q
새 글 쓰기
W
W

블로그 게시글

글 수정 (권한 있는 경우)
E
E
댓글 영역으로 이동
C
C

모든 영역

이 페이지의 URL 복사
S
S
맨 위로 이동
T
T
티스토리 홈 이동
H
H
단축키 안내
Shift + /
⇧ + /

* 단축키는 한글/영문 대소문자로 이용 가능하며, 티스토리 기본 도메인에서만 동작합니다.