Skip to content

Add NumberBox Widget#771

Merged
WinXaito merged 21 commits intobdlukaa:masterfrom
WinXaito:numberbox
Mar 24, 2023
Merged

Add NumberBox Widget#771
WinXaito merged 21 commits intobdlukaa:masterfrom
WinXaito:numberbox

Conversation

@WinXaito
Copy link
Copy Markdown
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
Copy Markdown
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.

Comment thread lib/src/controls/form/number_box.dart Outdated
Comment thread lib/src/controls/form/number_box.dart
Comment thread lib/src/controls/form/number_box.dart Outdated
Comment thread lib/src/controls/form/number_box.dart Outdated
Comment thread lib/src/controls/form/number_box.dart Outdated
Comment thread lib/src/controls/form/number_box.dart
@WinXaito
Copy link
Copy Markdown
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
Copy Markdown
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
@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