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

Add NumberBox Widget #771

Merged
merged 21 commits into from Mar 24, 2023
Merged

Add NumberBox Widget #771

merged 21 commits into from Mar 24, 2023

Conversation

WinXaito
Copy link
Collaborator

@WinXaito WinXaito commented Mar 15, 2023

Pre-launch Checklist

  • I have updated CHANGELOG.md with my changes
  • I have run "dart format ." on the project
  • I have added/updated relevant documentation

Need to do:

  • Update value with mouse scroll
  • Update value with PageUp / PageDown shortcut
  • Add documentation
  • Add disabled options
  • Theme ??

Demo:

numberbox

@WinXaito WinXaito marked this pull request as draft March 15, 2023 11:04
@WinXaito WinXaito mentioned this pull request Mar 15, 2023
6 tasks
@WinXaito WinXaito linked an issue Mar 15, 2023 that may be closed by this pull request
@WinXaito WinXaito requested a review from bdlukaa March 15, 2023 13:35
Copy link
Owner

@bdlukaa bdlukaa left a comment

Choose a reason for hiding this comment

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

This looks awesome, but a few things are missing.

Text formatting. Just exposing TextBox.inputFormatters and adding an example should do the job.

TextBox.keyboardType should be number.

Exposing some other TextBox properties, such as placeholder, autoFocus, cursor-related properties, and other that may be relevant.

lib/src/controls/form/number_box.dart Outdated Show resolved Hide resolved
lib/src/controls/form/number_box.dart Outdated Show resolved Hide resolved
lib/src/controls/form/number_box.dart Outdated Show resolved Hide resolved
lib/src/controls/form/number_box.dart Outdated Show resolved Hide resolved
lib/src/controls/form/number_box.dart Outdated Show resolved Hide resolved
lib/src/controls/form/number_box.dart Show resolved Hide resolved
@WinXaito
Copy link
Collaborator Author

Text formatting. Just exposing TextBox.inputFormatters and adding an example should do the job.

Currently, the value must be an int, I will try to make a Generic combobox that accept num (So int or double). I have tested that but I'm not satisfied.

Maybe I'll leave it like that for now and do another PR to make this Widget generic. @bdlukaa What do you think about that ?

And I will also do another PR (Because I think that it is necessary to keep it at a reasonable size) for add some property like min/max.

@bdlukaa
Copy link
Owner

bdlukaa commented Mar 22, 2023

Sounds ok to me!

@WinXaito WinXaito marked this pull request as ready for review March 23, 2023 16:20
@WinXaito WinXaito merged commit 3b783eb into bdlukaa:master Mar 24, 2023
3 checks passed
@WinXaito WinXaito deleted the numberbox branch March 24, 2023 13:08
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.

Add a Number Box Widget
3 participants