-
Notifications
You must be signed in to change notification settings - Fork 507
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
Started v2.0 migration #1986
base: master
Are you sure you want to change the base?
Started v2.0 migration #1986
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@theswerd - this looks good to me. What else does it need?
@@ -69,7 +69,7 @@ class __HomeStatsFaderState extends State<_HomeStatsFader> | |||
with SingleTickerProviderStateMixin { | |||
bool fadeState = true; | |||
|
|||
AnimationController _animationController; | |||
late AnimationController _animationController; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
late is a good syntax
notification_permissions: ^0.5.0 | ||
# observer_provider: 0.0.1+2 | ||
package_info: "2.0.0" | ||
# page_view_indicator: ^2.0.4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make this a TODO?
just looked over the cache manager - reimplementation should be relatively easy. they provided instructions for moving away from base cache manager. |
Thanks Ben. That's encouraging.
…On Thu, Apr 29, 2021 at 3:57 PM Benjamin Swerdlow ***@***.***> wrote:
just looked over the cache manager - reimplementation should be relatively
easy. they provided instructions for moving away from base cache manager.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1986 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFF3K2EODFXXQIROAHL37TTLHP5ZANCNFSM43NOIS3Q>
.
|
Cache manager working - only need to re-implement charts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes to cache manager look good
All we need is fl_chart
now...
@@ -45,7 +45,7 @@ class _CountryListPageState extends State<CountryListPage> { | |||
decoration: InputDecoration( | |||
border: InputBorder.none, hintText: 'Enter your country'), | |||
onChanged: (String value) async { | |||
List filtered = (widget.countries?.values ?? []).where((element) { | |||
List filtered = (widget.countries.values).where((element) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is much cleaner. Good case where null safety enforces better discipline
This item has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Fix runtime errors due to new nullability semantics
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
var country; | ||
if (currentCountryCode != null) | ||
country = countryList.countries[currentCountryCode]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking you could simplify this with Conditional Property Access... then I realize that doesn't work and you need to do it this way instead ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah good call on simplifying this bit! After playing around some more, I think we can just do:
final country = countryList.countries[currentCountryCode];
(sorry, I could've sworn this was causing a runtime error but it's working fine for me now 😛)
This item has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This item has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
In progress
Checklist: