Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable local development #36

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,16 @@ just a small amount to help sustain this project, I would be very very thankful!
I welcome any issues or pull requests on GitHub. If you find a bug, or would like a new feature,
don't hesitate to open an appropriate issue and I will do my best to reply promptly.

### Quick Development Setup

```
gh repo fork DungeonPaper/dungeon-paper-app --clone # Fork the Repository with the Github CLI. Alternatively, do it manually
cd dungeon-paper-app
./local_development.sh # Setup firebase and secrets, as explained in *Development Set Up*
```

You will be unable to access online features (login, etc) and other parts of the app may be broken, but offline features (using the app) seems to work well, and you can develop and add features.

### Development Set Up

1. Download Flutter
Expand Down
37 changes: 37 additions & 0 deletions local_development.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/sh
cat >lib/core/utils/secrets.dart <<!
part of 'secrets_base.dart';

class Secrets extends SecretsBase {
@override
final String sentryDsn = '';
}
!

cat >lib/firebase_options.dart <<!
// File generated by FlutterFire CLI.
// ignore_for_file: lines_longer_than_80_chars, avoid_classes_with_only_static_members
import 'package:firebase_core/firebase_core.dart' show FirebaseOptions;
import 'package:flutter/foundation.dart' show defaultTargetPlatform, kIsWeb, TargetPlatform;

/// Default [FirebaseOptions] for use with your Firebase apps.
class DefaultFirebaseOptions {
static FirebaseOptions get currentPlatform {
if (kIsWeb) { return web; }
switch (defaultTargetPlatform) {
case TargetPlatform.android: return android;
case TargetPlatform.iOS: return ios;
case TargetPlatform.macOS: return macos;
case TargetPlatform.windows: throw UnsupportedError( 'DefaultFirebaseOptions have not been configured for windows - ' 'you can reconfigure this by running the FlutterFire CLI again.');
case TargetPlatform.linux: throw UnsupportedError( 'DefaultFirebaseOptions have not been configured for linux - ' 'you can reconfigure this by running the FlutterFire CLI again.');
default: throw UnsupportedError( 'DefaultFirebaseOptions are not supported for this platform.');
}
}

static const FirebaseOptions web = FirebaseOptions( apiKey: 'AIzaSyAhmhBoM81HfITEZdH8yE1M7uFcQpv0lYs', appId: '1:168370418374:web:ef411af9348555e3b55dc7', messagingSenderId: '168370418374', projectId: 'magnus--dungeon-paper', authDomain: 'magnus--dungeon-paper.firebaseapp.com', storageBucket: 'magnus--dungeon-paper.appspot.com');
static const FirebaseOptions android = FirebaseOptions( apiKey: 'AIzaSyB7W1eHot3r0QzKZdZOctmw1PNON9SXalU', appId: '1:168370418374:android:73f5e62c013e47a8b55dc7', messagingSenderId: '168370418374', projectId: 'magnus--dungeon-paper', storageBucket: 'magnus--dungeon-paper.appspot.com');
static const FirebaseOptions ios = FirebaseOptions( apiKey: 'AIzaSyBywx73oAat53Oty-RzJK7n3qt6GtBRnds', appId: '1:168370418374:ios:40ad73aa84a3230ab55dc7', messagingSenderId: '168370418374', projectId: 'magnus--dungeon-paper', storageBucket: 'magnus--dungeon-paper.appspot.com', iosBundleId: 'app.dungeonPaper');
static const FirebaseOptions macos = FirebaseOptions( apiKey: 'AIzaSyBywx73oAat53Oty-RzJK7n3qt6GtBRnds', appId: '1:168370418374:ios:40ad73aa84a3230ab55dc7', messagingSenderId: '168370418374', projectId: 'magnus--dungeon-paper', storageBucket: 'magnus--dungeon-paper.appspot.com', iosBundleId: 'app.dungeonPaper');
}
!