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

Menu tab #360

Open
wants to merge 23 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
ada75b8
Finishing half of the UI of the menu tab
AbedrahmanYassen Feb 7, 2023
1b02c31
Finishing the Menu screen as a UI.
AbedrahmanYassen Feb 9, 2023
a176209
Finishing the menu tab, and removing the settings screen.
AbedrahmanYassen Feb 12, 2023
c0fd484
Merge branch 'development' of https://github.com/CollActionteam/colla…
AbedrahmanYassen Feb 12, 2023
b77f84c
Solving the the inconsistencies.
AbedrahmanYassen Feb 14, 2023
7ddabec
Solving the the inconsistencies.
AbedrahmanYassen Feb 14, 2023
cf9b0b0
fix: add manual logging to auth repo
Xazin Mar 4, 2023
8d903e3
Deleting settings folder at the testing part
AbedrahmanYassen Mar 4, 2023
fa2d650
Deleting settings folder at the testing part
AbedrahmanYassen Mar 4, 2023
649893f
Merge pull request #371 from CollActionteam/fix/manual-logging-auth-repo
Xazin Mar 4, 2023
023d67e
chore: upgrade gradle build tools and dependencies
Xazin Mar 4, 2023
2aa649c
Finishing half of the UI of the menu tab
AbedrahmanYassen Feb 7, 2023
2814954
Finishing the Menu screen as a UI.
AbedrahmanYassen Feb 9, 2023
51705a2
Finishing the menu tab, and removing the settings screen.
AbedrahmanYassen Feb 12, 2023
6e8121f
Solving the the inconsistencies.
AbedrahmanYassen Feb 14, 2023
88a9f1b
Solving the the inconsistencies.
AbedrahmanYassen Feb 14, 2023
061f6e8
Deleting settings folder at the testing part
AbedrahmanYassen Mar 4, 2023
f727c0c
refactor: amend according to design, fix connecitivty, remove redunda…
Xazin Mar 16, 2023
1309fa0
Update lib/presentation/menu/menu_screen.dart
AbedrahmanYassen Apr 14, 2023
a74ca0b
Update lib/presentation/menu/menu_screen.dart
AbedrahmanYassen Apr 14, 2023
8b9fe77
Merge branch 'development' into menu_tab
AbedrahmanYassen Apr 14, 2023
0575f6a
I have added the .env.example and edited the _subTitle function into …
AbedrahmanYassen Apr 14, 2023
5012b82
I have added the .env.example and edited the _subTitle function into …
AbedrahmanYassen Apr 14, 2023
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
4 changes: 2 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ENV = development

# Full base URL including protocol (http or https), host and optionally the port and the base api path without trailing forward slash
BASE_API_ENDPOINT_URL =
BASE_STATIC_ENDPOINT_URL =
BASE_API_ENDPOINT_URL =
BASE_STATIC_ENDPOINT_URL =
17 changes: 6 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:

- name: Statically analyze the Dart code
run: |
echo "" | base64 -d > .env
echo ${{ github.ref == 'refs/heads/master' && secrets.ENV_PROD || secrets.ENV_DEV }} | base64 -d > .env
flutter analyze .

test:
Expand Down Expand Up @@ -96,7 +96,7 @@ jobs:

- name: Run tests and generate coverage
run: |
echo "" | base64 -d > .env
echo ${{ github.ref == 'refs/heads/master' && secrets.ENV_PROD || secrets.ENV_DEV }} | base64 -d > .env
flutter test --coverage -r expanded .

- name: Upload coverage to codecov
Expand All @@ -107,7 +107,6 @@ jobs:

build_android:
if: ${{ github.ref == 'refs/heads/development' || github.ref == 'refs/heads/master' }}
environment: ${{ github.ref == 'refs/heads/master' && 'production' || 'development' }}
needs: [analyze, test]
runs-on: macos-latest
timeout-minutes: 60
Expand Down Expand Up @@ -160,9 +159,9 @@ jobs:

- name: Build appbundle
env:
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }}
GOOGLE_SERVICES_JSON: ${{ github.ref == 'refs/heads/master' && secrets.ANDROID_GOOGLE_SERVICES_JSON || secrets.ANDROID_GOOGLE_SERVICES_JSON_DEV }}
run: |
echo ${{ secrets.ENV }} | base64 -d > .env
echo ${{ github.ref == 'refs/heads/master' && secrets.ENV_PROD || secrets.ENV_DEV }} | base64 -d > .env
echo $GOOGLE_SERVICES_JSON | base64 -d > android/app/google-services.json
flutter build appbundle --release --build-number $GITHUB_RUN_NUMBER --no-tree-shake-icons
cp release_notes.txt build/app/outputs/
Expand Down Expand Up @@ -190,7 +189,6 @@ jobs:

build_ios:
if: ${{ github.ref == 'refs/heads/development' || github.ref == 'refs/heads/master' }}
environment: ${{ github.ref == 'refs/heads/master' && 'production' || 'development' }}
needs: [analyze, test]
runs-on: macos-latest
timeout-minutes: 60
Expand Down Expand Up @@ -267,9 +265,8 @@ jobs:

- name: Build iOS app
env:
IOS_GOOGLESERVICE_INFO_PLIST: ${{ secrets.IOS_GOOGLESERVICE_INFO_PLIST }}
IOS_GOOGLESERVICE_INFO_PLIST: ${{ github.ref == 'refs/heads/master' && secrets.IOS_GOOGLESERVICE_INFO_PLIST || secrets.IOS_GOOGLESERVICE_INFO_PLIST_DEV }}
run: |
echo ${{ secrets.ENV }} | base64 -d > .env
echo $IOS_GOOGLESERVICE_INFO_PLIST | base64 --decode > ios/Runner/GoogleService-Info.plist
flutter build ipa --release --export-options-plist=ExportOptions.plist --build-number $GITHUB_RUN_NUMBER --no-tree-shake-icons
cp release_notes.txt build/ios/ipa/
Expand Down Expand Up @@ -327,15 +324,14 @@ jobs:

- name: Build web
run: |
echo ${{ secrets.ENV }} | base64 -d > .env
echo ${{ github.ref == 'refs/heads/master' && secrets.ENV_PROD || secrets.ENV_DEV }} | base64 -d > .env
flutter build web -t lib/widgetbook/app.widgetbook.dart

- name: Publish to Widgetbook
if: github.event_name != 'pull_request'
run: widgetbook publish --api-key $WIDGETBOOK_API_KEY

distribute_android:
environment: ${{ github.ref == 'refs/heads/master' && 'production' || 'development' }}
needs: [build_android]
runs-on: ubuntu-latest
steps:
Expand All @@ -354,7 +350,6 @@ jobs:
releaseNotesFile: release_notes.txt

distribute_ios:
environment: ${{ github.ref == 'refs/heads/master' && 'production' || 'development' }}
needs: [build_ios]
runs-on: macos-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ android {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "org.collaction.collaction_app"
minSdkVersion 21
targetSdkVersion 31
targetSdkVersion 30
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
Expand Down
3 changes: 1 addition & 2 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize"
android:exported="true">
android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
Expand Down
6 changes: 3 additions & 3 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:7.2.0'
classpath 'com.android.tools.build:gradle:4.2.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.15'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.4'
classpath 'com.google.gms:google-services:4.3.10'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.1'
}
}

Expand Down
3 changes: 2 additions & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#Fri Jun 23 08:50:38 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip
Binary file modified assets/fonts/icons/CollactionIcons.ttf
Binary file not shown.
14 changes: 0 additions & 14 deletions assets/fonts/icons/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -691,20 +691,6 @@
"search": [
"heart-sm"
]
},
{
"uid": "6555d0250a6170b636ae88f62a3bf3a4",
"css": "logo",
"code": 59491,
"src": "custom_icons",
"selected": true,
"svg": {
"path": "M42.8 785.8L419.3 998.5 417.2 777.7C416.8 734.2 393.3 694.3 355.6 672.8H355.6C317.6 651.1 270.9 651.5 233.2 673.7L42.8 785.8ZM867.6 783.9L493 1000 493.1 779.2C493.1 735.8 516.2 695.6 553.8 673.7H553.8C591.6 651.7 638.3 651.6 676.2 673.5L867.6 783.9ZM0.7 720.3L0 287.9 191.4 398C229 419.6 252.4 459.7 252.6 503.1H252.6C252.8 546.9 229.6 587.4 191.8 609.4L0.7 720.3ZM870.1 214.2L493.5 1.5 495.6 222.3C496 265.8 519.5 305.7 557.2 327.2H557.2C595.2 348.9 641.9 348.5 679.6 326.3L870.1 214.2ZM45.2 216.1L419.8 0 419.7 220.8C419.7 264.2 396.6 304.4 359 326.3H359C321.2 348.3 274.5 348.4 236.6 326.5L45.2 216.1Z",
"width": 870
},
"search": [
"logo"
]
}
]
}
Binary file removed assets/images/build_info.png
Binary file not shown.
Binary file added assets/images/collaction.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/images/logo.png
Binary file not shown.
Binary file removed assets/images/unauthenticated_bg.png
Binary file not shown.
87 changes: 34 additions & 53 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,59 +1,48 @@
PODS:
- country_codes (0.0.1):
- Flutter
- Firebase/Auth (10.6.0):
- Firebase/Auth (10.3.0):
- Firebase/CoreOnly
- FirebaseAuth (~> 10.6.0)
- Firebase/CoreOnly (10.6.0):
- FirebaseCore (= 10.6.0)
- Firebase/Crashlytics (10.6.0):
- FirebaseAuth (~> 10.3.0)
- Firebase/CoreOnly (10.3.0):
- FirebaseCore (= 10.3.0)
- Firebase/Crashlytics (10.3.0):
- Firebase/CoreOnly
- FirebaseCrashlytics (~> 10.6.0)
- FirebaseCrashlytics (~> 10.3.0)
- firebase_auth (4.2.2):
- Firebase/Auth (= 10.6.0)
- Firebase/Auth (= 10.3.0)
- firebase_core
- Flutter
- firebase_core (2.8.0):
- Firebase/CoreOnly (= 10.6.0)
- firebase_core (2.4.1):
- Firebase/CoreOnly (= 10.3.0)
- Flutter
- firebase_crashlytics (3.0.17):
- Firebase/Crashlytics (= 10.6.0)
- firebase_crashlytics (3.0.11):
- Firebase/Crashlytics (= 10.3.0)
- firebase_core
- Flutter
- FirebaseAuth (10.6.0):
- FirebaseAuth (10.3.0):
- FirebaseCore (~> 10.0)
- GoogleUtilities/AppDelegateSwizzler (~> 7.8)
- GoogleUtilities/Environment (~> 7.8)
- GTMSessionFetcher/Core (< 4.0, >= 2.1)
- FirebaseCore (10.6.0):
- FirebaseCore (10.3.0):
- FirebaseCoreInternal (~> 10.0)
- GoogleUtilities/Environment (~> 7.8)
- GoogleUtilities/Logger (~> 7.8)
- FirebaseCoreExtension (10.7.0):
- FirebaseCore (~> 10.0)
- FirebaseCoreInternal (10.7.0):
- FirebaseCoreInternal (10.5.0):
- "GoogleUtilities/NSData+zlib (~> 7.8)"
- FirebaseCrashlytics (10.6.0):
- FirebaseCore (~> 10.5)
- FirebaseCrashlytics (10.3.0):
- FirebaseCore (~> 10.0)
- FirebaseInstallations (~> 10.0)
- FirebaseSessions (~> 10.5)
- GoogleDataTransport (~> 9.2)
- GoogleUtilities/Environment (~> 7.8)
- nanopb (< 2.30910.0, >= 2.30908.0)
- PromisesObjC (~> 2.1)
- FirebaseInstallations (10.7.0):
- FirebaseInstallations (10.5.0):
- FirebaseCore (~> 10.0)
- GoogleUtilities/Environment (~> 7.8)
- GoogleUtilities/UserDefaults (~> 7.8)
- PromisesObjC (~> 2.1)
- FirebaseSessions (10.7.0):
- FirebaseCore (~> 10.5)
- FirebaseCoreExtension (~> 10.0)
- FirebaseInstallations (~> 10.0)
- GoogleDataTransport (~> 9.2)
- GoogleUtilities/Environment (~> 7.10)
- nanopb (< 2.30910.0, >= 2.30908.0)
- PromisesSwift (~> 2.1)
- Flutter (1.0.0)
- FMDB (2.7.5):
- FMDB/standard (= 2.7.5)
Expand Down Expand Up @@ -99,9 +88,7 @@ PODS:
- Flutter
- PhoneNumberKit/PhoneNumberKitCore (= 3.3.4)
- PhoneNumberKit/PhoneNumberKitCore (3.3.4)
- PromisesObjC (2.2.0)
- PromisesSwift (2.2.0):
- PromisesObjC (= 2.2.0)
- PromisesObjC (2.1.1)
- rive_common (0.0.1):
- Flutter
- share_plus (0.0.1):
Expand Down Expand Up @@ -141,19 +128,16 @@ SPEC REPOS:
- Firebase
- FirebaseAuth
- FirebaseCore
- FirebaseCoreExtension
- FirebaseCoreInternal
- FirebaseCrashlytics
- FirebaseInstallations
- FirebaseSessions
- FMDB
- GoogleDataTransport
- GoogleUtilities
- GTMSessionFetcher
- nanopb
- PhoneNumberKit
- PromisesObjC
- PromisesSwift
- TOCropViewController

EXTERNAL SOURCES:
Expand Down Expand Up @@ -192,38 +176,35 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
country_codes: b0900f46ad686281d5dab438e354e44ad10f5941
Firebase: f13680471b021937f2230ea8503c7809d8c29806
firebase_auth: 6458eb53a07d21569d335553ebd8c02ce11d345b
firebase_core: 58542d7399889ebdbb034baa72d081e54c5c814d
firebase_crashlytics: 5f6296621a0e8ed7d15a7499c8131fbdcf176e3b
FirebaseAuth: 743e5cd568af59d6d99a91ea9300843672515cf7
FirebaseCore: fa80ad16a62d52f67274b5b88304c3a318bbf9a4
FirebaseCoreExtension: f17247ba8c61e4d3c8d136b5e2de3cb4ac6a85b6
FirebaseCoreInternal: 8845798510aae74703467480f71ac613788d0696
FirebaseCrashlytics: ede07e7f433a0a2270112baf2d156b111cfb422d
FirebaseInstallations: 59c0e4c7a816a0f76710d83f77e5369b3e45eb96
FirebaseSessions: 34e5c084da010ef3802cbc062b822e513c9e6318
Firebase: f92fc551ead69c94168d36c2b26188263860acd9
firebase_auth: d1a0302ad8f1d642fc1cb53c43d25a951d70e190
firebase_core: bf59c32d2e53814f558efa20840c1902fa2fe461
firebase_crashlytics: b19405931669c882e0d08542e69ae9e86633c636
FirebaseAuth: 0e415d29d846c1dce2fb641e46f35e9888d9bec6
FirebaseCore: 988754646ab3bd4bdcb740f1bfe26b9f6c0d5f2a
FirebaseCoreInternal: e463f41bb935cd049505bf7e9a5bdd7dcea90df6
FirebaseCrashlytics: f20d956f8229010b645e534693c39e0b7843c268
FirebaseInstallations: 935bc4abb6f7a035cab7a0c31cb777b2be3dd254
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
GoogleDataTransport: ea169759df570f4e37bdee1623ec32a7e64e67c4
GoogleUtilities: c2bdc4cf2ce786c4d2e6b3bcfd599a25ca78f06f
GTMSessionFetcher: c9e714f7eec91a55641e2bab9f45fd83a219b882
image_cropper: 60c2789d1f1a78c873235d4319ca0c34a69f2d98
image_picker_ios: 4a8aadfbb6dc30ad5141a2ce3832af9214a705b5
image_picker_ios: b786a5dcf033a8336a657191401bfdf12017dabb
nanopb: b552cce312b6c8484180ef47159bc0f65a1f0431
package_info_plus: 6c92f08e1f853dc01228d6f553146438dafcd14e
path_provider_foundation: c68054786f1b4f3343858c1e1d0caaded73f0be9
path_provider_foundation: 37748e03f12783f9de2cb2c4eadfaa25fe6d4852
phone_number: ad6f917e4fd2e507a198b93dca5eadcb463ec8c2
PhoneNumberKit: 441e8b26ec88d598e3591de9061eff18f5dd12e8
PromisesObjC: 09985d6d70fbe7878040aa746d78236e6946d2ef
PromisesSwift: cf9eb58666a43bbe007302226e510b16c1e10959
rive_common: b5b1aa30c63b8f0f00f32cddc9ea394d3d3473b5
PromisesObjC: ab77feca74fa2823e7af4249b8326368e61014cb
rive_common: e35144d3b86972f8760b6c9f8b120dfd5fadfa13
share_plus: 056a1e8ac890df3e33cb503afffaf1e9b4fbae68
shared_preferences_foundation: 986fc17f3d3251412d18b0265f9c64113a8c2472
shared_preferences_foundation: 297b3ebca31b34ec92be11acd7fb0ba932c822ca
sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904
TOCropViewController: edfd4f25713d56905ad1e0b9f5be3fbe0f59c863
url_launcher_ios: 08a3dfac5fb39e8759aeb0abbd5d9480f30fc8b4
webview_flutter_wkwebview: 2e2d318f21a5e036e2c3f26171342e95908bd60a
url_launcher_ios: fb12c43172927bb5cf75aeebd073f883801f1993
webview_flutter_wkwebview: b7e70ef1ddded7e69c796c7390ee74180182971f

PODFILE CHECKSUM: f10c0438b63bc24e6bbc207956dc27d16c4408f2

Expand Down
17 changes: 2 additions & 15 deletions lib/application/auth/auth_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ import '../../domain/user/i_user_repository.dart';
import '../../domain/user/user.dart';

part 'auth_bloc.freezed.dart';

part 'auth_event.dart';

part 'auth_state.dart';

@injectable
Expand All @@ -26,7 +28,6 @@ class AuthBloc extends Bloc<AuthEvent, AuthState> {
String? _phone;
StreamSubscription<Either<AuthFailure, AuthSuccess>>?
_verifyStreamSubscription;
StreamSubscription? _authenticationStateSubscription;

AuthBloc(
this._authRepository,
Expand All @@ -35,7 +36,6 @@ class AuthBloc extends Bloc<AuthEvent, AuthState> {
on<AuthEvent>(
(event, emit) async {
await event.map(
initial: (event) async => await _mapObserveUserToState(emit, event),
verifyPhone: (event) async =>
await _mapVerifyPhoneToState(emit, event),
signInWithPhone: (event) async =>
Expand All @@ -53,18 +53,6 @@ class AuthBloc extends Bloc<AuthEvent, AuthState> {
);
}

Future<void> _mapObserveUserToState(
Emitter<AuthState> emit,
_InitialEvent event,
) async {
_authenticationStateSubscription =
_authRepository.observeUser().listen((event) {
if (event is User && event.isAnonymous) {
emit(const AuthState.unauthenticated());
}
});
}

FutureOr<void> _mapResendCodeToState(
Emitter<AuthState> emit,
_ResendCode event,
Expand Down Expand Up @@ -195,7 +183,6 @@ class AuthBloc extends Bloc<AuthEvent, AuthState> {
@override
Future<void> close() async {
_verifyStreamSubscription?.cancel();
_authenticationStateSubscription?.cancel();
super.close();
}
}
2 changes: 0 additions & 2 deletions lib/application/auth/auth_event.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ part of 'auth_bloc.dart';

@freezed
class AuthEvent with _$AuthEvent {
const factory AuthEvent.initial() = _InitialEvent;

const factory AuthEvent.verifyPhone(String phoneNumber) = _VerifyPhone;

const factory AuthEvent.updated(
Expand Down
4 changes: 2 additions & 2 deletions lib/application/participation/participation_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ class ParticipationBloc extends Bloc<ParticipationEvent, ParticipationState> {
checkIn: () {
// TODO: Implement once the backend has implemented it
},
toggleParticipation: (crowdActionId, commitments) async {
toggleParticipation: (crowdActionId, commitmentOptions) async {
emit(const ParticipationState.loading());

await participationRepository.toggleParticipation(
crowdActionId: crowdActionId,
commitments: commitments,
commitmentOptions: commitmentOptions,
);

add(
Expand Down
Loading