inblog logo
|
하쎄의 기술 일기장
    Flutter

    [Flutter] 프로젝트 생성

    4. 프로젝트 생성
    하세연's avatar
    하세연
    Oct 02, 2024
    [Flutter] 프로젝트 생성
    Contents
    1. 프로젝트 설정

    1. 프로젝트 설정

    • 프로젝트 이름은 소문자로 작성한다. 이후 메서드나 클래스, import 시 헷갈리지 않기 위해서
    notion image
     
    notion image
     
    notion image
     
    notion image
    기본적으로 메인에서 시작할 때, MaterialApp vs CupertinoApp 설정을 해서 안드로이드 vs IOS 설정을 해준다.
     
     
    notion image
     
    notion image
    💡
    , (콤마) 를 넣고 저장하면 자동 정렬되는 설정
    다트는 콤마가 자동 정렬하는 기능을 한다
     
    notion image
    notion image
     
     
    notion image
     
    notion image
     
    class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( home: Scaffold( body: Column( children: [ Padding( padding: const EdgeInsets.all(16.0), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text("Woman"), Text("Woman"), Text("Woman"), Text("Woman"), ], ), ), ], ), ), ); } }
    notion image
    AppBar에서 왼쪽 오른쪽 padding 은 16이 표준이다
     
     
    사진 첨부하기
    notion image
    yml은 스페이스 두칸 설정이 필수
    notion image
    이후 Pub get을 눌러서 설정을 적용시킨다
    yml을 설정하면 핫 리로드가 안된다 → 서버를 완전 껐다가 다시 켜야한다
     
    Share article

    하쎄의 기술 일기장

    RSS·Powered by Inblog