-
앱 개발 입문 수강 기록 7일 차_2023-02-26Study 2023. 2. 26. 16:33
강좌명
CH01_08. Firebase, Admob(앱 광고) 사용해보기
CH01_09. 기능 종합해서 간단한 어플 만들어보기_숫자 카운트 어플
- Firebase
- 모바일 앱을 분석, 테스트할 뿐만 아니라 개발, 서비스까지 할 수 있는 모바일 개발 플랫폼
- Analytics: 사용자 분석
- Firestore: 데이터 저장 및 불러오기
- Crashlytics: 모바일 오류 분석
- Authentication: 사용자 인증
- 모바일 앱을 분석, 테스트할 뿐만 아니라 개발, 서비스까지 할 수 있는 모바일 개발 플랫폼
- Admob
- 구글에서 제공하는 모바일 광고 플랫폼
- 앱을 통해서 수익을 창출하는 방법
- 배너 광고: 하단 하단에 노출
- 전면광고: 화면 전체 노출
- 보상형 광고: 게임 아이템 얻기
- admob_flutter 라이브러리 사용 예정
- 숫자 카운트 어플
- 축구, 탁구, 배드민턴 등 다양한 운동 종목에서 사용가능한 점수 카운트 어플
- 각 종목에 맞게 종료 점수를 변경할 수 있으며 점수를 증가, 감소시킬 수 있음
- 코드
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( title: '숫자 카운트 앱', theme: ThemeData( primarySwatch: Colors.blue, ), home: const MyHomePage(title: '숫자 카운트 앱 메인 페이지'), ); } } class MyHomePage extends StatefulWidget { const MyHomePage({super.key, required this.title}); final String title; @override State<MyHomePage> createState() => _MyHomePageState(); } class _MyHomePageState extends State<MyHomePage> { int _counter = 0; int _idx = 0; Color color = Colors.blue; int count1 = 0; int count2 = 0; String vicTeam = ""; void _incrementCounter() { setState(() { _counter++; }); } @override void initState() { super.initState(); color = Colors.green; } Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text(widget.title), ), body: Column( children: [ Container(height: 50), Text("탁구 대회", style: TextStyle(fontSize: 30, fontWeight: FontWeight.bold)), Container(height: 30), Row( mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ Text("패스트 대학"), Text("캠퍼스 대학"), ], ), Container(height: 10), Row( mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ Text("$count1점", style: TextStyle(fontSize: 25, fontWeight: FontWeight.bold)), Text("$count2점", style: TextStyle(fontSize: 25, fontWeight: FontWeight.bold)), ], ), Container(height: 30), Row( mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ Row( mainAxisAlignment: MainAxisAlignment.center, children: [ IconButton( icon: Icon(Icons.add), onPressed: () { setState(() { count1 = count1 + 1; if(count1 >= 10){ vicTeam = "패스트 대학 승리!!!"; } }); }, ), IconButton( icon: Icon(Icons.remove), onPressed: () { setState(() { count1 = count1 - 1; }); }, ), ], ), Row( mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ IconButton( icon: Icon(Icons.add), onPressed: () { setState(() { count2 = count2 + 1; if(count2 >= 10){ vicTeam = "캠퍼스 대학 승리!!!"; } }); }, ), IconButton( icon: Icon(Icons.remove), onPressed: () { setState(() { count2 = count2 - 1; }); }, ), ], ), ], ), Container(height: 20), Text(vicTeam, style: TextStyle(fontSize: 50, color: Colors.green), ) ], )); } }
- 정리
- 이제 괄호에 좀 익숙해졌다.
- 안드로이드 스튜디오에서 작업할 때 코드 리포맷 기능을 써주자. 보기가 더 편해진다.
- VSC에서는 자동으로 잘 해줘서 신경을 덜 썼었는데 얘는 줄 바꿈 때 자꾸 이상한데 갖다 놔서 불편함.
- 안드로이드 스튜디오에서 작업할 때 코드 리포맷 기능을 써주자. 보기가 더 편해진다.
- 자동 주석도 이제 익숙해져서 덜 헷갈린다.
- 코드 중 아이콘 위치 정렬 함수를 어따 써야 하는지 잠깐 헷갈렸지만 금방 해결함.
- 이미지 2번째 -> 3번째
- 이제 괄호에 좀 익숙해졌다.
#패스트캠퍼스 #패캠챌린지 #수강료0원챌린지
#직장인인강 #직장인자기계발 #패캠인강후기 #패스트캠퍼스후기
#환급챌린지 #오공완 #누적다운로드120만1인개발자와함께하는앱개발입문Online
http://bit.ly/3Y34pE0본 포스팅은 패스트캠퍼스 환급 챌린지 참여를 위해 작성되었습니다.
'Study' 카테고리의 다른 글
앱 개발 입문 수강 기록 9일 차_2023-02-28 (0) 2023.02.28 앱 개발 입문 수강 기록 8일 차_2023-02-27 (0) 2023.02.27 앱 개발 입문 수강 기록 6일 차_2023-02-25 (0) 2023.02.25 앱 개발 입문 수강 기록 5일 차_2023-02-24 (0) 2023.02.24 앱 개발 입문 수강 기록 4일 차_2023-02-23 (0) 2023.02.23 - Firebase