Peaman
A service for building social media applications with ease!

Developer's Guide For Peaman Flutter - Shrijan Regmi

Flutter Integration

Follow the instructions below for the integration on Android and iOS. Get the package at pub.dev.

Firebase integration

Since this package is entirely made on top of Firebase, you should connect firebase to your Android and iOS. Adding Firebase to your app involves tasks both in the Firebase console and in your open Android or iOS project (for example, you download Firebase config files from the console, then move them into your Android or iOS project).

  1. 1
    Create a Firebase project
  2. 2
    Register your app with Firebase
    • Go to the Firebase console
    • In the center of the project overview page, click the Android or iOS+ icon to launch the setup workflow.
    • For Android: Enter your app's package name in the Android package name field. For iOS: Enter your app's bundle ID in the bundle ID field
    • (Optional) Enter other app information: App nickname, Debug signing certificate SHA-1 or App Store ID.
  3. 3
    Add a Firebase configuration file
    • Click Download google-services.json or GoogleService-Info.plist to obtain your Firebase Android or iOS config files respectively.
    • For Android: Move your config file into the module (app-level) directory of your app. For iOS: Move your config file into the root of your Xcode project. If prompted, select to add the config file to all targets.
    • Additional setup for Android only
      To enable Firebase products in your app, add the google-services plugin to your Gradle files.
      • In your root-level (project-level) Gradle file (build.gradle), add rules to include the Google Services Gradle plugin. Check that you have Google's Maven repository, as well.
        
          buildscript {

          repositories
        {
           
        // Check that you have the following line (if not, add it):
            google
        ()  // Google's Maven repository

         
        }

          dependencies
        {
           
        // ...

           
        // Add the following line:
            classpath
        'com.google.gms:google-services:4.3.10'  // Google Services plugin

         
        }
        }

        allprojects
        {
         
        // ...

          repositories
        {
           
        // Check that you have the following line (if not, add it):
            google
        ()  // Google's Maven repository

           
        // ...
         
        }
        }
      • In your module (app-level) Gradle file (usually app/build.gradle), apply the Google Services Gradle plugin:
        
        apply plugin: 'com.android.application'
        // Add the following line:
        apply plugin
        : 'com.google.gms.google-services'  // Google Services plugin


        android
        {
         
        // ...
        }

Use this package as library

Using peaman package is fairly simple. You just have to follow the following 3 steps:

  1. 1
    Add this to your package's pubspec.yaml file
    
    dependencies:
        peaman: ^0.0.2
                                
  2. 2
    Inside your dart file import peaman like this
    
    import 'package:peaman/peaman.dart';
                                
  3. 3
    Initialize peaman before your runApp call
                                
    import 'package:peaman/peaman.dart';
    
    void main() async {
        await Peaman.initializeApp();
        runApp(ExampleApp());
    }
                                

Start using the package