수강 강의명:
CH02_01.앱 기능 및 디자인 설계 및 초기 구조 만들기(Todo앱)
CH02_02. TODO 화면 만들기 STEP 1
강의 내용 :
★ App바를 안보이게 하는 방법
PreferredSize(child:AppBar(),
preferredSize: Size.fromHeight(0),
을 설정해줍니다. 그러면 아래처럼 App를 안보이는 효과를 줍니다.
return Scaffold(
appBar: PreferredSize(child:AppBar(),
preferredSize: Size.fromHeight(0),
title: Text(widget.title),
),
★어플 맨 아래쪽 부분인 bottomNavigationBar를 추가할 수 있습니다.
BottomNavigationBarItem에서 icon: Icon(Icons.today_outlined),
label: "오늘"을 치면 BottomNavigationBar가 추가되면서 이름에 "오늘"이 들어갑니다.
더 추가할려면 outlined 대신에 assessment_outlined랑 more_horiz을 치고 label에 기록 또는 더보기 등을 넣으면 됩니다.
bottomNavigationBar: BottomNavigationBar(
items: [
BottomNavigationBarItem(
icon: Icon(Icons.today_outlined),
label: "오늘"
),
bottomNavigationBar: BottomNavigationBar(
items: [
BottomNavigationBarItem(
icno: Icon(Icons.assessment_outlined),
label: "기록"
),
bottomNavigationBar: BottomNavigationBar(
items: [
BottomNavigationBarItem(
icno: Icon(Icons.more_horiz),
label: "더보기"
★나중에 관리하기 좋게 lib > data에 dart file들을 추가해줍니다.
우선 todo에서 날짜 관련된 dart file "Utils"파일을 만들어줍니다.
이렇게 하면 나중에 여러 프로그램들이 많을 때 관리하기 수월해집니다.
class Utils {
static int getFormatTime(DateTime date){
return int.parse("${date.year}${makeTwoDigit(date.month)}${makeTwoDigit(date.day)}");
}
static DateTime numToDataTime(int date){
String _d = date.toString();
//20210708
int year = int.parse(_d.substring(0,4));
int month = int.parse(_d.substring(4,6));
int day = int.parse(_d.substring(6,8));
return DateTime(year, month, day);
}
static String makeTwoDigit(int num){
return num.toString().padLeft(2, "0");
}
}
강의 요약 :
Todo 어플 만드는 실습(appbar 설정, bottomNavigationbar 설정, dart file추가)
후기
하나 하나 강사님이 하시는거를 따라하면서 하니 어플을 하나 하나 생성되는 거를 볼 수 있어 좋았습니다.
#패스트캠퍼스 #패캠챌린지 # 직장인인강 #직장인자기계발 #패스트캠퍼스후기
#누적 다운로드 120만+ 1인 개발자와 함께하는 앱 개발 입문 Online.
패스트캠퍼스 [직장인 실무교육]
프로그래밍, 영상편집, UX/UI, 마케팅, 데이터 분석, 엑셀강의, The RED, 국비지원, 기업교육, 서비스 제공.
fastcampus.co.kr
본 포스팅은 패스트캠퍼스 환급 챌린지 참여를 위해 작성되었습니다.
'어플 -패스트캠퍼스' 카테고리의 다른 글
패스트 캠퍼스 챌린지 16일차 (0) | 2022.02.08 |
---|---|
패스트 캠퍼스 챌린지 15일차 (0) | 2022.02.07 |
패스트 캠퍼스 챌린지 13일차 (0) | 2022.02.05 |
패스트 캠퍼스 챌린지 12일차 (0) | 2022.02.04 |
패스트 캠퍼스 챌린지 11일차 (0) | 2022.02.03 |