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

Migrate to Flutter 2. #195

Draft
wants to merge 25 commits into
base: master
Choose a base branch
from
Draft

Migrate to Flutter 2. #195

wants to merge 25 commits into from

Conversation

IoanaAlexandru
Copy link
Member

@IoanaAlexandru IoanaAlexandru commented Jun 6, 2021

We need to change some plugins we're using to counterparts that support null-safety. Some plugins we just remove entirely (❌).
Plugin migration checklist:

  • dynamic_text_highlighting > highlight_text substring_highlight
  • dynamic_theme > easy_dynamic_theme
  • interval_time_picker > time_range_picker duration_picker
  • positioned_tap_detector > positioned_tap_detector_2
  • preferences > pref
  • flutter_launcher_name > ❌
  • intl_translation > ❌

Additionally, some plugins' newest (null-safe) versions come with significant breaking changes that we need to address:

  • firebase_core
  • timetable
  • firebase_storage (now has web support)
  • image_picker (now has web support)

Note: The initial plan was to remove time_machine entirely, but it turned out to be more trouble than it seemed, so that effort is currently on hold and accessible via the remove_time_machine branch.

@acs-upb-mobile-bot
Copy link
Member

acs-upb-mobile-bot commented Jun 6, 2021

1 Error
🚫 The pubspec.yaml file was updated, but not the version.
8 Warnings
⚠️ Big PR
⚠️ CONTRIBUTING.md#L154 - /home/runner/work/acs-upb-mobile/acs-upb-mobile/lib/resources/storage is dead. (ENOENT: no such file or directory, access '/home/runner/work/acs-upb-mobile/acs-upb-mobile/lib/resources/storage')(no-dead-link)
⚠️ lib/pages/filter/view/relevance_picker.dart#L161 - Prefer final for parameter declarations if they are not reassigned
⚠️ lib/pages/settings/view/feedback_form.dart#L55 - Do not use BuildContexts across async gaps
⚠️ lib/resources/remote_config.dart#L10 - 'RemoteConfig' is deprecated and shouldn't be used. Use FirebaseRemoteConfig instead.
⚠️ lib/widgets/circle_image.dart#L6 - Prefer final for parameter declarations if they are not reassigned
⚠️ lib/widgets/circle_image.dart#L7 - Prefer final for parameter declarations if they are not reassigned
⚠️ lib/widgets/circle_image.dart#L8 - Prefer final for parameter declarations if they are not reassigned

For more info on versioning, check out our PR guidelines.

Generated by 🚫 Danger

I commented all the timetable stuff out for now since it's more complicated to migrate,
but the app seems to still work at first glance.
Make them look the same as they did before.
# Conflicts:
#	lib/main.dart
#	lib/pages/timetable/view/events/add_event_view.dart
#	lib/pages/timetable/view/events/event_view.dart
#	pubspec.lock
#	pubspec.yaml
# Conflicts:
#	lib/pages/class_feedback/service/feedback_provider.dart
#	lib/pages/classes/view/classes_page.dart
#	lib/pages/home/home_page.dart
Add camera touch controls.

It only works left-right for some reason, not sure why.
bogpie and others added 11 commits September 30, 2021 23:11
* Uncommented code, fixed warnings

* modified pubspec.yaml

* Fixed compatibility issues

Solved warnings
Updated related packages

* Fixed compatibility issues

Solved warnings
Updated related packages

* Further migration to DateTime and DateTimeRange

(in timetable's model classes)

* Compatibility fixes

* Compatibility fixes

* Started to migrate to the new API of Timetable

* Migrating timetable widget using new time and date controllers from timetable API

* Compatibility fixes

Improved migration to DateTime.

Improved migration to new timetable API

Renamed some instances of "duration" to "period" to avoid confusion, until further full migration to Duration & DateTimeRange.

* Temporary fix in order to solve errors regarding rrule package update

* Marked some comments so I can return to them later in order to solve associated issues.

* Copied bottom navigation bar implementation from master to help with debugging.

* Updated event provider

* Compatibility fixes

* Started to supply recurrent and all-day events asynchronously via eventProvider

* Improved StreamBuilder, events can now be seen on timetable.

Created event provider function (getEventsIntersecting), currently from already existing methods.

Made necessary conversions to UTC time zone.

* Commented code for testing

* Uncommented widgets code

* Fixed errors in displaying time when adding events under new API

Events are now preloaded including previous and next page (a page is a week).

Fixed minor warnings

* Updated upcoming events card, updated date format, & minor fixes

* Conversions to UTC time zone required by Timetable API

To be improved, since I believe I also convert already-UTC DateTimes.

* Functional event editing

* Canceling time picker no longer creates null exception, renamed TimeOfDay subtraction method

* Animating to current time no longer zooms to show full day

* Treated negative duration case when editing events

Fixed overflow on text from all-day events

Refactoring

* Timetable page title (w/ current month for page) fix

* Fixed all-day event off-by one day display error.

This is done by updating isUtc property for events without making hour conversions; those would shift the hour from midnight to ~9PM previous. day.

* Decided to use a single utc-conversion function for consistency.

However, it turned out that, while converting to Firebase Timestamp, I had to disable isUtc property to avoid an off-by-two-hours error (see toNonUtcForced() )

* Improved GCal events export w/ all-day events (holidays, mid-terms, ..)

* Replaced DateTimeRange with DartDate Interval in order to be consistent with the Timetable package

* Renamed functions for clarifications

* Removed try-catch inside RemoteConfigService initialization for future debugging

* Moved exporting of all-day events in google calendar to another branch

* Disabled feedback for web

- RemoteConfig is not supported on web

* Changed flutter version in yml files

* Clarified RemoteConfig initialization function

* Further improved migration to non-time_machine elements (#283)

Replaced time_machine's period with duration

Fixed an error when displaying a longer text

* Removed redundant code / comments

* Reformatted, removed redundant code

* Minor format changes

* Code reorganizing

* Code reorganizing

* Handled loading & error states, re-added no events dialog, reorganized code

* Added comment

* Reformatted, pub get

* Changed flutter version in yml files

* Changed flutter version in yml files

* Reformat

* Fixed warnings / flutter suggestions

* Reimplemented loading and error states behaviour

* Removed unnecessary toJSON parameters

* An event's day is now shown in one digit when necessary

(4 iulie instead of 04 iulie)

* use_build_context_synchronously warning fixed

* Next page is now successfully preloaded in timetable view

* clarified code

* Removed redundant code, clarified todos

* Commented tests

* Fixed unrefreshed events bug

* Clarifications

* Simplified no-event dialog code

* Reorganised code

* Format

* Disable failed tests

* Added disabled tests to a separate folder

* Added disabled tests to a separate folder

* Removed unused import
* Prevent use of S.of(context) via automated review. (#225)

* Prevent use of S.of(context).

* Add test code.

* Fix dangerfile.

* Check only dart files.

* Revert "Add test code."

This reverts commit bd975da

* Move remote_config import back

* Updated README.md, added a new contributor (#216)

* Add Badea Dragos to contributors list (#226)

* Add Alin Pahontu to Contributors List (#221)

* Added myself to contributers

* Added myself to contributers

* Added myself to contributers

* Added myself to contributers

* Added myself to contributers

* Added myself to contributers(+ Ș/ț)

Co-authored-by: stafy2912 <[email protected]>

* Stefan Popa - Update Contributors

* Update README.md

* Revert pubspec.lock

* Update pubspec.lock

* Update pubspec.lock

* Sort people by last name. #trivial (#228)

* Sort people by last name.

* Bump build number.

Co-authored-by: Andrei-Constantin Mirciu <[email protected]>

* Add Andrei Mirica to contributors (#212)

* update_contributors

* Update pubspec.lock

* Update README.md

* Allow aii.pub.ro unsafe connections. #trivial (#227)

* Allow unsafe traffic from aii.pub.ro.

* Only allow HTTP fo aii.pub.ro.

* Fix some whitespace.

* Bump version.

* Allow HTTP on iOS as well.

* Indent Info.plist using tabs.

* Missed a tab.

* UI improvements (#178)

* Remove bottom blue line in tab bar.

* Change SelectableFormField to use Chips.

* Improve Chip theme.

* Make dividers more consistent.

Couldn't find the exact setting but this looks decent.

* Add custom theme for dark mode.

* First attempt at fixing relevance picker.

* Fix logic for relevance picker.

* Select "Anyone" when no custom node is selected.

* Call relevancePicker.onChanged whenever it changes.

* Disable public filter options if user doesn't have permission.

* Fix ChoiceChip theme.

* Make RelevancePicker a FormField everywhere.

* Reuse ChipFormField in RelevanceFormField.

* Move filterIconColor to resources/theme.dart.

* Remove some duplicate code.

* Remove S.of(context).

* Fix default relevance in picker.

* Use chips on filter page.

This also fixes #5.

* Use chips in FAQ page.

* Fix tests.

* Make flutter version in workflows more specific.

Workflows now fail on GH but work locally, so I think it's because the
1.24.x version somehow gets matched to 2.3.0-24.1.pre-beta instead of
1.24.0-10.2.pre.

* Revert workflow changes.

No longer seems to be necessary and the previous version didn't work well anyway.

* Prep for release.

* Bump version and update changelog.

* Add comma for formatting.

Co-authored-by: Andrei-Constantin Mirciu <[email protected]>

* Bump patch version for release.

* Update gradle to fix failing release.

https://stackoverflow.com/questions/68255521/could-not-get-https-google-bintray-com-maven-metadata-xml-received-stat

* Fix GH release failing.

* Fix GH release failing (take #2).

* Fix some typos in CONTRIBUTING.md.

* Update documentation about GitHub Actions. (#232)

* Update documentation about GitHub Actions.

* Remove extra backtick.

* Remove duplicate "the".

* Add more info about tags.

* Add prompt to not ask the bot for review.

* Make missing pubspec.yaml version update a failure instead of a warning.

* Check that there's a space between // or /// and the actual comment (#236)

* Check space after comment slashes.

* Add test case for linter.

* s/elif/elsif

Ruby iz hard

* Add EOF test case.

* Fix regex for regular comments.

* Make the example build.

* Check for spaces before comment, and more than 3 slashes.

* Add more test cases.

* Fix syntax error.

* Check for block comments.

* Add test case for block comments.

* Remove check for space before comment as that's handled by the formatter.

* Update comment.

* Remove test cases.

* Fix comment linter complaining about URLs.

* If the phone is in dark mode,the splash screen will be in dark mode. (#238)

* If the phone is in dark mode,the splash screen will be in dark mode.

* Update pubspec.yaml

Co-authored-by: Ioana Alexandru <[email protected]>

* Image is cropped if it doesn't fit. (#239)

* Image is cropped if it doesn't fit.
Smartphone:
Device:One Plus 9 Pro
Os:Android 11

* Image is cropped if it doesn't fit.
Smartphone:
Device:One Plus 9 Pro
Os:Android 11

* Image is cropped if it doesn't fit.
Smartphone:
Device:One Plus 9 Pro
Os:Android 11

* Image is cropped if it doesn't fit.
Smartphone:
Device:One Plus 9 Pro
Os:Android 11

* Uploaded the website icon in add/edit mode. (#233)

* Uploaded the website icon in add/edit mode. Also, added the necessary label for text (labelUploadWebsiteIcon) and moved convertToPNG to Utils class

* added ',' to intl_en and intl_ro

* changed the line 220 with the correct form of formIconColor

* deleted the empty lines and used the full path of user.dart(line 4)

* changed in intl_en.arb

* changed WebsiteIcon (from website_view)

* changed the name to oldImage, used the if short and ??

* initialized oldImage ()\otherwise error in tests

* changed the initialization of imageWidget

* Use an actual text field instead of imitating it.

It has text input behaviour disabled.

* Show file name in image picker field.

* Remove commented code.

* Add a clear button for the image field.

* changed labelUploadWebsiteIcon to labelWebsiteIcon

* space after // and explained what image in WebsiteIcon stands for

* explained what image in WebsiteIcon stands for and incremented build number in pubspec

* added iconPath in Website and used it accordingly

* created a path for public and private icon websites

* delete website icon from storage when website is deleted

* changed the string for labelWebsiteIcon, both in ro and en, and changed the attributes and methos in Statet from private in public

* changed the requirement of iconPath

* deleted the converttoPNG from edit_profile_page.dart

* updated the converttoPNG method

* changed the variable iconPath to a getter

* formatting

Co-authored-by: Ioana Alexandru <[email protected]>

* Toast overlapped bug (#246)

* Deleted the edit profile succesfully toast.

* Deleted the edit profile succesfully toast.

* Deploy security rules from repo (#248)

* Set up firebase CLI with firestore indexes & rules.

* Add firestore deployment step.

* Update functions.

* Set up storage rules.

* Update documentation.

* Use "bash"  for command blocks instead of "cli".

* Use bash syntax highlighting for the other command block in the file as well.

* Replace "as close to possible" with "as close as possible".

* There's actually no command to fetch the current rules.

* Uncommented code, fixed warnings

* Updated merging rules. (#251)

* modified pubspec.yaml

* Fixed compatibility issues

Solved warnings
Updated related packages

* Fixed compatibility issues

Solved warnings
Updated related packages

* Further migration to DateTime and DateTimeRange

(in timetable's model classes)

* Compatibility fixes

* Compatibility fixes

* Started to migrate to the new API of Timetable

* Migrating timetable widget using new time and date controllers from timetable API

* Compatibility fixes

Improved migration to DateTime.

Improved migration to new timetable API

Renamed some instances of "duration" to "period" to avoid confusion, until further full migration to Duration & DateTimeRange.

* Temporary fix in order to solve errors regarding rrule package update

* Marked some comments so I can return to them later in order to solve associated issues.

* Copied bottom navigation bar implementation from master to help with debugging.

* Updated event provider

* Improve linter documentation.

* Change order of Dangerfile checks.

* Don't require pubspec/changelog changes if the base branch isn't master. (#261)

* Don't require pubspec/changelog changes if the base branch isn't master.

* Test code.

* Fix typo in Dangerfile.

* Revert "Test code."

This reverts commit 56cd8cd

* Fix linter failing. (#263)

* Fix linter failing.

* Test linter.

* Remove comment altogether.

* Revert "Test linter."

This reverts commit e0ba776.

* Update CONTRIBUTING.md with Flutter Inspector not working in web (#242)

* Update CONTRIBUTING.md

* Update CONTRIBUTING.md after review

Co-authored-by: Ioana Alexandru <[email protected]>

Co-authored-by: Ioana Alexandru <[email protected]>

* Compatibility fixes

* Started to supply recurrent and all-day events asynchronously via eventProvider

* Updated 'Go to today' button in timetable (#241)

* Added new functionality to 'go to today' button, so that when the timetable is already showing the current week, if the button is pressed, a snackbar will appear telling the user he's already seeing the current week.

* updatet pubspec.yaml

* fixed coding style

* replaced the snackbar with AppToast.show and added language-specific strings for the message

* updated version number

Co-authored-by: stafy2912 <[email protected]>
Co-authored-by: Ioana Alexandru <[email protected]>

* Improved StreamBuilder, events can now be seen on timetable.

Created event provider function (getEventsIntersecting), currently from already existing methods.

Made necessary conversions to UTC time zone.

* Commented code for testing

* Uncommented widgets code

* Fixed errors in displaying time when adding events under new API

Events are now preloaded including previous and next page (a page is a week).

Fixed minor warnings

* Updated upcoming events card, updated date format, & minor fixes

* Change text for password change error (#268)

* Change text for password change error

* Conversions to UTC time zone required by Timetable API

To be improved, since I believe I also convert already-UTC DateTimes.

* Functional event editing

* Canceling time picker no longer creates null exception, renamed TimeOfDay subtraction method

* Animating to current time no longer zooms to show full day

* Treated negative duration case when editing events

Fixed overflow on text from all-day events

Refactoring

* Timetable page title (w/ current month for page) fix

* Fixed all-day event off-by one day display error.

This is done by updating isUtc property for events without making hour conversions; those would shift the hour from midnight to ~9PM previous. day.

* Decided to use a single utc-conversion function for consistency.

However, it turned out that, while converting to Firebase Timestamp, I had to disable isUtc property to avoid an off-by-two-hours error (see toNonUtcForced() )

* Improved GCal events export w/ all-day events (holidays, mid-terms, ..)

* Replaced DateTimeRange with DartDate Interval in order to be consistent with the Timetable package

* Renamed functions for clarifications

* Removed try-catch inside RemoteConfigService initialization for future debugging

* Moved exporting of all-day events in google calendar to another branch

* Disabled feedback for web

- RemoteConfig is not supported on web

* Change message from toast to widget (#270)

* Changed message from toast to widget

* Updated version number

* Make the code cleaner

* Fix 'Something went wrong' exceptions from ClassView #trivial (#277)

* Fix exception when snap.data()['classesFeedback'][className] is null

* Fix exception when lecture event does not contain 'teacher' field

* Bump build number

* Bump version

* Change Password Issue (#264)

* first commit

* Update pubspec.yaml

* Update pubspec.yaml

* Resolved problem with profile photo deleting in Cloud Storage when a user deletes his account (#243)

* Resolved problem with photo profile deleting when a user deletes his account

* Updated the app version in pubspec.yaml, and the coding style

* Updated the app version in pubspec.yaml

* Resolved requested changes for profile picture deleting when deleting an account

* Resolved requested changes for profile picture deleting when deleting an account

* Updated the coding style

* Updated the coding style

* Updated the coding style

* Updated the coding style

* Updated the coding style

* Updated the coding style

* Use a textfield-like widget for edit_profile (#240)

* created a widget and used it in website_view.dart

* changed the controller

* changed the controller v.2 and added it to website_view.dart

* Fix image not updating.

* deleted unnecessary lines

* updated the version

* implemented the widget in edit profile

* fixed the image bug and changed the widget

* deleted a line

* removed profile picture title (colored in blue)

* removed profile picture title (colored in blue)

* used uploadButtonController instead of uploadButton, changed the imageFieldController(now, initialized in uploadButton), removed unnecessary comments

* changed the initialization of uploadButtonController

* updated the version

Co-authored-by: Ioana Alexandru <[email protected]>

* Start to implement a basic search page (#179)

* Start to implement a basic search page

* Try to display searched people

* Implement basic people search

* Finish basic people search implementation & Implement classes search UI

* Add basic classes search

* Implement classes search - almost ready

* Finish classes search

* Classes search updates

* Delete unused imports or methods

* Show all results for classes search

* Reformat code

* Add image for chatbot intro

* Reformat code

* Adjust chatbot image

* merge master into add_search

* Change chatbot image

* Code logic improvements

* Make code more modular

* add remoteConfig for chatbot

* reformat code

* reformat code

* Edit background for classes's circle

* Edit background for classes's circle

* add remote config for chatbot page

* delete commented code

* ChatBot -> Chatbot

* reformat code

* update version

* reformat code

* edit remote config configuration

* Increment version

* Add  comment for remote config web

* Increment version

* Add debug config for web version (#276)

* Add debug config for web version
Update CONTRIBUTING.md with info about debug config on web

* Update CONTRIBUTING.md

Co-authored-by: Ioana Alexandru <[email protected]>

* Update CONTRIBUTING.md

* Remove duplicated data

* Update readme with web debug config

Co-authored-by: Ioana Alexandru <[email protected]>

* Admin panel (#235)

* UI for page where admins can see permission requests

* accept/deny request buttons

* change how data is extracted from firebase
* add revert button functionality

* add unprocessed filter

* add accepted/denied on processed requests

* order requests by date, change the place date appears on card

* resolve PR change requests

* reduce logic at ui level
* add 'accepted' and 'processedBy' fields for requests
* refactor and format some code for more clarity

* change version and add changelog

* Change UI for cards

* change date place to bottom left corner
* change 'deny' botton colors
* add test for admin page
* reload only one card instead of all

* Sort requests descending by date

* sort request descending by date
* update pubspec.yaml

* Update integration test

* update admin panel integration test
* resolve warnings

* Format code

* Fix integration test

* delete unnecessary mocks
* fix Admin Page test

* Merge changes from master

* Set up firebase CLI with firestore indexes & rules.

* Add firestore deployment step.

* Update functions.

* Set up storage rules.

* Update documentation.

* Use "bash"  for command blocks instead of "cli".

* Use bash syntax highlighting for the other command block in the file as well.

* Replace "as close to possible" with "as close as possible".

* Fix change requests

* add test for Admin Panel button
* fix typos
* reduce duplicated code

* Update firebase rules and indexes

* Update version

* Write changelogs and modify version

* Modify changelogs

* Modify changelogs

* Modify changelogs

Co-authored-by: Ioana Alexandru <[email protected]>

* Fix Firebase deployment failing.

* Modify changelogs (#293)

* Fix functions deployment failing (take #2).

* Remove npm build command.

(It's probably only useful if we were using TypeScript)

* Remove trailing comma in firebase.json.

* Write serviceAccountKey.json from secrets.

* Separate functions deployment from rules.

We need to deploy the rules ASAP, the functions can wait.
I also updated the packages just in case functions deployment
works this time, but at least rules deployment will work (I hope...).

* Fix some issues.

* Fix formatting.

Co-authored-by: AlexandraPavel <[email protected]>
Co-authored-by: Badea Dragos <[email protected]>
Co-authored-by: stafy2912 <[email protected]>
Co-authored-by: stafy2912 <[email protected]>
Co-authored-by: StefanP-EQ <[email protected]>
Co-authored-by: Stefan Popa <[email protected]>
Co-authored-by: Andrei-Constantin Mirciu <[email protected]>
Co-authored-by: AndreiMirica <[email protected]>
Co-authored-by: AndreeaAdascalitei <[email protected]>
Co-authored-by: Bogdan Piele <[email protected]>
Co-authored-by: Vlad Tiftilov <[email protected]>
Co-authored-by: Pahontu Stefan-Alin <[email protected]>
Co-authored-by: Barbulescu Robert-Gabriel <[email protected]>
Co-authored-by: Silviu-Gabriel Gavriluta <[email protected]>
* Prevent use of S.of(context) via automated review. (#225)

* Prevent use of S.of(context).

* Add test code.

* Fix dangerfile.

* Check only dart files.

* Revert "Add test code."

This reverts commit bd975da

* Move remote_config import back

* Updated README.md, added a new contributor (#216)

* Add Badea Dragos to contributors list (#226)

* Add Alin Pahontu to Contributors List (#221)

* Added myself to contributers

* Added myself to contributers

* Added myself to contributers

* Added myself to contributers

* Added myself to contributers

* Added myself to contributers(+ Ș/ț)

Co-authored-by: stafy2912 <[email protected]>

* Stefan Popa - Update Contributors

* Update README.md

* Revert pubspec.lock

* Update pubspec.lock

* Update pubspec.lock

* Sort people by last name. #trivial (#228)

* Sort people by last name.

* Bump build number.

Co-authored-by: Andrei-Constantin Mirciu <[email protected]>

* Add Andrei Mirica to contributors (#212)

* update_contributors

* Update pubspec.lock

* Update README.md

* Allow aii.pub.ro unsafe connections. #trivial (#227)

* Allow unsafe traffic from aii.pub.ro.

* Only allow HTTP fo aii.pub.ro.

* Fix some whitespace.

* Bump version.

* Allow HTTP on iOS as well.

* Indent Info.plist using tabs.

* Missed a tab.

* UI improvements (#178)

* Remove bottom blue line in tab bar.

* Change SelectableFormField to use Chips.

* Improve Chip theme.

* Make dividers more consistent.

Couldn't find the exact setting but this looks decent.

* Add custom theme for dark mode.

* First attempt at fixing relevance picker.

* Fix logic for relevance picker.

* Select "Anyone" when no custom node is selected.

* Call relevancePicker.onChanged whenever it changes.

* Disable public filter options if user doesn't have permission.

* Fix ChoiceChip theme.

* Make RelevancePicker a FormField everywhere.

* Reuse ChipFormField in RelevanceFormField.

* Move filterIconColor to resources/theme.dart.

* Remove some duplicate code.

* Remove S.of(context).

* Fix default relevance in picker.

* Use chips on filter page.

This also fixes #5.

* Use chips in FAQ page.

* Fix tests.

* Make flutter version in workflows more specific.

Workflows now fail on GH but work locally, so I think it's because the
1.24.x version somehow gets matched to 2.3.0-24.1.pre-beta instead of
1.24.0-10.2.pre.

* Revert workflow changes.

No longer seems to be necessary and the previous version didn't work well anyway.

* Prep for release.

* Bump version and update changelog.

* Add comma for formatting.

Co-authored-by: Andrei-Constantin Mirciu <[email protected]>

* Bump patch version for release.

* Update gradle to fix failing release.

https://stackoverflow.com/questions/68255521/could-not-get-https-google-bintray-com-maven-metadata-xml-received-stat

* Fix GH release failing.

* Fix GH release failing (take #2).

* Fix some typos in CONTRIBUTING.md.

* Uncommented code, fixed warnings

* modified pubspec.yaml

* Fixed compatibility issues

Solved warnings
Updated related packages

* Fixed compatibility issues

Solved warnings
Updated related packages

* Further migration to DateTime and DateTimeRange

(in timetable's model classes)

* Compatibility fixes

* Compatibility fixes

* Started to migrate to the new API of Timetable

* Migrating timetable widget using new time and date controllers from timetable API

* Compatibility fixes

Improved migration to DateTime.

Improved migration to new timetable API

Renamed some instances of "duration" to "period" to avoid confusion, until further full migration to Duration & DateTimeRange.

* Temporary fix in order to solve errors regarding rrule package update

* Marked some comments so I can return to them later in order to solve associated issues.

* Copied bottom navigation bar implementation from master to help with debugging.

* Updated event provider

* Compatibility fixes

* Started to supply recurrent and all-day events asynchronously via eventProvider

* Improved StreamBuilder, events can now be seen on timetable.

Created event provider function (getEventsIntersecting), currently from already existing methods.

Made necessary conversions to UTC time zone.

* Commented code for testing

* Uncommented widgets code

* Fixed errors in displaying time when adding events under new API

Events are now preloaded including previous and next page (a page is a week).

Fixed minor warnings

* Updated upcoming events card, updated date format, & minor fixes

* Conversions to UTC time zone required by Timetable API

To be improved, since I believe I also convert already-UTC DateTimes.

* Functional event editing

* Canceling time picker no longer creates null exception, renamed TimeOfDay subtraction method

* Animating to current time no longer zooms to show full day

* Treated negative duration case when editing events

Fixed overflow on text from all-day events

Refactoring

* Timetable page title (w/ current month for page) fix

* Fixed all-day event off-by one day display error.

This is done by updating isUtc property for events without making hour conversions; those would shift the hour from midnight to ~9PM previous. day.

* Decided to use a single utc-conversion function for consistency.

However, it turned out that, while converting to Firebase Timestamp, I had to disable isUtc property to avoid an off-by-two-hours error (see toNonUtcForced() )

* Improved GCal events export w/ all-day events (holidays, mid-terms, ..)

* Replaced DateTimeRange with DartDate Interval in order to be consistent with the Timetable package

* Renamed functions for clarifications

* Removed try-catch inside RemoteConfigService initialization for future debugging

* Moved exporting of all-day events in google calendar to another branch

* Disabled feedback for web

- RemoteConfig is not supported on web

* Migrate to new flutter theme.

* Fix imports.

* Fix showDialog type cannot be inferred.

* Fix errors about context being used in async gaps.

* Use SizedBox instead of Container.

* Fix errors.

* Fix more warnings.

* Fix formatting.

* Fix formatting.

Co-authored-by: AlexandraPavel <[email protected]>
Co-authored-by: Badea Dragos <[email protected]>
Co-authored-by: stafy2912 <[email protected]>
Co-authored-by: stafy2912 <[email protected]>
Co-authored-by: StefanP-EQ <[email protected]>
Co-authored-by: Stefan Popa <[email protected]>
Co-authored-by: Andrei-Constantin Mirciu <[email protected]>
Co-authored-by: AndreiMirica <[email protected]>
Co-authored-by: Bogdan Piele <[email protected]>
# Conflicts:
#	.github/linter/Dangerfile
#	.github/workflows/deploy.yml
#	CONTRIBUTING.md
#	android/gradle/wrapper/gradle-wrapper.properties
#	firestore.rules
#	functions/package-lock.json
#	functions/package.json
#	lib/authentication/view/edit_profile_page.dart
#	lib/generated/intl/messages_en.dart
#	lib/generated/intl/messages_ro.dart
#	lib/generated/l10n.dart
#	lib/l10n/intl_en.arb
#	lib/l10n/intl_ro.arb
#	lib/main.dart
#	lib/navigation/bottom_navigation_bar.dart
#	lib/navigation/routes.dart
#	lib/pages/faq/view/faq_page.dart
#	lib/pages/filter/view/filter_page.dart
#	lib/pages/filter/view/relevance_picker.dart
#	lib/pages/home/feedback_nudge.dart
#	lib/pages/home/home_page.dart
#	lib/pages/people/service/person_provider.dart
#	lib/pages/people/view/people_page.dart
#	lib/pages/portal/service/website_provider.dart
#	lib/pages/portal/view/website_view.dart
#	lib/pages/search/view/classes_search_results.dart
#	lib/pages/search/view/people_search_results.dart
#	lib/pages/search/view/seached_classes_view.dart
#	lib/pages/search/view/search_page.dart
#	lib/pages/settings/service/admin_provider.dart
#	lib/pages/settings/view/admin_page.dart
#	lib/pages/settings/view/request_card.dart
#	lib/pages/settings/view/settings_page.dart
#	lib/pages/timetable/view/events/add_event_view.dart
#	lib/pages/timetable/view/timetable_page.dart
#	lib/resources/remote_config.dart
#	lib/resources/theme.dart
#	lib/resources/utils.dart
#	lib/widgets/chip_form_field.dart
#	lib/widgets/upload_button.dart
#	pubspec.lock
#	pubspec.yaml
#	test/integration_test.dart
#	test/settings_test.dart
widget.question.answer = selection;
},
items: (widget.question as FeedbackQuestionDropdown)
.options
.map(
(type) => DropdownMenuItem<String>(
(final type) => DropdownMenuItem<String>(
value: type,
child: Text(type.toString()),
Copy link
Member

@acs-upb-mobile-bot acs-upb-mobile-bot Apr 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Noop primitive operations

final UniEventProvider eventProvider =
Provider.of<UniEventProvider>(context);

return InfoCard<Iterable<UniEvent>>(
title: S.of(context).sectionEvents,
Copy link
Member

@acs-upb-mobile-bot acs-upb-mobile-bot Apr 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Use S.current instead of S.of(context)

@@ -266,46 +269,49 @@ class _ClassListState extends State<ClassList> {
return map;
}

_Section buildSections(BuildContext context, Map<String, dynamic> sections,
_Section buildSections(
final BuildContext context, final Map<String, dynamic> sections,
{int level = 0}) {
Copy link
Member

@acs-upb-mobile-bot acs-upb-mobile-bot Apr 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Prefer final for parameter declarations if they are not reassigned

@@ -169,7 +174,8 @@ class _QuestionsListState extends State<QuestionsList> {
padding: const EdgeInsets.fromLTRB(15, 0, 15, 15),
child: MarkdownBody(
fitContent: false,
onTapLink: Utils.launchURL,
onTapLink: (final text, final link, final title) =>
Utils.launchURL(link),
/*
Copy link
Member

@acs-upb-mobile-bot acs-upb-mobile-bot Apr 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Don't use block comments

{FilterNode node, Map<int, List<Widget>> optionsByLevel, int level = 0}) {
{final FilterNode node,
final Map<int, List<Widget>> optionsByLevel,
int level = 0}) {
Copy link
Member

@acs-upb-mobile-bot acs-upb-mobile-bot Apr 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Prefer final for parameter declarations if they are not reassigned

@@ -37,7 +38,8 @@ class FaqCard extends StatelessWidget {
fitContent: false,
maxLines: 2,
overflow: TextOverflow.ellipsis,
onTapLink: Utils.launchURL,
onTapLink: (final text, final link, final title) =>
Utils.launchURL(link),
/*
Copy link
Member

@acs-upb-mobile-bot acs-upb-mobile-bot Apr 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Don't use block comments

@@ -20,7 +21,7 @@ extension IssueExtension on Issue {
class IssueProvider {
final FirebaseFirestore _db = FirebaseFirestore.instance;

Future<bool> makeIssue(Issue issue) async {
Future<bool> makeIssue(final Issue issue) async {
assert(issue.issueBody != null);
Copy link
Member

@acs-upb-mobile-bot acs-upb-mobile-bot Apr 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Prefer asserts with message

Person teacher,
static UniEvent fromJSON(final String id, final Map<String, dynamic> json,
{final ClassHeader classHeader,
final Person teacher,
Map<String, AcademicCalendar> calendars = const {}}) {
Copy link
Member

@acs-upb-mobile-bot acs-upb-mobile-bot Apr 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Prefer final for parameter declarations if they are not reassigned

}

Future<Iterable<UniEventInstance>> getUpcomingEvents(LocalDate date,
Future<Iterable<UniEventInstance>> getUpcomingEvents(final DateTime date,
{int limit = 3}) async {
Copy link
Member

@acs-upb-mobile-bot acs-upb-mobile-bot Apr 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Prefer final for parameter declarations if they are not reassigned

}

void _errorHandler(dynamic e, {bool showToast = true}) {
void _errorHandler(final dynamic e, {bool showToast = true}) {
Copy link
Member

@acs-upb-mobile-bot acs-upb-mobile-bot Apr 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Prefer final for parameter declarations if they are not reassigned

try {
_remoteConfig = await RemoteConfig.instance;
_remoteConfig = RemoteConfig.instance;
Copy link
Member

@acs-upb-mobile-bot acs-upb-mobile-bot Apr 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ 'RemoteConfig' is deprecated and shouldn't be used. Use FirebaseRemoteConfig instead.

try {
_remoteConfig = await RemoteConfig.instance;
_remoteConfig = RemoteConfig.instance;
Copy link
Member

@acs-upb-mobile-bot acs-upb-mobile-bot Apr 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ 'instance' is deprecated and shouldn't be used. Use FirebaseRemoteConfig.instance instead.

@@ -9,6 +9,7 @@ class CustomBoxShadow extends BoxShadow {
this.blurStyle = BlurStyle.outer,
}) : super(color: color, offset: offset, blurRadius: blurRadius);

@override
final BlurStyle blurStyle;
Copy link
Member

@acs-upb-mobile-bot acs-upb-mobile-bot Apr 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Don't override fields

//
// await tester.enterText(email, 'john_alexander.doe1234');
//
// ///////////////////////
Copy link
Member

@acs-upb-mobile-bot acs-upb-mobile-bot Apr 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ That's probably too many slashes

// await tester.enterText(
// find.byKey(const ValueKey('last_name_text_field')), 'Doe');
//
// // TODO(AdrianMargineanu): Test dropdown buttons
Copy link
Member

@acs-upb-mobile-bot acs-upb-mobile-bot Apr 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Use Flutter TODO format: // TODO(username): message, https://URL-to-issue

// await Firebase.initializeApp();
//
// // Test layout for different screen sizes
// // TODO(AdrianMargineanu): Use Flutter driver for integration tests, setting screen sizes here isn't reliable
Copy link
Member

@acs-upb-mobile-bot acs-upb-mobile-bot Apr 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Use Flutter TODO format: // TODO(username): message, https://URL-to-issue

// group('Timetable events', () {
// for (final size in screenSizes) {
// if (size.width > size.height) {
// // TODO(IoanaAlexandru): In landscape mode the test fails in a weird
Copy link
Member

@acs-upb-mobile-bot acs-upb-mobile-bot Apr 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Use Flutter TODO format: // TODO(username): message, https://URL-to-issue

// await tester.tap(find.byIcon(Icons.edit_outlined));
// await tester.pumpAndSettle();
//
// //Open delete account popup
Copy link
Member

@acs-upb-mobile-bot acs-upb-mobile-bot Apr 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Add a space between "//" and the actual comment

// await tester.tap(find.byIcon(Icons.edit_outlined));
// await tester.pumpAndSettle();
//
// //Open change password popup
Copy link
Member

@acs-upb-mobile-bot acs-upb-mobile-bot Apr 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Add a space between "//" and the actual comment

// await tester.enterText(
// find.text('john.doe'), '[email protected]');
//
// //Open change email popup
Copy link
Member

@acs-upb-mobile-bot acs-upb-mobile-bot Apr 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Add a space between "//" and the actual comment

AdrianMargineanu and others added 4 commits May 1, 2022 01:01
* Started to supply recurrent and all-day events asynchronously via eventProvider

* Disabled feedback for web

- RemoteConfig is not supported on web

* Prevent use of S.of(context) via automated review. (#225)

* Prevent use of S.of(context).

* Add test code.

* Fix dangerfile.

* Check only dart files.

* Revert "Add test code."

This reverts commit bd975da

* Move remote_config import back

* Migrate to new flutter theme.

* Fix imports.

* Migrate image_picker and firebase_storage to flutter 2 null_safety

* Solve conflicts. Add delete image method

* Code reformating

* fix a mistake from merge

* Fix PR comments

* Added .fvm in git ignore

* Fix the merge errors and clean up the code

* Fix warnings coding style

Co-authored-by: Bogdan Piele <[email protected]>
Co-authored-by: Ioana Alexandru <[email protected]>
* Implement the new no-items strategy and solved all requested changes from the old PR

* Formatted file

* Update lib/widgets/info_card.dart

Co-authored-by: Ioana Alexandru <[email protected]>

* Applied RC

* Applied formatting

* Update lib/widgets/info_card.dart

Co-authored-by: Ioana Alexandru <[email protected]>

* Offset logic in cardWrapper component

* Applied RC

Co-authored-by: Ioana Alexandru <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants