~repos /only-bible-app
git clone https://pyrossh.dev/repos/only-bible-app.git
The only bible app you will ever need. No ads. No in-app purchases. No distractions.
6c2a13f0
—
pyrossh 2 years ago
Add firebase performance
- android/app/build.gradle +2 -0
- android/app/google-services.json +2 -2
- android/build.gradle +2 -0
- ios/Podfile.lock +38 -0
- lib/{options.dart → firebase_options.dart} +1 -1
- lib/main.dart +1 -1
- lib/state.dart +15 -0
- pubspec.lock +24 -0
- pubspec.yaml +1 -1
android/app/build.gradle
CHANGED
|
@@ -24,6 +24,8 @@ if (flutterVersionName == null) {
|
|
|
24
24
|
apply plugin: 'com.android.application'
|
|
25
25
|
// START: FlutterFire Configuration
|
|
26
26
|
apply plugin: 'com.google.gms.google-services'
|
|
27
|
+
apply plugin: 'com.google.firebase.firebase-perf'
|
|
28
|
+
apply plugin: 'com.google.firebase.crashlytics'
|
|
27
29
|
// END: FlutterFire Configuration
|
|
28
30
|
apply plugin: 'kotlin-android'
|
|
29
31
|
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
android/app/google-services.json
CHANGED
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
"client_type": 3
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
|
-
"client_id": "584350822569-
|
|
34
|
+
"client_id": "584350822569-93bboqrirsb1q4mm697qm6ja58mnnakg.apps.googleusercontent.com",
|
|
35
35
|
"client_type": 2,
|
|
36
36
|
"ios_info": {
|
|
37
|
-
"bundle_id": "sh.pyros.
|
|
37
|
+
"bundle_id": "sh.pyros.onlyBibleApp"
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
]
|
android/build.gradle
CHANGED
|
@@ -9,6 +9,8 @@ buildscript {
|
|
|
9
9
|
classpath 'com.android.tools.build:gradle:7.3.0'
|
|
10
10
|
// START: FlutterFire Configuration
|
|
11
11
|
classpath 'com.google.gms:google-services:4.3.14'
|
|
12
|
+
classpath 'com.google.firebase:perf-plugin:1.4.1'
|
|
13
|
+
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.1'
|
|
12
14
|
// END: FlutterFire Configuration
|
|
13
15
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
14
16
|
}
|
ios/Podfile.lock
CHANGED
|
@@ -6,6 +6,9 @@ PODS:
|
|
|
6
6
|
- Firebase/Crashlytics (10.12.0):
|
|
7
7
|
- Firebase/CoreOnly
|
|
8
8
|
- FirebaseCrashlytics (~> 10.12.0)
|
|
9
|
+
- Firebase/Performance (10.12.0):
|
|
10
|
+
- Firebase/CoreOnly
|
|
11
|
+
- FirebasePerformance (~> 10.12.0)
|
|
9
12
|
- firebase_core (2.15.0):
|
|
10
13
|
- Firebase/CoreOnly (= 10.12.0)
|
|
11
14
|
- Flutter
|
|
@@ -13,6 +16,12 @@ PODS:
|
|
|
13
16
|
- Firebase/Crashlytics (= 10.12.0)
|
|
14
17
|
- firebase_core
|
|
15
18
|
- Flutter
|
|
19
|
+
- firebase_performance (0.9.2-4):
|
|
20
|
+
- Firebase/Performance (= 10.12.0)
|
|
21
|
+
- firebase_core
|
|
22
|
+
- Flutter
|
|
23
|
+
- FirebaseABTesting (10.13.0):
|
|
24
|
+
- FirebaseCore (~> 10.0)
|
|
16
25
|
- FirebaseCore (10.12.0):
|
|
17
26
|
- FirebaseCoreInternal (~> 10.0)
|
|
18
27
|
- GoogleUtilities/Environment (~> 7.8)
|
|
@@ -34,6 +43,22 @@ PODS:
|
|
|
34
43
|
- GoogleUtilities/Environment (~> 7.8)
|
|
35
44
|
- GoogleUtilities/UserDefaults (~> 7.8)
|
|
36
45
|
- PromisesObjC (~> 2.1)
|
|
46
|
+
- FirebasePerformance (10.12.0):
|
|
47
|
+
- FirebaseCore (~> 10.5)
|
|
48
|
+
- FirebaseInstallations (~> 10.0)
|
|
49
|
+
- FirebaseRemoteConfig (~> 10.0)
|
|
50
|
+
- FirebaseSessions (~> 10.5)
|
|
51
|
+
- GoogleDataTransport (~> 9.2)
|
|
52
|
+
- GoogleUtilities/Environment (~> 7.8)
|
|
53
|
+
- GoogleUtilities/ISASwizzler (~> 7.8)
|
|
54
|
+
- GoogleUtilities/MethodSwizzler (~> 7.8)
|
|
55
|
+
- nanopb (< 2.30910.0, >= 2.30908.0)
|
|
56
|
+
- FirebaseRemoteConfig (10.13.0):
|
|
57
|
+
- FirebaseABTesting (~> 10.0)
|
|
58
|
+
- FirebaseCore (~> 10.0)
|
|
59
|
+
- FirebaseInstallations (~> 10.0)
|
|
60
|
+
- GoogleUtilities/Environment (~> 7.8)
|
|
61
|
+
- "GoogleUtilities/NSData+zlib (~> 7.8)"
|
|
37
62
|
- FirebaseSessions (10.13.0):
|
|
38
63
|
- FirebaseCore (~> 10.5)
|
|
39
64
|
- FirebaseCoreExtension (~> 10.0)
|
|
@@ -51,8 +76,11 @@ PODS:
|
|
|
51
76
|
- PromisesObjC (< 3.0, >= 1.2)
|
|
52
77
|
- GoogleUtilities/Environment (7.11.5):
|
|
53
78
|
- PromisesObjC (< 3.0, >= 1.2)
|
|
79
|
+
- GoogleUtilities/ISASwizzler (7.11.5)
|
|
54
80
|
- GoogleUtilities/Logger (7.11.5):
|
|
55
81
|
- GoogleUtilities/Environment
|
|
82
|
+
- GoogleUtilities/MethodSwizzler (7.11.5):
|
|
83
|
+
- GoogleUtilities/Logger
|
|
56
84
|
- "GoogleUtilities/NSData+zlib (7.11.5)"
|
|
57
85
|
- GoogleUtilities/UserDefaults (7.11.5):
|
|
58
86
|
- GoogleUtilities/Logger
|
|
@@ -79,6 +107,7 @@ DEPENDENCIES:
|
|
|
79
107
|
- audio_session (from `.symlinks/plugins/audio_session/ios`)
|
|
80
108
|
- firebase_core (from `.symlinks/plugins/firebase_core/ios`)
|
|
81
109
|
- firebase_crashlytics (from `.symlinks/plugins/firebase_crashlytics/ios`)
|
|
110
|
+
- firebase_performance (from `.symlinks/plugins/firebase_performance/ios`)
|
|
82
111
|
- Flutter (from `Flutter`)
|
|
83
112
|
- flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`)
|
|
84
113
|
- integration_test (from `.symlinks/plugins/integration_test/ios`)
|
|
@@ -89,11 +118,14 @@ DEPENDENCIES:
|
|
|
89
118
|
SPEC REPOS:
|
|
90
119
|
trunk:
|
|
91
120
|
- Firebase
|
|
121
|
+
- FirebaseABTesting
|
|
92
122
|
- FirebaseCore
|
|
93
123
|
- FirebaseCoreExtension
|
|
94
124
|
- FirebaseCoreInternal
|
|
95
125
|
- FirebaseCrashlytics
|
|
96
126
|
- FirebaseInstallations
|
|
127
|
+
- FirebasePerformance
|
|
128
|
+
- FirebaseRemoteConfig
|
|
97
129
|
- FirebaseSessions
|
|
98
130
|
- GoogleDataTransport
|
|
99
131
|
- GoogleUtilities
|
|
@@ -108,6 +140,8 @@ EXTERNAL SOURCES:
|
|
|
108
140
|
:path: ".symlinks/plugins/firebase_core/ios"
|
|
109
141
|
firebase_crashlytics:
|
|
110
142
|
:path: ".symlinks/plugins/firebase_crashlytics/ios"
|
|
143
|
+
firebase_performance:
|
|
144
|
+
:path: ".symlinks/plugins/firebase_performance/ios"
|
|
111
145
|
Flutter:
|
|
112
146
|
:path: Flutter
|
|
113
147
|
flutter_native_splash:
|
|
@@ -126,11 +160,15 @@ SPEC CHECKSUMS:
|
|
|
126
160
|
Firebase: 07150e75d142fb9399f6777fa56a187b17f833a0
|
|
127
161
|
firebase_core: e477125798fc37cd4ab43ca6a8536bf7e0929c00
|
|
128
162
|
firebase_crashlytics: 6043ce85800f96e53f15ee5051f9cfad10cce73d
|
|
163
|
+
firebase_performance: 32e9164da8ae1cc69ee3edff231e2f020be9b6c2
|
|
164
|
+
FirebaseABTesting: 86ac5a4fc749088bb4d55a1cbfb2c4cb42c6d5de
|
|
129
165
|
FirebaseCore: f86a1394906b97ac445ae49c92552a9425831bed
|
|
130
166
|
FirebaseCoreExtension: ce60f9db46d83944cf444664d6d587474128eeca
|
|
131
167
|
FirebaseCoreInternal: b342e37cd4f5b4454ec34308f073420e7920858e
|
|
132
168
|
FirebaseCrashlytics: c4d111b7430c49744c74bcc6346ea00868661ac8
|
|
133
169
|
FirebaseInstallations: b28af1b9f997f1a799efe818c94695a3728c352f
|
|
170
|
+
FirebasePerformance: 1a63c51c9d14fc1190b0970d5aab96672cb0bce6
|
|
171
|
+
FirebaseRemoteConfig: 33e0dcf43899fbb4f8ef2d84200bf5f5e32eaf05
|
|
134
172
|
FirebaseSessions: 991fb4c20b3505eef125f7cbfa20a5b5b189c2a4
|
|
135
173
|
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
|
|
136
174
|
flutter_native_splash: 52501b97d1c0a5f898d687f1646226c1f93c56ef
|
lib/{options.dart → firebase_options.dart}
RENAMED
|
@@ -8,7 +8,7 @@ import 'package:flutter/foundation.dart'
|
|
|
8
8
|
///
|
|
9
9
|
/// Example:
|
|
10
10
|
/// ```dart
|
|
11
|
-
/// import '
|
|
11
|
+
/// import 'firebase_options.dart';
|
|
12
12
|
/// // ...
|
|
13
13
|
/// await Firebase.initializeApp(
|
|
14
14
|
/// options: DefaultFirebaseOptions.currentPlatform,
|
lib/main.dart
CHANGED
|
@@ -2,7 +2,7 @@ import "package:flutter/material.dart";
|
|
|
2
2
|
import "package:flutter/foundation.dart";
|
|
3
3
|
import "package:firebase_core/firebase_core.dart";
|
|
4
4
|
import "package:firebase_crashlytics/firebase_crashlytics.dart";
|
|
5
|
-
import "package:only_bible_app/
|
|
5
|
+
import "package:only_bible_app/firebase_options.dart";
|
|
6
6
|
import "package:flutter_native_splash/flutter_native_splash.dart";
|
|
7
7
|
import "package:only_bible_app/state.dart";
|
|
8
8
|
import "package:only_bible_app/app.dart";
|
lib/state.dart
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import "dart:convert";
|
|
2
2
|
import "dart:developer";
|
|
3
3
|
import "package:firebase_crashlytics/firebase_crashlytics.dart";
|
|
4
|
+
// import "package:firebase_performance/firebase_performance.dart";
|
|
4
5
|
import "package:flutter/foundation.dart" show defaultTargetPlatform, TargetPlatform;
|
|
5
6
|
import "package:flutter/services.dart";
|
|
6
7
|
import "package:flutter/material.dart";
|
|
@@ -50,7 +51,15 @@ class AppModel extends ChangeNotifier {
|
|
|
50
51
|
|
|
51
52
|
Future<Bible> loadBible(int id) async {
|
|
52
53
|
final selectedBible = bibles.firstWhere((it) => it.id == id);
|
|
54
|
+
// Trace customTrace;
|
|
55
|
+
// if (!isDesktop()) {
|
|
56
|
+
// customTrace = FirebasePerformance.instance.newTrace("loadBible");
|
|
57
|
+
// await customTrace.start();
|
|
58
|
+
// }
|
|
53
59
|
final books = await getBibleFromAsset(selectedBible.name);
|
|
60
|
+
// if (!isDesktop()) {
|
|
61
|
+
// await customTrace.stop();
|
|
62
|
+
// }
|
|
54
63
|
return Bible.withBooks(
|
|
55
64
|
id: selectedBible.id,
|
|
56
65
|
name: selectedBible.name,
|
|
@@ -233,6 +242,12 @@ class ChapterViewModel extends ChangeNotifier {
|
|
|
233
242
|
}
|
|
234
243
|
}
|
|
235
244
|
|
|
245
|
+
bool isDesktop() {
|
|
246
|
+
return defaultTargetPlatform == TargetPlatform.macOS ||
|
|
247
|
+
defaultTargetPlatform == TargetPlatform.windows ||
|
|
248
|
+
defaultTargetPlatform == TargetPlatform.linux;
|
|
249
|
+
}
|
|
250
|
+
|
|
236
251
|
bool isIOS() {
|
|
237
252
|
return defaultTargetPlatform == TargetPlatform.iOS;
|
|
238
253
|
}
|
pubspec.lock
CHANGED
|
@@ -289,6 +289,30 @@ packages:
|
|
|
289
289
|
url: "https://pub.dev"
|
|
290
290
|
source: hosted
|
|
291
291
|
version: "3.6.4"
|
|
292
|
+
firebase_performance:
|
|
293
|
+
dependency: "direct main"
|
|
294
|
+
description:
|
|
295
|
+
name: firebase_performance
|
|
296
|
+
sha256: "86272e47beded7128bc2b8285670e78387728b20bd668a3c433bcb682e963e8f"
|
|
297
|
+
url: "https://pub.dev"
|
|
298
|
+
source: hosted
|
|
299
|
+
version: "0.9.2+4"
|
|
300
|
+
firebase_performance_platform_interface:
|
|
301
|
+
dependency: transitive
|
|
302
|
+
description:
|
|
303
|
+
name: firebase_performance_platform_interface
|
|
304
|
+
sha256: a296dba20e508ab8b8d1f424015a361e2129228e0335d67230c8fdb446637d19
|
|
305
|
+
url: "https://pub.dev"
|
|
306
|
+
source: hosted
|
|
307
|
+
version: "0.1.4+4"
|
|
308
|
+
firebase_performance_web:
|
|
309
|
+
dependency: transitive
|
|
310
|
+
description:
|
|
311
|
+
name: firebase_performance_web
|
|
312
|
+
sha256: "8eae9e19fd067ca30b66ebf8ea0b47bd70a9fce66cbb288620418fe01d58e1af"
|
|
313
|
+
url: "https://pub.dev"
|
|
314
|
+
source: hosted
|
|
315
|
+
version: "0.1.4+4"
|
|
292
316
|
fixnum:
|
|
293
317
|
dependency: transitive
|
|
294
318
|
description:
|
pubspec.yaml
CHANGED
|
@@ -21,7 +21,7 @@ dependencies:
|
|
|
21
21
|
firebase_core: ^2.15.0
|
|
22
22
|
provider: ^6.0.5
|
|
23
23
|
firebase_crashlytics: ^3.3.4
|
|
24
|
-
|
|
24
|
+
firebase_performance: ^0.9.2+4
|
|
25
25
|
|
|
26
26
|
dev_dependencies:
|
|
27
27
|
flutter_test:
|