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

Major code refactor. Migrate to null-safety. #93

Merged
merged 4 commits into from Mar 7, 2021
Merged

Conversation

MarcinusX
Copy link
Owner

@MarcinusX MarcinusX commented Mar 6, 2021

Changelog:

  • Migrate to null-safety.
  • Changed named constructors to two separate widgets.
    • NumberPicker.integer is now NumberPicker.
    • NumberPicker.decimal is now DecimalNumberPicker.
    • NumberPicker.horizontal is now NumberPicker with axis: Axis.horizontal
  • Removed infiniteLoop to make it possible to go to null safety. The feature will come back once the infitniteListView package gets null-safe.
  • Removed dialogs containing pickers. I think it's better to just leave it for developers.
  • Removed animateInt method and replaced it with just reacting to value changed (see example).
  • Changed animation curve to Curves.easeOutCubic.
  • Changed initialValue to value to avoid confusion from my awful naming.
  • Removed highlightSelectedValue as it can be obtained by providing selectedTextStyle.
  • Fixed some minor bugs.

Closes #89
Closes #43
Closes #26
Closes #94

@coveralls
Copy link

coveralls commented Mar 6, 2021

Pull Request Test Coverage Report for Build 77

  • 115 of 124 (92.74%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+24.9%) to 92.742%

Changes Missing Coverage Covered Lines Changed/Added Lines %
lib/src/numberpicker.dart 89 98 90.82%
Totals Coverage Status
Change from base Build 69: 24.9%
Covered Lines: 115
Relevant Lines: 124

💛 - Coveralls

@MarcinusX
Copy link
Owner Author

This should also close #94

@nilsreichardt
Copy link
Contributor

This should also close #94

Can add "Closes #94" to the PR description?

And you have to add the word "Closes" for every ticket. Like this:

Closes #89
Closes #43
Closes #26
Closes #94

Otherwise it will not close the issues

@nilsreichardt
Copy link
Contributor

@MarcinusX I can confirm that the example is working 👍 But I couldn't test in our real app, because other dependencies didn't merged yet.

Screen.Recording.2021-03-07.at.11.47.59.mov

Co-authored-by: Nils Reichardt <nils@sharezone.net>
@MarcinusX MarcinusX merged commit c575068 into master Mar 7, 2021
@MarcinusX MarcinusX deleted the nullsafety branch March 7, 2021 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants