패키지, 저장소 및 앱 카테고리 검색

패키지 상세v0.0.1

fire_flutter_db

FlutterFire는 깔끔하고 직관적인 API를 통해 Flutter 앱에서 Firebase 통합을 간소화하며, 인증 및 Firestore 데이터베이스 작업을 원활하게 제공합니다.

AndroidiOSWebmacOS
30일 다운로드
29
좋아요
7
Pub 점수
120

패키지 설치

flutter pub add fire_flutter_db

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

FireFlutterDB는 Firebase와의 통합을 간편하게 해주는 Flutter 패키지로, 인증 및 Firestore 데이터베이스 작업을 위한 직관적인 API를 제공합니다. Android, iOS, 웹, macOS 플랫폼에서 사용자 로그인, 데이터 검색, 실시간 업데이트 등의 일반적인 작업을 간소화합니다. 봐야 할 코드 없이 원활한 Firebase 기능을 원하는 개발자를 위해 설계되었으며, 생산성을 향상시키고 설정 복잡성을 줄입니다. 이 패키지는 더 넓은 FlutterFire 생태계의 일부로서 호환성과 일관된 디자인 패턴을 보장합니다.

사용 사례

  • 실시간 데이터 동기화
  • 사용자 인증 워크플로
  • 크로스플랫폼 앱 개발
  • 클라우드 기반 상태 관리
  • 오프라인 우선 앱 기능

주요 기능

  • 깔끔하고 직관적인 API
  • 실시간 Firestore 리스너
  • 내장 인증 방법
  • 다중 플랫폼 지원
  • 최소한의 보일러플레이트 코드

적합한 대상

  • 초보자에서 중급자까지의 Flutter 개발자
  • 실시간 데이터가 필요한 앱
  • Firebase를 백엔드로 사용하는 프로젝트
  • 크로스플랫폼 모바일 및 웹 앱
  • 빠른 프로토타이핑

고려 사항

  • Firebase 프로젝트 설정이 필요합니다
  • Firebase 서비스에 제한됨
  • FlutterFire 생태계에 의존
  • 앱 크기가 증가할 수 있습니다
  • 클라우드 동기화를 위해 인터넷 연결이 필요합니다

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

FLUTTER FIRE 🔥

This Flutter package, named flutter_fire, provides convenient and streamlined access to Firebase Authentication and Firestore operations within your Flutter applications. It simplifies tasks such as user authentication via email/password and Google Sign-In, as well as common Firestore operations like retrieving single documents, fetching all documents in a collection, and streaming data updates. With its intuitive methods, flutter_fire aims to enhance your development experience by seamlessly integrating Firebase services into your Flutter projects.

Features

  1. Authentication:

    • Sign in with email and password.
    • Create a new user with email and password.
    • Sign in with Google authentication.
  2. Firebase Firestore Operations:

    • Find a single document by ID.
    • Find all documents in a collection.
    • Get a stream of data from a Firestore collection.
    • Retrieve data from a Firestore collection.
    • Find a list of documents present in a list of document IDs and return them as a stream.
  3. Convenience Features:

    • Access to the current user.
    • Stream for authentication state changes.

Getting started

Prerequisites
  1. Flutter Setup: Ensure you have Flutter installed on your system. You can find installation instructions on the official Flutter website.

  2. Firebase Account: Create a Firebase account if you haven't already. You can sign up for free on the Firebase website.

@echo off

echo Firebase Login checking...
call firebase login
echo Adding Firebase plugins to the Flutter project...
call firebase init
echo Adding Firebase plugins to the Flutter project...
call flutter pub add firebase_core firebase_auth cloud_firestore
echo Running Flutter project...
call flutter run

To use this script, create a new text file in your project directory, name it firebase_init.bat, and paste the above code into it. Then, you can simply run this file from the command line to set up Firebase and add the necessary plugins to your Flutter project. Make sure you have both the Firebase CLI and Flutter installed and configured on your system before running this script.

Usage

import 'package:flutter_fire/flutter_fire.dart';

1. Authentication :

// Initialize FlutterFire instance
FlutterFire flutterFire = FlutterFire();

// Sign in with email and password
await flutterFire.signInWithEmailAndPassword(email: 'example@email.com', password: 'password');

// Create a new user with email and password
await flutterFire.createUserWithEmailAndPassword(email: 'newuser@email.com', password: 'newpassword');

// Sign in with Google authentication
await flutterFire.signInWithGoogle();

2. Firestore Operations :

// Get a single document by ID
Map<String, dynamic>? document = await flutterFire.findOne('collectionName', 'documentId');

// Get all documents in a collection
List<dynamic>? documents = await flutterFire.findAll('collectionName');

// Stream data from a Firestore collection
Stream<QuerySnapshot<Map<String, dynamic>>> stream = flutterFire.getStreamData('collectionName');

// Retrieve data from a Firestore collection
Map<String, dynamic> data = flutterFire.getData('collectionName');

// Find documents present in a list of document IDs and return them as a stream
Stream<List<Map<String, dynamic>>> docStream = flutterFire.findStreamContainingList('collectionName', 'documentId', ['id1', 'id2']);

3. Convenience Features:

// Access the current user
User? currentUser = flutterFire.currentUser;

// Stream for authentication state changes
Stream<User?> authStream = flutterFire.authStateChanges;

These examples showcase how to perform common authentication and Firestore operations using the flutter_fire package, making it easier for developers to integrate Firebase services into their Flutter applications.

카테고리

의존성

의존성 목록 5 개

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.