Skip to content
πŸ™€ A Cat adoption app that displays cats that are up for adoption, utilising Cloud Firestore, Firebase Functions and Google Sign In.
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
android Resolved most of the issues for iOS builds and jumped all versions Jan 16, 2019
assets Reverted to gradle 4.1, added better readme for troubleshooting Apr 30, 2018
firebase Fix read rule issue May 5, 2018
fonts Changed UI fonts Apr 4, 2018
images Updated readme, and loaded images from network Mar 31, 2018
ios
lib Resolved most of the issues for iOS builds and jumped all versions Jan 16, 2019
test Refactored class structure, added fading animation and added coverage Apr 4, 2018
.gitignore Resolved most of the issues for iOS builds and jumped all versions Jan 16, 2019
CHANGELOG.md Resolved most of the issues for iOS builds and jumped all versions Jan 16, 2019
LICENSE init Mar 29, 2018
README.md Resolved most of the issues for iOS builds and jumped all versions Jan 16, 2019
pubspec.lock Resolved most of the issues for iOS builds and jumped all versions Jan 16, 2019
pubspec.yaml Resolved most of the issues for iOS builds and jumped all versions Jan 16, 2019

README.md

CatBox Banner

CatBox

View cats that are up for adoption

Dart Flutter Firebase Gradle

About

A Flutter app that displays cats that are up for adoption along with information about them.

This application was built as an example application for The Complete Flutter and Firebase Developer Course, if you'd like to learn how to build this application from scratch you can use our coupon code GITHUB2019.

CatBox Banner

Download

CatBox is live on Google Play and in the process of being approved on the iOS App store.

Get it on Google Play

TODO

  • Launch adoption page using url_launcher
  • Change Firestore schema to new naming convention
  • Live Cat item reference so we can do updates to the UI in sync with Firestore changes
  • Add Cat description field

Building

You can follow these instructions to build the CatBox app and install it onto your device.

Prerequisites

If you are new to Flutter, please first follow the Flutter Setup guide.

Google API Configs

Obtain a copy of GoogleService-Info.plist and google-services.json from the firebase console and put them in the following directories if you need to build for release

./ios/Runner/GoogleService-Info.plist
./android/app/google-services.json

Keystore & Signing Keys

Obtain a copy of catbox.jks and key.properties and place them in the following locations

./catbox.jks
./android/key.properties

Build/Debug App

cd catbox
flutter upgrade
flutter run --release

The flutter run --release command both builds and installs the CatBox app.

If you are debugging the application on a simulator, run the following to launch the iOS simulator

open -a Simulator

Then run the following to debug with live reloading

flutter run --debug

Deploying Firebase Configuration

First install the firebase-tools package

npm install -g firebase-tools

Run the following to login to firebase cli

firebase login

Run the following within your ./firebase/functions/ directory if you are deploying functions

npm install

Make all the necessary changes within ./firebase/ in this project repository and then push the configuration using the following.

$ firebase deploy

=== Deploying to 'catbox-flutter'...

i  deploying storage, firestore, functions

etc...

βœ”  Deploy complete!

Generating the App Icons

Icon was created using: https://pub.dartlang.org/packages/flutter_launcher_icons

flutter pub get
flutter pub pub run flutter_launcher_icons:main

Due to a difference in the way that iOS and Android handle transparency, there's a separate icon file for iOS and a method for toggling on and off the icon changes in the pubspec.yaml

Build Issues

MissingPluginException

If you are getting a missing plugin exception (likely due to Firestore Cloud) simply run the following to clear out the old builds

flutter clean
flutter packages get

Can't Compile Debug APK

If you are unable to compile a debug version of the APK go into ./android/app/build.gradle and change the following line (comment out release and add the debug config)

buildTypes {
    release {
        //signingConfig signingConfigs.release
        signingConfig signingConfigs.debug
    }
}

iOS Build Fails around BoringSSL/internal.h

As Flutter is still in development and more importantly, the external packages that tie in to services like Google Play are still changing a lot, there's often some teething issues with breaking dependencies and build. Run the following in to hopefully resolve most of the issues

cd ios/
rm -rf Pods/ Podfile.lock ; pod install

Screenshots

CatBox App

Authors

Attribution

You can’t perform that action at this time.