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

Use null-safe package for text highlighting. #281

Draft
wants to merge 64 commits into
base: null_safety
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
247af48
Prevent use of S.of(context) via automated review. (#225)
IoanaAlexandru Jul 16, 2021
25a8e01
Updated README.md, added a new contributor (#216)
AlexandraPavel Jul 16, 2021
b4811f3
Add Badea Dragos to contributors list (#226)
GhiaraD Jul 17, 2021
cc7a211
Add Alin Pahontu to Contributors List (#221)
alinpahontu2912 Jul 18, 2021
540e4e4
Stefan Popa - Update Contributors
StefanP-EQ Jul 18, 2021
43a88eb
Update README.md
stefanp0pa Jul 19, 2021
174c7ae
Revert pubspec.lock
StefanP-EQ Jul 19, 2021
73d1c69
Merge branch 'andreew/update_contributors' of github.com:AndreiPopa21…
StefanP-EQ Jul 19, 2021
c0c5dd6
Update pubspec.lock
stefanp0pa Jul 19, 2021
857f5c7
Update pubspec.lock
stefanp0pa Jul 19, 2021
d815af2
Sort people by last name. #trivial (#228)
IoanaAlexandru Jul 19, 2021
5730687
Add Andrei Mirica to contributors (#212)
AndreiMirica19 Jul 19, 2021
a4d2076
Merge branch 'master' into andreew/update_contributors
stefanp0pa Jul 20, 2021
198821a
Merge pull request #229 from AndreiPopa21/andreew/update_contributors
stefanp0pa Jul 20, 2021
43bc03d
Allow aii.pub.ro unsafe connections. #trivial (#227)
IoanaAlexandru Jul 22, 2021
7a8f870
UI improvements (#178)
IoanaAlexandru Jul 23, 2021
8c38b7c
Bump patch version for release.
IoanaAlexandru Jul 23, 2021
dd07aea
Update gradle to fix failing release.
IoanaAlexandru Jul 23, 2021
aca8e97
Fix GH release failing.
IoanaAlexandru Jul 23, 2021
5096601
Fix GH release failing (take #2).
IoanaAlexandru Jul 23, 2021
9e47db5
Fix some typos in CONTRIBUTING.md.
IoanaAlexandru Jul 23, 2021
18cfe59
Uncommented code, fixed warnings
bogpie Aug 17, 2021
216a0be
modified pubspec.yaml
bogpie Aug 18, 2021
1f073cf
Fixed compatibility issues
bogpie Aug 18, 2021
5b87de8
Fixed compatibility issues
bogpie Aug 18, 2021
111c0ab
Further migration to DateTime and DateTimeRange
bogpie Aug 19, 2021
d3f92de
Compatibility fixes
bogpie Aug 20, 2021
9257828
Compatibility fixes
bogpie Aug 20, 2021
1fe2097
Started to migrate to the new API of Timetable
bogpie Aug 20, 2021
865a3e0
Migrating timetable widget using new time and date controllers from t…
bogpie Aug 21, 2021
5df5f02
Compatibility fixes
bogpie Aug 22, 2021
ae96e6d
Temporary fix in order to solve errors regarding rrule package update
bogpie Aug 22, 2021
5c7fe50
Marked some comments so I can return to them later in order to solve …
bogpie Aug 22, 2021
2792e12
Copied bottom navigation bar implementation from master to help with …
bogpie Aug 22, 2021
d32a778
Updated event provider
bogpie Aug 22, 2021
d977ec4
Compatibility fixes
bogpie Aug 23, 2021
5269e7c
Started to supply recurrent and all-day events asynchronously via eve…
bogpie Aug 26, 2021
5a2ab61
Improved StreamBuilder, events can now be seen on timetable.
bogpie Aug 31, 2021
b2f0d0a
Commented code for testing
bogpie Aug 31, 2021
b92d7ed
Uncommented widgets code
bogpie Aug 31, 2021
48b200c
Fixed errors in displaying time when adding events under new API
bogpie Aug 31, 2021
bfd8779
Updated upcoming events card, updated date format, & minor fixes
bogpie Sep 1, 2021
916de89
Conversions to UTC time zone required by Timetable API
bogpie Sep 5, 2021
ae4791d
Functional event editing
bogpie Sep 6, 2021
7099654
Canceling time picker no longer creates null exception, renamed TimeO…
bogpie Sep 6, 2021
8531261
Animating to current time no longer zooms to show full day
bogpie Sep 6, 2021
59fbe56
Treated negative duration case when editing events
bogpie Sep 6, 2021
aee9050
Timetable page title (w/ current month for page) fix
bogpie Sep 6, 2021
63b829c
Fixed all-day event off-by one day display error.
bogpie Sep 7, 2021
9e55ed0
Decided to use a single utc-conversion function for consistency.
bogpie Sep 7, 2021
70788fc
Improved GCal events export w/ all-day events (holidays, mid-terms, ..)
bogpie Sep 8, 2021
f1e1503
Replaced DateTimeRange with DartDate Interval in order to be consiste…
bogpie Sep 8, 2021
129364c
Renamed functions for clarifications
bogpie Sep 12, 2021
a56a29c
Removed try-catch inside RemoteConfigService initialization for futur…
bogpie Sep 12, 2021
bc97ffb
Moved exporting of all-day events in google calendar to another branch
bogpie Sep 12, 2021
a92442e
Disabled feedback for web
bogpie Sep 14, 2021
0d6e750
Merge branch 'master' into null_safety_master
IoanaAlexandru Sep 19, 2021
6e8e6e8
Migrate to new flutter theme.
IoanaAlexandru Sep 19, 2021
7eac572
Fix imports.
IoanaAlexandru Sep 19, 2021
0a49bec
Fix showDialog type cannot be inferred.
IoanaAlexandru Sep 19, 2021
d1c7f1a
Fix errors about context being used in async gaps.
IoanaAlexandru Sep 19, 2021
93ce82a
Use SizedBox instead of Container.
IoanaAlexandru Sep 19, 2021
9b5df95
Highlight search on People page.
IoanaAlexandru Sep 19, 2021
b682574
Highlight search on FAQ page.
IoanaAlexandru Sep 19, 2021
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
13 changes: 13 additions & 0 deletions .github/linter/Dangerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,19 @@ flutter_lint.only_modified_files = true
flutter_lint.report_path = "flutter_analyze_report.txt"
flutter_lint.lint(inline_mode: true)

files = git.added_files + git.modified_files
files.each do |f|
diff = git.diff_for_file(f)
# Check for uses of S.of(context) or similar
if f =~ /.*\.dart/ and diff.patch =~ /^\+.*S\.of\(.+\)/m
File.readlines(f).each_with_index do |line, index|
if line =~ /S\.of\(.+\)/
warn("Use S.current instead of S.of(context)", file: f, line: index+1)
end
end
end
end

# Analyze documentation
textlint.config_file = '.github/linter/.textlintrc'
textlint.max_severity = "warn"
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,14 @@ jobs:
env:
ANDROID_KEYS_SECRET_PASSPHRASE: ${{ secrets.ANDROID_KEYS_SECRET_PASSPHRASE }}

- name: Build APK
# Apparently there's a known issue where there are some missing files if you don't build the debug/profile version first
# https://techshits.com/flutter-error-transforms-input-file-does-not-exist/
- name: Build debug APK
run: flutter build apk --debug
- name: Build profile APK
run: flutter build apk --profile

- name: Build release APK
run: flutter build apk --release

- name: Create a Release APK
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ auditore/fix_md_typo
torvalds/android_speedups
```
### Merging
When developing a new feature or working on a bug, your pull request will end up containing fixup commits (commits that change the same line of code repeatedly) or too fine-grained commits. An issue that can arise from this is that the main branch history will become poluted with unnecessary commits. To avoid it, we implement and enforce a squash policy.
When developing a new feature or working on a bug, your pull request will end up containing fix-up commits (commits that change the same line of code repeatedly) or too fine-grained commits. An issue that can arise from this is that the main branch history will become polluted with unnecessary commits. To avoid it, we implement and enforce a squash policy.
All commits that are merged into the main development branch have to be squashed ahead of the merge.
You can do so by pressing "squash and merge" in GitHub (_recommended_), or, alternetively, following the generic local squash routine outlined bellow:
You can do so by pressing "squash and merge" in GitHub (_recommended_), or, alternatively, following the generic local squash routine outlined bellow:
```
git checkout your_branch_name
git rebase -i HEAD~n
Expand Down Expand Up @@ -239,7 +239,7 @@ A user can define their own websites, that only they have access to. These will

Anyone can **create** a new user (a new document in this collection) _if the `permissionLevel` of the created user is 0, null or not set at all_.

Authenticated users can only **read**, **delete** and **update** their own document (including its subcollections) and no one else's. However, they cannot modify the `permissionLevel` field.
Authenticated users can only **read**, **delete** and **update** their own document (including its sub-collections) and no one else's. However, they cannot modify the `permissionLevel` field.

</details>

Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,12 @@ https://user-images.githubusercontent.com/25504811/120929790-1bc24080-c6f3-11eb-
* [Anghel Andrei](https://github.com/AnghelAndrei28)
* [Bogdan Piele](https://github.com/bogpie)
* [Bogdan Iuga](https://github.com/iugabogdan98)
* [Andrei Mirică](https://github.com/AndreiMirica19)
* [Andreea-Giorgiana Adăscăliței](https://github.com/AndreeaAdascalitei)
* [Ștefan-Alin Pahonțu](https://github.com/stafy2912)
* [Alexandra Pavel](https://github.com/AlexandraPavel)
* [Ștefan-Dragoș Badea](https://github.com/GhiaraD)
* [Ștefan-Andrei Popa](https://github.com/AndreiPopa21)

## Building from source with Android Studio

Expand Down
5 changes: 5 additions & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,10 @@
<meta-data
android:name="flutterEmbedding"
android:value="2" />

<!-- Allowing cleartext traffic is necessary because professor pictures from
aii.pub.ro are under http, not https. -->
<meta-data android:name="io.flutter.network-policy"
android:resource="@xml/network_security_config"/>
</application>
</manifest>
6 changes: 6 additions & 0 deletions android/app/src/main/res/xml/network_security_config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">aii.pub.ro</domain>
</domain-config>
</network-security-config>
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:4.1.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.3' // Google Services plugin
}
Expand Down
8 changes: 8 additions & 0 deletions android/fastlane/metadata/android/en-GB/changelogs/10019.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Improved
- Filtering UI and bottom navigation bar are now nicer⭐
- Teachers on the People page are now sorted by last name
- Did some internal ✨magic✨ to improve the app

Fixed
- Bug where some filter options would show as selected even though they were not
- Default filter options when adding a new event were sometimes empty
8 changes: 8 additions & 0 deletions android/fastlane/metadata/android/en-US/changelogs/10019.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Improved
- Filtering UI and bottom navigation bar are now nicer⭐
- Teachers on the People page are now sorted by last name
- Did some internal ✨magic✨ to improve the app

Fixed
- Bug where some filter options would show as selected even though they were not
- Default filter options when adding a new event were sometimes empty
8 changes: 8 additions & 0 deletions android/fastlane/metadata/android/ro/changelogs/10019.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Îmbunătățit
- Paginile de filtrare și bara de navigare arată mai frumos⭐
- Profesorii de pe pagina Persoane sunt acum sortați după numele de familie
- Puțină ✨magie✨ internă ca să îmbunătățim aplicația

Rezolvat
- Uneori apăreau selectate opțiuni din filtru fără să fi fost apăsate
- Opțiunile de filtru default uneori erau goale la adăugarea de evenimente
36 changes: 30 additions & 6 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,9 @@ PODS:
- Firebase/Firestore (6.33.0):
- Firebase/CoreOnly
- FirebaseFirestore (~> 1.18.0)
- Firebase/RemoteConfig (6.33.0):
- Firebase/CoreOnly
- FirebaseRemoteConfig (~> 4.9.0)
- Firebase/Storage (6.33.0):
- Firebase/CoreOnly
- FirebaseStorage (~> 3.9.0)
Expand All @@ -251,11 +254,18 @@ PODS:
- firebase_core (0.5.3):
- Firebase/CoreOnly (~> 6.33.0)
- Flutter
- firebase_remote_config (0.4.3):
- Firebase/CoreOnly (~> 6.33.0)
- Firebase/RemoteConfig (~> 6.33.0)
- firebase_core
- Flutter
- firebase_storage (5.2.0):
- Firebase/CoreOnly (~> 6.33.0)
- Firebase/Storage (~> 6.33.0)
- firebase_core
- Flutter
- FirebaseABTesting (4.2.0):
- FirebaseCore (~> 6.10)
- FirebaseAnalytics (6.8.3):
- FirebaseCore (~> 6.10)
- FirebaseInstallations (~> 1.6)
Expand Down Expand Up @@ -296,10 +306,18 @@ PODS:
- GoogleUtilities/Environment (~> 6.7)
- GoogleUtilities/UserDefaults (~> 6.7)
- PromisesObjC (~> 1.2)
- FirebaseRemoteConfig (4.9.1):
- FirebaseABTesting (~> 4.2)
- FirebaseCore (~> 6.10)
- FirebaseInstallations (~> 1.6)
- GoogleUtilities/Environment (~> 6.7)
- "GoogleUtilities/NSData+zlib (~> 6.7)"
- FirebaseStorage (3.9.1):
- FirebaseCore (~> 6.10)
- GTMSessionFetcher/Core (~> 1.1)
- Flutter (1.0.0)
- flutter_web_browser (0.13.1):
- Flutter
- FMDB (2.7.5):
- FMDB/standard (= 2.7.5)
- FMDB/standard (2.7.5)
Expand Down Expand Up @@ -363,8 +381,6 @@ PODS:
- nanopb/encode (= 1.30906.0)
- nanopb/decode (1.30906.0)
- nanopb/encode (1.30906.0)
- package_info (0.0.1):
- Flutter
- package_info_plus (0.4.5):
- Flutter
- path_provider (0.0.1):
Expand All @@ -383,10 +399,11 @@ DEPENDENCIES:
- 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_remote_config (from `.symlinks/plugins/firebase_remote_config/ios`)
- firebase_storage (from `.symlinks/plugins/firebase_storage/ios`)
- Flutter (from `Flutter`)
- flutter_web_browser (from `.symlinks/plugins/flutter_web_browser/ios`)
- image_picker (from `.symlinks/plugins/image_picker/ios`)
- package_info (from `.symlinks/plugins/package_info/ios`)
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
- path_provider (from `.symlinks/plugins/path_provider/ios`)
- shared_preferences (from `.symlinks/plugins/shared_preferences/ios`)
Expand All @@ -398,12 +415,14 @@ SPEC REPOS:
- abseil
- BoringSSL-GRPC
- Firebase
- FirebaseABTesting
- FirebaseAnalytics
- FirebaseAuth
- FirebaseCore
- FirebaseCoreDiagnostics
- FirebaseFirestore
- FirebaseInstallations
- FirebaseRemoteConfig
- FirebaseStorage
- FMDB
- GoogleAppMeasurement
Expand All @@ -425,14 +444,16 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/firebase_auth/ios"
firebase_core:
:path: ".symlinks/plugins/firebase_core/ios"
firebase_remote_config:
:path: ".symlinks/plugins/firebase_remote_config/ios"
firebase_storage:
:path: ".symlinks/plugins/firebase_storage/ios"
Flutter:
:path: Flutter
flutter_web_browser:
:path: ".symlinks/plugins/flutter_web_browser/ios"
image_picker:
:path: ".symlinks/plugins/image_picker/ios"
package_info:
:path: ".symlinks/plugins/package_info/ios"
package_info_plus:
:path: ".symlinks/plugins/package_info_plus/ios"
path_provider:
Expand All @@ -452,15 +473,19 @@ SPEC CHECKSUMS:
firebase_analytics: 9118044ffb98bee71d84733fc594f5134fe4bc1b
firebase_auth: d5159db3873478d1ac839af7b10d2f831516136a
firebase_core: 5d6a02f3d85acd5f8321c2d6d62877626a670659
firebase_remote_config: 259817aa1d7db2d84f01d1536b4f847dd2058e47
firebase_storage: a023e199edb807d8481c8aa722c8516f462ffab2
FirebaseABTesting: 8a9d8df3acc2b43f4a22014ddf9f601bca6af699
FirebaseAnalytics: 5dd088bd2e67bb9d13dbf792d1164ceaf3052193
FirebaseAuth: c92d49ada7948d1a23466e3db17bc4c2039dddc3
FirebaseCore: d889d9e12535b7f36ac8bfbf1713a0836a3012cd
FirebaseCoreDiagnostics: 770ac5958e1372ce67959ae4b4f31d8e127c3ac1
FirebaseFirestore: adff4877869ca91a11250cc0989a6cd56bad163f
FirebaseInstallations: 466c7b4d1f58fe16707693091da253726a731ed2
FirebaseRemoteConfig: 35a729305f254fb15a2e541d4b36f3a379da7fdc
FirebaseStorage: 15e0f15ef3c7fec3d1899d68623e47d4447066b4
Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
flutter_web_browser: cf735f704b5d72449e6ea1cb65a7da102aa9123a
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
GoogleAppMeasurement: 966e88df9d19c15715137bb2ddaf52373f111436
GoogleDataTransport: f56af7caa4ed338dc8e138a5d7c5973e66440833
Expand All @@ -471,7 +496,6 @@ SPEC CHECKSUMS:
image_picker: 9c3312491f862b28d21ecd8fdf0ee14e601b3f09
leveldb-library: 50c7b45cbd7bf543c81a468fe557a16ae3db8729
nanopb: 59317e09cf1f1a0af72f12af412d54edf52603fc
package_info: 873975fc26034f0b863a300ad47e7f1ac6c7ec62
package_info_plus: 6c92f08e1f853dc01228d6f553146438dafcd14e
path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c
PromisesObjC: b14b1c6b68e306650688599de8a45e49fae81151
Expand Down
4 changes: 2 additions & 2 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -261,12 +261,12 @@
"${BUILT_PRODUCTS_DIR}/GoogleUtilities/GoogleUtilities.framework",
"${BUILT_PRODUCTS_DIR}/PromisesObjC/FBLPromises.framework",
"${BUILT_PRODUCTS_DIR}/abseil/absl.framework",
"${BUILT_PRODUCTS_DIR}/flutter_web_browser/flutter_web_browser.framework",
"${BUILT_PRODUCTS_DIR}/gRPC-C++/grpcpp.framework",
"${BUILT_PRODUCTS_DIR}/gRPC-Core/grpc.framework",
"${BUILT_PRODUCTS_DIR}/image_picker/image_picker.framework",
"${BUILT_PRODUCTS_DIR}/leveldb-library/leveldb.framework",
"${BUILT_PRODUCTS_DIR}/nanopb/nanopb.framework",
"${BUILT_PRODUCTS_DIR}/package_info/package_info.framework",
"${BUILT_PRODUCTS_DIR}/package_info_plus/package_info_plus.framework",
"${BUILT_PRODUCTS_DIR}/path_provider/path_provider.framework",
"${BUILT_PRODUCTS_DIR}/shared_preferences/shared_preferences.framework",
Expand All @@ -282,12 +282,12 @@
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleUtilities.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FBLPromises.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/absl.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_web_browser.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/grpcpp.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/grpc.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/image_picker.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/leveldb.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/nanopb.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/package_info.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/package_info_plus.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/path_provider.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/shared_preferences.framework",
Expand Down
6 changes: 6 additions & 0 deletions ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,11 @@
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<!-- We need to allow HTTP because teacher photos on aii.pub.ro cannot be accessed through HTTPS. -->
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
</dict>
</plist>
22 changes: 10 additions & 12 deletions lib/authentication/view/edit_profile_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class _EditProfilePageState extends State<EditProfilePage> {
AppButton(
key: const ValueKey('change_password_button'),
text: S.current.actionChangePassword.toUpperCase(),
color: Theme.of(context).accentColor,
color: Theme.of(context).primaryColor,
width: 130,
onTap: () async {
if (changePasswordKey.currentState.validate()) {
Expand Down Expand Up @@ -204,7 +204,7 @@ class _EditProfilePageState extends State<EditProfilePage> {
AppButton(
key: const ValueKey('change_email_button'),
text: S.current.actionChangeEmail,
color: Theme.of(context).accentColor,
color: Theme.of(context).primaryColor,
width: 130,
onTap: () async {
final authProvider =
Expand Down Expand Up @@ -292,10 +292,10 @@ class _EditProfilePageState extends State<EditProfilePage> {
bool result = true;
if (isVerified == false &&
emailController.text + emailDomain != authProvider.email) {
await showDialog(
context: context,
builder: _changeEmailConfirmationDialog)
.then((value) => result = value ?? false);
await showDialog<bool>(
context: context,
builder: _changeEmailConfirmationDialog,
).then((value) => result = value ?? false);
}
if (uploadedImage != null) {
imageAsPNG = await convertToPNG(uploadedImage);
Expand All @@ -307,9 +307,7 @@ class _EditProfilePageState extends State<EditProfilePage> {
if (result) {
if (await authProvider.updateProfile(info)) {
AppToast.show(S.current.messageEditProfileSuccess);
if (!mounted) {
return;
}
if (!mounted) return;
Navigator.pop(context);
}
}
Expand All @@ -318,9 +316,9 @@ class _EditProfilePageState extends State<EditProfilePage> {
AppScaffoldAction(
icon: Icons.more_vert_outlined,
items: {
S.current.actionChangePassword: () =>
showDialog(context: context, builder: _changePasswordDialog),
S.current.actionDeleteAccount: () => showDialog(
S.current.actionChangePassword: () => showDialog<dynamic>(
context: context, builder: _changePasswordDialog),
S.current.actionDeleteAccount: () => showDialog<dynamic>(
context: context, builder: _deletionConfirmationDialog)
},
)
Expand Down
Loading