본문 바로가기

PROGRAMING/FLUTTER

(8)
Firebase 에서 request로 파라미터 받는법 Firebase 에서 request로 파라미터 받는법 import * as functions from 'firebase-functions'; // // Start writing Firebase Functions // // https://firebase.google.com/docs/functions/typescript // export const helloWorld = functions.https.onRequest((request, response) => { //console.log(request); //전체 내용이 다보인다. console.log(request.query); //queryString을 Json형태로 가져온다. { dfdf: 'aaa' } console.log(request.body); /..
firebase function 고고 설치 (TypeScript로 안하고 javscript로 하려다가 다시 typescript로) 로 했다. firebase init npm install -g typescript npm install -g ts-node 일단 여기까지 firebase init 해서 function 하고 잘 설치하자 스크립트는 typescript로 했다. function\index.ts 파일을 수정한다. import * as functions from 'firebase-functions'; // // Start writing Firebase Functions // // https://firebase.google.com/docs/functions/typescript // // export const helloWorld = functions.https.onRequest((request, response) => { // respons..
Flutter Loging 과 authentication 은 다르다!! 어제 자기 전에 인터넷 글에서 읽은 거다. firebase authentication 을 사용해서 flutter web 로그인을 구현하고 아싸 다했다 하고 있는데 관련 글을 읽었다. 로그인은 사이트에 권한을 얻는 행위이고 (로그인 대상의 권한에 따라 모든 api에 접근--딱히 제한도 체크로직도 없음) 인증은 api에 접근을 할때마다 인증토큰으로 이 api를 사용할 수 있는 지 인증하는 것을 의미한다고 한다. 인증을 로그인으로 쓸수도 있지만. 이런의미라고 한다. 지금은 그냥 넘어가지만 나중에 api 인증토큰을 붙여봐야겠다.
Flutter Web을 Firebase Authentication 사용하기 (firebase_auth)결국 쓰려면 쉘에서 (flutter run -d web-server --web-port 9090) 실행해야한다. 가려다가 결국 android에서 했다. https://www.youtube.com/watch?v=qtJU5T0tF-M 위 유투브 영상을 보고 알았다. 공식사이트는 https://pub.dev/packages/firebase_auth firebase_auth | Flutter Package Flutter plugin for Firebase Auth, enabling Android and iOS authentication using passwords, phone numbers and identity providers like Google, Facebook and Twitter. pub.dev 예제도 있고 다있다. web\index.html 에서 몇가지를 적어주어야한다. 특이점은 구글 client_id를 적어줘야한다는 것이다. firebase co..
Flutter TextField 입력 고고!! StatelessWidget하고 StatefulWidget 차이!! Flutter TextField 입력 고고!! StatelessWidget하고 StatefulWidget 차이!! StatelessWidget import 'package:flutter/material.dart'; void main() => runApp(MyApp()); class MyApp extends StatelessWidget { String _data=''; @override Widget build(BuildContext context) { return MaterialApp( title: 'Text입력에제', home: new Scaffold( appBar: new AppBar( title: new Text("My Input Text"), ), body: new Container( child: ..
Flutter 사실은 Vs Code 익스텐션 Project Manager 프로젝트를 북마트 해주는 기능 Flutter 사실은 Vs Code 익스텐션 Project Manager 프로젝트를 북마트 해주는 기능 별거는 없는데 유용하다. vs code를 쓰면서 단점이 폴더기반이라 프로젝트를 내가 다 기억해야한다. 위 도구를 쓰면 아래처럼 보여진다.!!
Flutter에서 Firebase에 Database를 사용해서 리스트를 표시하기.!![WEB] https://github.com/Dart-for-Apps/firebase-for-flutter 라이브러리를 설치해야한다. 해당 문서를 보고 flutter를 웹에서 띄울려면 웹전용 라이브러리를 설치해야하는지 알았다. 아 영어 ㅠㅠ 디폴트 라이브러리에 웹까지 다 지원하는게 포함되어있다. 그러므로 쓰는곳에도 웹라이브러리를 임포트 하는게 아니라 그냥 라이브러리를 임포트 한다. 웹에서 할때 별도로 해주어야 할것은 web/index.html 수정 이것 뿐이다. firebase database를 쓰기전 배열에 담은 코드 import 'package:firebase/firestore.dart'; import 'package:flutter/material.dart'; void main() => runApp(MyApp(..
Android license status unknown. 해결하기 C:\Users\JIJS>flutter doctor Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel stable, v1.12.13+hotfix.8, on Microsoft Windows [Version 10.0.18362.657], locale ko-KR) [!] Android toolchain - develop for Android devices (Android SDK version 29.0.2) X Android license status unknown. Try re-installing or updating your Android SDK Manager. See https://developer.android..