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

Release/0.4.0 #38

Merged
merged 8 commits into from
Apr 9, 2024
Merged
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
9 changes: 8 additions & 1 deletion .github/workflows/beta_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ jobs:
git checkout -b release/${{ steps.semver.outputs.version }} develop
git push origin release/${{ steps.semver.outputs.version }}
- name: create a tag for the new version
run: |
git config --local user.email "ci-executor@github.com"
git config --local user.name "GitHub Action"
git tag -a ${{ steps.semver.outputs.version }} -m "Release ${{ steps.semver.outputs.version }}"
git push origin ${{ steps.semver.outputs.version }}
build-and-deploy-android:
needs: create-release-branch
environment: beta
Expand Down Expand Up @@ -104,7 +111,7 @@ jobs:
echo ${{ secrets.PLAYSTORE_SERVICE_ACCOUNT_BASE_64 }} | base64 --decode > android/playstore-service-account.json
shell: bash

- name: Deploy iOS Beta to TestFlight via Fastlane
- name: Deploy Android Beta to PlayStore via Fastlane
uses: maierj/fastlane-action@v1.4.0
with:
lane: beta
Expand Down
55 changes: 55 additions & 0 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -645,9 +645,14 @@ PODS:
- firebase_core
- Flutter
- nanopb (< 2.30910.0, >= 2.30908.0)
- Firebase/Analytics (10.18.0):
- Firebase/Core
- Firebase/Auth (10.18.0):
- Firebase/CoreOnly
- FirebaseAuth (~> 10.18.0)
- Firebase/Core (10.18.0):
- Firebase/CoreOnly
- FirebaseAnalytics (~> 10.18.0)
- Firebase/CoreOnly (10.18.0):
- FirebaseCore (= 10.18.0)
- Firebase/Crashlytics (10.18.0):
Expand All @@ -659,6 +664,10 @@ PODS:
- Firebase/Performance (10.18.0):
- Firebase/CoreOnly
- FirebasePerformance (~> 10.18.0)
- firebase_analytics (10.7.4):
- Firebase/Analytics (= 10.18.0)
- firebase_core
- Flutter
- firebase_auth (4.15.2):
- Firebase/Auth (= 10.18.0)
- firebase_core
Expand All @@ -676,6 +685,24 @@ PODS:
- Flutter
- FirebaseABTesting (10.19.0):
- FirebaseCore (~> 10.0)
- FirebaseAnalytics (10.18.0):
- FirebaseAnalytics/AdIdSupport (= 10.18.0)
- FirebaseCore (~> 10.0)
- FirebaseInstallations (~> 10.0)
- GoogleUtilities/AppDelegateSwizzler (~> 7.11)
- GoogleUtilities/MethodSwizzler (~> 7.11)
- GoogleUtilities/Network (~> 7.11)
- "GoogleUtilities/NSData+zlib (~> 7.11)"
- nanopb (< 2.30910.0, >= 2.30908.0)
- FirebaseAnalytics/AdIdSupport (10.18.0):
- FirebaseCore (~> 10.0)
- FirebaseInstallations (~> 10.0)
- GoogleAppMeasurement (= 10.18.0)
- GoogleUtilities/AppDelegateSwizzler (~> 7.11)
- GoogleUtilities/MethodSwizzler (~> 7.11)
- GoogleUtilities/Network (~> 7.11)
- "GoogleUtilities/NSData+zlib (~> 7.11)"
- nanopb (< 2.30910.0, >= 2.30908.0)
- FirebaseAppCheckInterop (10.19.0)
- FirebaseAuth (10.18.0):
- FirebaseAppCheckInterop (~> 10.17)
Expand Down Expand Up @@ -756,6 +783,26 @@ PODS:
- google_sign_in_ios (0.0.1):
- Flutter
- GoogleSignIn (~> 6.2)
- GoogleAppMeasurement (10.18.0):
- GoogleAppMeasurement/AdIdSupport (= 10.18.0)
- GoogleUtilities/AppDelegateSwizzler (~> 7.11)
- GoogleUtilities/MethodSwizzler (~> 7.11)
- GoogleUtilities/Network (~> 7.11)
- "GoogleUtilities/NSData+zlib (~> 7.11)"
- nanopb (< 2.30910.0, >= 2.30908.0)
- GoogleAppMeasurement/AdIdSupport (10.18.0):
- GoogleAppMeasurement/WithoutAdIdSupport (= 10.18.0)
- GoogleUtilities/AppDelegateSwizzler (~> 7.11)
- GoogleUtilities/MethodSwizzler (~> 7.11)
- GoogleUtilities/Network (~> 7.11)
- "GoogleUtilities/NSData+zlib (~> 7.11)"
- nanopb (< 2.30910.0, >= 2.30908.0)
- GoogleAppMeasurement/WithoutAdIdSupport (10.18.0):
- GoogleUtilities/AppDelegateSwizzler (~> 7.11)
- GoogleUtilities/MethodSwizzler (~> 7.11)
- GoogleUtilities/Network (~> 7.11)
- "GoogleUtilities/NSData+zlib (~> 7.11)"
- nanopb (< 2.30910.0, >= 2.30908.0)
- GoogleDataTransport (9.3.0):
- GoogleUtilities/Environment (~> 7.7)
- nanopb (< 2.30910.0, >= 2.30908.0)
Expand Down Expand Up @@ -872,6 +919,7 @@ PODS:

DEPENDENCIES:
- cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`)
- firebase_analytics (from `.symlinks/plugins/firebase_analytics/ios`)
- firebase_auth (from `.symlinks/plugins/firebase_auth/ios`)
- firebase_core (from `.symlinks/plugins/firebase_core/ios`)
- firebase_crashlytics (from `.symlinks/plugins/firebase_crashlytics/ios`)
Expand All @@ -891,6 +939,7 @@ SPEC REPOS:
- BoringSSL-GRPC
- Firebase
- FirebaseABTesting
- FirebaseAnalytics
- FirebaseAppCheckInterop
- FirebaseAuth
- FirebaseCore
Expand All @@ -904,6 +953,7 @@ SPEC REPOS:
- FirebaseRemoteConfig
- FirebaseSessions
- FirebaseSharedSwift
- GoogleAppMeasurement
- GoogleDataTransport
- GoogleSignIn
- GoogleUtilities
Expand All @@ -920,6 +970,8 @@ SPEC REPOS:
EXTERNAL SOURCES:
cloud_firestore:
:path: ".symlinks/plugins/cloud_firestore/ios"
firebase_analytics:
:path: ".symlinks/plugins/firebase_analytics/ios"
firebase_auth:
:path: ".symlinks/plugins/firebase_auth/ios"
firebase_core:
Expand Down Expand Up @@ -949,11 +1001,13 @@ SPEC CHECKSUMS:
BoringSSL-GRPC: 3175b25143e648463a56daeaaa499c6cb86dad33
cloud_firestore: d2707a9ead952efd2a89e82347e46dc4b9c32e8d
Firebase: 414ad272f8d02dfbf12662a9d43f4bba9bec2a06
firebase_analytics: 88c111412070acc2b05c1734151f58824f3db657
firebase_auth: 0099901926d85bda1688f6e451755b413c16154d
firebase_core: 0af4a2b24f62071f9bf283691c0ee41556dcb3f5
firebase_crashlytics: 55714f63ae0973c54b3a721c451ae5f815086c1f
firebase_performance: 2183122a3c7a650c80d8c164e9e28f13c4c62fc7
FirebaseABTesting: bfa3b384b68cee10a89183649c64cd7998a37a12
FirebaseAnalytics: 4d310b35c48eaa4a058ddc04bdca6bdb5dc0fe80
FirebaseAppCheckInterop: 37884781f3e16a1ba47e7ec80a1e805f987788e3
FirebaseAuth: 12314b438fa76048540c8fb86d6cfc9e08595176
FirebaseCore: 2322423314d92f946219c8791674d2f3345b598f
Expand All @@ -970,6 +1024,7 @@ SPEC CHECKSUMS:
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
geolocator_apple: cc556e6844d508c95df1e87e3ea6fa4e58c50401
google_sign_in_ios: 1256ff9d941db546373826966720b0c24804bcdd
GoogleAppMeasurement: 70ce9aa438cff1cfb31ea3e660bcc67734cb716e
GoogleDataTransport: 57c22343ab29bc686febbf7cbb13bad167c2d8fe
GoogleSignIn: 5651ce3a61e56ca864160e79b484cd9ed3f49b7a
GoogleUtilities: 0759d1a57ebb953965c2dfe0ba4c82e95ccc2e34
Expand Down
12 changes: 12 additions & 0 deletions lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:firebase_core/firebase_core.dart';
import 'package:firebase_crashlytics/firebase_crashlytics.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
Expand All @@ -8,13 +9,15 @@ import 'package:weatherjourney/firebase_options.dart';
import 'package:weatherjourney/src/app.dart';
import 'package:weatherjourney/src/features/authentication/application/services/apple_sign_in_available_service.dart';
import 'package:weatherjourney/src/localization/string_hardcoded.dart';
import 'package:firebase_analytics/firebase_analytics.dart';
import 'package:timezone/data/latest.dart' as tz;

Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp(
options: DefaultFirebaseOptions.currentPlatform,
);
FirebaseAnalytics analytics = FirebaseAnalytics.instance;
tz.initializeTimeZones();
// turn off the # in the URLs on the web
usePathUrlStrategy();
Expand All @@ -27,6 +30,15 @@ Future<void> main() async {
container.read(appleSignInAvailableServiceProvider);
//container.read(authRepositoryProvider).signOut();

FlutterError.onError = (errorDetails) {
FirebaseCrashlytics.instance.recordFlutterFatalError(errorDetails);
};
// Pass all uncaught asynchronous errors that aren't handled by the Flutter framework to Crashlytics
PlatformDispatcher.instance.onError = (error, stack) {
FirebaseCrashlytics.instance.recordError(error, stack, fatal: true);
return true;
};

runApp(
UncontrolledProviderScope(container: container, child: const MyApp()),
);
Expand Down
19 changes: 15 additions & 4 deletions lib/src/features/locations/presentation/widget/location_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -152,15 +152,26 @@ class LocationCard extends ConsumerWidget {
lastGeneration
.generatedImage!.uri,
fit: BoxFit.fitWidth,
errorBuilder: (context, error,
stackTrace) =>
Container(
decoration: BoxDecoration(
color: Theme.of(context)
.primaryColor,
borderRadius:
BorderRadius.circular(
12),
),
),
loadingBuilder:
(BuildContext context,
Widget child,
ImageChunkEvent?
loadingProgress) {
return (loadingProgress == null)
? child
: const ShimmerItemWidget();
}),
return (loadingProgress == null)
? child
: const ShimmerItemWidget();
}),
),
),
],
Expand Down
44 changes: 44 additions & 0 deletions lib/src/features/weather/presentation/widget/weather_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,50 @@ class WeatherWidget extends ConsumerWidget {
children: [
Image.network(
generation.generatedImage!.uri,
errorBuilder: (context, error, stackTrace) =>
Padding(
padding: const EdgeInsets.symmetric(
horizontal: 24, vertical: 12),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
"Error loading image try to regenerate it "),
const SizedBox(height: 20),
GestureDetector(
onTap: () {
ref
.read(locationControllerProvider
.notifier)
.generate(
locationId: location.id!,
weather:
weatherForLocation.value!,
);
},
child: Container(
padding: const EdgeInsets.symmetric(
horizontal: 24, vertical: 12),
decoration: BoxDecoration(
color: Theme.of(context)
.primaryColor,
borderRadius:
BorderRadius.circular(10),
),
child: const Center(
child: Text(
'Regenerate',
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
color: Colors.white,
),
),
)),
)
],
),
),
fit: BoxFit.fill,
),
Padding(
Expand Down
2 changes: 2 additions & 0 deletions macos/Flutter/GeneratedPluginRegistrant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import FlutterMacOS
import Foundation

import cloud_firestore
import firebase_analytics
import firebase_auth
import firebase_core
import firebase_crashlytics
Expand All @@ -16,6 +17,7 @@ import url_launcher_macos

func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
FLTFirebaseFirestorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseFirestorePlugin"))
FLTFirebaseAnalyticsPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseAnalyticsPlugin"))
FLTFirebaseAuthPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseAuthPlugin"))
FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin"))
FLTFirebaseCrashlyticsPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCrashlyticsPlugin"))
Expand Down
Loading
Loading