[go: nahoru, domu]

Skip to content

Commit

Permalink
feat: update melos and add firebase_options.dart stubs
Browse files Browse the repository at this point in the history
  • Loading branch information
exaby73 committed Jan 19, 2024
1 parent 7e1ea00 commit c44a356
Show file tree
Hide file tree
Showing 19 changed files with 469 additions and 47 deletions.
5 changes: 0 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,6 @@ analytics/ios/firebase_app_id_file.json
analytics/ios/Runner/GoogleService-Info.plist
analytics/macos/firebase_app_id_file.json
analytics/macos/Runner/GoogleService-Info.plist
analytics/lib/firebase_options.dart
dynamic_links/lib/firebase_options.dart

# ignore firebase_options.dart for all examples
**/firebase_options.dart

# ignore .firebaserc for all examples
**/.firebaserc
Expand Down
2 changes: 1 addition & 1 deletion admob/test/widget_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import 'package:admob_quickstart/main.dart';
void main() {
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
// Build our app and trigger a frame.
await tester.pumpWidget(const MyApp());
await tester.pumpWidget(MyApp(state: ApplicationState()));

// Verify that our counter starts at 0.
expect(find.text('0'), findsOneWidget);
Expand Down
8 changes: 8 additions & 0 deletions analytics/lib/firebase_options.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import 'package:firebase_core/firebase_core.dart' show FirebaseOptions;

/// Run 'flutterfire configure' to generate platform-specific FirebaseOptions.
class DefaultFirebaseOptions {
static FirebaseOptions get currentPlatform {
throw StateError("firebase_options.dart not generated. Did you run 'flutterfire configure'?");
}
}
8 changes: 8 additions & 0 deletions authentication/lib/firebase_options.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import 'package:firebase_core/firebase_core.dart' show FirebaseOptions;

/// Run 'flutterfire configure' to generate platform-specific FirebaseOptions.
class DefaultFirebaseOptions {
static FirebaseOptions get currentPlatform {
throw StateError("firebase_options.dart not generated. Did you run 'flutterfire configure'?");
}
}
8 changes: 8 additions & 0 deletions cloud_functions/lib/firebase_options.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import 'package:firebase_core/firebase_core.dart' show FirebaseOptions;

/// Run 'flutterfire configure' to generate platform-specific FirebaseOptions.
class DefaultFirebaseOptions {
static FirebaseOptions get currentPlatform {
throw StateError("firebase_options.dart not generated. Did you run 'flutterfire configure'?");
}
}
2 changes: 1 addition & 1 deletion cloud_functions/test/widget_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import 'package:cloud_functions_example/main.dart';
void main() {
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
// Build our app and trigger a frame.
await tester.pumpWidget(const MyApp());
await tester.pumpWidget(MyApp(state: ApplicationState()));

// Verify that our counter starts at 0.
expect(find.text('0'), findsOneWidget);
Expand Down
8 changes: 8 additions & 0 deletions crashlytics/lib/firebase_options.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import 'package:firebase_core/firebase_core.dart' show FirebaseOptions;

/// Run 'flutterfire configure' to generate platform-specific FirebaseOptions.
class DefaultFirebaseOptions {
static FirebaseOptions get currentPlatform {
throw StateError("firebase_options.dart not generated. Did you run 'flutterfire configure'?");
}
}
8 changes: 8 additions & 0 deletions dynamic_links/lib/firebase_options.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import 'package:firebase_core/firebase_core.dart' show FirebaseOptions;

/// Run 'flutterfire configure' to generate platform-specific FirebaseOptions.
class DefaultFirebaseOptions {
static FirebaseOptions get currentPlatform {
throw StateError("firebase_options.dart not generated. Did you run 'flutterfire configure'?");
}
}
4 changes: 2 additions & 2 deletions dynamic_links/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const title = 'Firebase Dynamic Links Quickstart';

class MyApp extends StatelessWidget {
const MyApp({super.key, required this.state});

final ApplicationState state;

// This widget is the root of your application.
Expand Down Expand Up @@ -60,7 +60,7 @@ class MyApp extends StatelessWidget {

class MyHomePage extends StatelessWidget {
const MyHomePage({super.key, required this.title, required this.state});

// This widget is the home page of your application. It is stateful, meaning
// that it has a State object (defined below) that contains fields that affect
// how it looks.
Expand Down
8 changes: 8 additions & 0 deletions firestore/lib/firebase_options.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import 'package:firebase_core/firebase_core.dart' show FirebaseOptions;

/// Run 'flutterfire configure' to generate platform-specific FirebaseOptions.
class DefaultFirebaseOptions {
static FirebaseOptions get currentPlatform {
throw StateError("firebase_options.dart not generated. Did you run 'flutterfire configure'?");
}
}
8 changes: 8 additions & 0 deletions inappmessaging/lib/firebase_options.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import 'package:firebase_core/firebase_core.dart' show FirebaseOptions;

/// Run 'flutterfire configure' to generate platform-specific FirebaseOptions.
class DefaultFirebaseOptions {
static FirebaseOptions get currentPlatform {
throw StateError("firebase_options.dart not generated. Did you run 'flutterfire configure'?");
}
}
20 changes: 14 additions & 6 deletions melos.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
name: quickstart-flutter
name: quickstart_flutter
repository: https://github.com/firebase/quickstart-flutter

packages:
- authentication/**
- crashlytics/**
- firestore/**
- remote_config/**
- storage/**
- admob
- authentication
- cloud_functions
- crashlytics
- dynamic_links
- firestore
- inappmessaging
- messaging
- performance
- remote_config
- storage

scripts:
analyze: melos exec -- "dart analyze ."

format: melos exec -- "dart format ."

lint:all:
run: melos run analyze && melos run format
Expand Down
8 changes: 8 additions & 0 deletions messaging/lib/firebase_options.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import 'package:firebase_core/firebase_core.dart' show FirebaseOptions;

/// Run 'flutterfire configure' to generate platform-specific FirebaseOptions.
class DefaultFirebaseOptions {
static FirebaseOptions get currentPlatform {
throw StateError("firebase_options.dart not generated. Did you run 'flutterfire configure'?");
}
}
8 changes: 8 additions & 0 deletions performance/lib/firebase_options.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import 'package:firebase_core/firebase_core.dart' show FirebaseOptions;

/// Run 'flutterfire configure' to generate platform-specific FirebaseOptions.
class DefaultFirebaseOptions {
static FirebaseOptions get currentPlatform {
throw StateError("firebase_options.dart not generated. Did you run 'flutterfire configure'?");
}
}
64 changes: 32 additions & 32 deletions performance/lib/firebase_status.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class ResponseJson {
if (json['response'] != null) {
response = <FirebaseStatus>[];
json['response'].forEach((v) {
response!.add(new FirebaseStatus.fromJson(v));
response!.add(FirebaseStatus.fromJson(v));
});
}
}
Expand Down Expand Up @@ -58,11 +58,11 @@ class FirebaseStatus {
if (json['updates'] != null) {
updates = <Updates>[];
json['updates'].forEach((v) {
updates!.add(new Updates.fromJson(v));
updates!.add(Updates.fromJson(v));
});
}
mostRecentUpdate = json['most_recent_update'] != null
? new Updates.fromJson(json['most_recent_update'])
? Updates.fromJson(json['most_recent_update'])
: null;
statusImpact = json['status_impact'];
severity = json['severity'];
Expand All @@ -71,36 +71,36 @@ class FirebaseStatus {
if (json['affected_products'] != null) {
affectedProducts = <AffectedProducts>[];
json['affected_products'].forEach((v) {
affectedProducts!.add(new AffectedProducts.fromJson(v));
affectedProducts!.add(AffectedProducts.fromJson(v));
});
}
uri = json['uri'];
}

Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['number'] = this.number;
data['begin'] = this.begin;
data['created'] = this.created;
data['end'] = this.end;
data['modified'] = this.modified;
data['external_desc'] = this.externalDesc;
if (this.updates != null) {
data['updates'] = this.updates!.map((v) => v.toJson()).toList();
final Map<String, dynamic> data = <String, dynamic>{};
data['id'] = id;
data['number'] = number;
data['begin'] = begin;
data['created'] = created;
data['end'] = end;
data['modified'] = modified;
data['external_desc'] = externalDesc;
if (updates != null) {
data['updates'] = updates!.map((v) => v.toJson()).toList();
}
if (this.mostRecentUpdate != null) {
data['most_recent_update'] = this.mostRecentUpdate!.toJson();
if (mostRecentUpdate != null) {
data['most_recent_update'] = mostRecentUpdate!.toJson();
}
data['status_impact'] = this.statusImpact;
data['severity'] = this.severity;
data['service_key'] = this.serviceKey;
data['service_name'] = this.serviceName;
if (this.affectedProducts != null) {
data['status_impact'] = statusImpact;
data['severity'] = severity;
data['service_key'] = serviceKey;
data['service_name'] = serviceName;
if (affectedProducts != null) {
data['affected_products'] =
this.affectedProducts!.map((v) => v.toJson()).toList();
affectedProducts!.map((v) => v.toJson()).toList();
}
data['uri'] = this.uri;
data['uri'] = uri;
return data;
}
}
Expand All @@ -123,12 +123,12 @@ class Updates {
}

Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['created'] = this.created;
data['modified'] = this.modified;
data['when'] = this.when;
data['text'] = this.text;
data['status'] = this.status;
final Map<String, dynamic> data = <String, dynamic>{};
data['created'] = created;
data['modified'] = modified;
data['when'] = when;
data['text'] = text;
data['status'] = status;
return data;
}
}
Expand All @@ -145,9 +145,9 @@ class AffectedProducts {
}

Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['title'] = this.title;
data['id'] = this.id;
final Map<String, dynamic> data = <String, dynamic>{};
data['title'] = title;
data['id'] = id;
return data;
}
}
Loading

0 comments on commit c44a356

Please sign in to comment.