Flutter ํ ํฌ
-
Flutter Chat GPT์ฐ๋Flutter ํ ํฌ 2024. 7. 10. 21:12
1. GPT๊ฒฐ์ ์๋จ ๋ฑ๋ก๋ฑ๋กํ์ด์ง -> https://platform.openai.com/settings/organization/billing/overview 2. ํ๋ก์ ํธ ์์ฑ์ข์ธก ๋ฉ๋ด๋ฐ์ "+Create Project"๋ฅผ ๋๋ฌ ํ๋ก์ ํธ ์์ฑ 3. Secret Key์์ฑ 4. GPT์ ํต์ ํ ํจ์ ์์ฑimport 'dart:convert';import 'package:http/http.dart' as http;import 'package:firebase_database/firebase_database.dart';class ChatServices { static const String _baseUrl = 'https://api.openai.com/v1/chat/completions'; final St..
-
Flutter Web Firebase Auth์ฐ๋Flutter ํ ํฌ 2024. 7. 8. 23:08
1. Firebase๊ธฐ๋ณธ์ฐ๋์ด ์๋ฃ๋ ์ํ์์ ํญ ๋ฉ๋ด์์ "๋น๋" -> "Authentication"์ ํ2. ๊ธฐ๋ณธ์ ์ธ "์ด๋ฉ์ผ/๋น๋ฐ๋ฒํธ"์ ํ ํ ์ฌ์ฉ์ค์ ํ ์ ์ฅ ํด๋ฆญ 3. Firebase Authํจํค์ง ์ค์น(https://pub.dev/packages/firebase_auth/install)firebase_auth: ^5.1.1 4. Flutter ํ๋ก์ ํธ์ web/index.html ์ด๊ธฐ 5. ํ๋จ์ ํ๊ทธ ๋ฐ์ ์๋์ ์ค๋ํซ ์ถ๊ฐ 6. ๋ฐฐํฌ ํ ํ์ธ7. ํ์ฉ ์์ ์ฝ๋// ๋น๋ฐ๋ฒํธ ์ฌ์ค์ ๋ฉ์ผ ์ ์กFuture sendResetPasswordEmail(String email) async { try { await FirebaseAuth.instance.setLanguageCode("ko"); ..
-
Flutter Firebase Hosting ์ค์ (์น์ฌ์ดํธ๋ฐฐํฌ)Flutter ํ ํฌ 2024. 7. 8. 19:34
1. Firebase ๊ธฐ๋ณธ ์ฐ๋ ํ ๋น๋ -> Hosting ์ ํ 2. ํฐ๋ฏธ๋์ ์๋ ๋ช ๋ น์ด ์ ๋ ฅfirebase init 3. ํญ๋ชฉ๋ค ์ค์์ ์คํ์ด์ค๋ฐ๋ฅผ ๋๋ฌ์ "Hosting"์ฒซ๋ฒ์งธ ํญ๋ชฉ ์ ํ ํ ์ํฐ 4. ์ด๋ค ํ๋ก์ ํธ๋ฅผ ์ ํํ ์ง ์ ํ, Firebase์ ๋ฑ๋กํด๋ ํ๋ก์ ํธ๋ฅผ ์ ํํ์์ 5. ํ์ฌ ๋ก๊ทธ์ธ๋ ๊ณ์ ์ Firebase์ ๋ฑ๋ก๋ ํ๋ก์ ํธ ๋ฆฌ์คํธ๊ฐ ๋จ๋ฉฐ ์ฌ๊ธฐ์ ์ฐ๊ฒฐํ ํ๋ก์ ํธ ์ ํ ํ ์ํฐ 6. ๋น๋ ์ค์ ์ค ์๋์ ๊ฐ์ ์ง๋ฌธ์ด ๋์ค๋ฉด "build/web"์ด๋ผ๊ณ ์ ๋ ฅ [build/web์ ๋ ฅ ํ] 7. ๋ค๋ฅธ ์ง๋ฌธ๋ค์ ๋ํด์ ์ ๋ถ ์ํฐ ์ ๋ ฅํ๋ฉด ์ฐ๋์๋ฃ 8. ์ด๊ธฐ๋ฐฐํฌ ํ์ธ ์ํด ํฐ๋ฏธ๋์ "flutter build web"์ ๋ ฅ ํ "firebase deploy --only hosting"์ ๋ ฅ 9. D..
-
Flutter + Firebase ์ฐ๋Flutter ํ ํฌ 2023. 11. 24. 12:14
Firebase ์ฐ๋1. Firebase ์ฝ์์ด๋ ํ ํ๋ก์ ํธ ์์ฑ -> ํ๋ก์ ํธ ์ด๋ฆ์ ๋ ฅ 2. ์ ๋๋ฆฌํฑ์ค๋ ํ์ฉ๋๊ฐ ๋ง๊ณ ๊ธฐ๋ณธ์ ์ผ๋ก ์ ์ฉํ๋ ๊ธฐ๋ฅ์ด๊ธฐ์ ์ฌ์ฉ์ค์ ๊ทธ๋๋ก ๋๊ณ ๊ณ์ 3. ์ ๋๋ฆฌํฑ์ค ๊ณ์ ์ ํ ๋๋ ์์ฑ ํ ์ ์ฉ, ์ ๋๋ฆฌํฑ์ค ์์น๋ ๋ฏธ๊ตญ์ผ๋ก ๋๊ณ ๊ณ์ 4. ํ์ํ ํจํค์ง ๋ค์ด๋ก๋ (/pubspec.yaml)firebase_core: ^3.1.1 5. Firebase ์ฝ์์์ ์ฐ์ธก์ ์๋ Flutter ์์ด์ฝ์ ๋๋ฌ ์ฐ๋ ์์ 6. Firebase CLI ์ค์น ๋ฐ ๋ก๊ทธ์ธ, ์คํ ํฐ๋ฏธ๋์์ ์๋๊ฐ ์ ๋ ฅnpm install -g firebase-toolsfirebase login ๋ค์ ๋จ๊ณ์ ๋์ค๋ ๋ช ๋ น์ด๋ค์ ํฐ๋ฏธ๋์ ์ ๋ ฅ ๋ง์ฝ ์๋์ ๊ฐ์ด ๊ฒฝ๊ณ ๊ฐ ๋ฌ๋ค๋ฉด ํฐ๋ฏธ๋์ export PATH="$PA..
-
Flutter + FCM ์ฐ๋ (Flutter 3.0์ด์, ์๋ก์ดFCM์ ์ฉ๋ฒ์ , 3.0์ด์์ด ์๋์ฌ๋ ๊ฐ๋ฅํฉ๋๋ค)Flutter ํ ํฌ 2023. 11. 24. 11:33
1. Firebase Cloud Messaging ์ถ๊ฐํ๊ธฐ pubspec.yaml ์์ : firebase_messaging, flutter_local_notifications ํจํค์ง๋ฅผ pubspec.yaml ํ์ผ์ ์ถ๊ฐ ํ pubget firebase_messaging: ^14.1.4 flutter_local_notifications: ^12.0.4 2. iOS ์ค์ [2 - 1] ios/Runner/Info.plist ํ์ผ์ ์ด๊ณ ๋ค์ ํค๋ฅผ ์ถ๊ฐ UIBackgroundModes fetch remote-notification [2 - 2] xCode๋ฅผ ์ด๊ณ Capabilitiesํญ์์ PushNotifications, BackgroundMode ํ์ฑํ 3. APNs ์ธ์ฆํค๋ฅผ Firebase๋ฅผ ์ถ๊ฐํ๊ธฐ [3..
-
Flutter Fastlane CI/CD(2) - AndroidFlutter ํ ํฌ 2023. 3. 7. 01:08
1. Fastlane init cd android/ fastlane initโ Android ํด๋๋ก ์ด๋ํ์ ์, init ๋ช ๋ น์ด๋ฅผ ์ ๋ ฅํฉ๋๋ค. ์ด๊ธฐ์ ํจํค์ง ์ด๋ฆ์ ์ ๋ ฅํ๋ผ๊ณ ๋์ต๋๋ค. ํจํค์ง ์ด๋ฆ(com.example.example)์ด ๊ธฐ์ต๋์ง ์์ผ์ ๋ค๋ฉด, app/build.gradle ํ์ผ ๊ฐ์ ์ applicationId ํญ๋ชฉ์ ์๋ ํจํค์ง ์ด๋ฆ์ ๊ฐ์ ธ์ต๋๋ค. 2. Json Secret File ํจํค์ง ์ด๋ฆ์ ์ ๋ ฅํ๋ฉด, json secret file ๊ฒฝ๋ก๋ฅผ ๋ฃ์ผ๋ผ๊ณ ํฉ๋๋ค. (json_secret_file? Fastlane Android ๊ณต์๋ฌธ์ Collect your Google credentials ์น์ ) 2-1. GCP ์ ์ Google Cloud Platform ์ฌ์ดํธ์ IAM ๋ฐ ๊ด๋ฆฌ์ > ..
-
Flutter Fastlane CI/CD(1) - iOSFlutter ํ ํฌ 2023. 3. 7. 01:00
1. Fastlane ์ค์น brew install fastlane or sudo gem install fastlane homebrew ๋ RubyGem ์ ํตํด Fastlane ์ ์ค์นํ ์ ์์ต๋๋ค. ๊ณต์๋ฌธ์ ์ ๋ฐ๋ฅด๋ฉด, Gem ์ Ruby ํ๊ฒฝ์ ์์กดํ๊ธฐ ๋๋ฌธ์ brew ๋ก ์ค์นํ๋ ๊ฒ์ ์ถ์ฒํ๋ค๊ณ ํฉ๋๋ค 2. Fastlane init cd ios/ fastlane init fastlane init ๋ช ๋ น์ด๋ฅผ ์ ๋ ฅํ๋ฉด Setup ์ข ๋ฅ๋ฅผ ๋ฌผ์ด๋ณด๋ ์ฝ์์ฐฝ์ด ๋์ต๋๋ค. Manual Setup์ ํ ๊ฒ์ด๊ธฐ์ 4๋ฒ์ ์ ๋ ฅํฉ๋๋ค 3. Fastlane Match ์ค์ (์ ํ์ ) Fastlane Match ๋, Fastlane ์์ ์๋ ์ฝ๋ ์ฌ์ด๋ ๋ฐฉ๋ฒ์ ํ ์ข ๋ฅ์ ๋๋ค. ๊ฐ๋ตํ ๋งํ์๋ฉด, ์ธ์ฆ์์ ํ๋กํ์ผ์ ํ๋์..
-
[Flutter] YouTube playerFlutter ํ ํฌ 2022. 8. 25. 01:20
1. ํจํค์ง ๋ค์ด๋ก๋ youtube_player_flutter: ^8.0.0 (https://pub.dev/packages/youtube_player_flutter) 2. android ์ค์ (iOS๋ ์ถ๊ฐ์ ์ธ ์ค์ X) minSdkVersion -> 17๋ก ์ค์ (android/app/build.gradle) 3. ํ์ผ ์์ฑ ํ ์ ์ฉ import 'package:youtube_player_flutter/youtube_player_flutter.dart' as youtube; class YoutubePlayer extends StatefulWidget { @override YoutubePlayerState createState() => YoutubePlayerState(); } class YoutubePla..