feat: Adds support for custom keyboard pages and other customizations#58
feat: Adds support for custom keyboard pages and other customizations#58Sub6Resources wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Hi 👋🏽 Thank you for opening your first PR with simpleclub/math_keyboard ❤
You can expect a review from us soon
In the meantime, please check our contribution guidelines, the PR checklist, and the PR checks.
edhom
left a comment
There was a problem hiding this comment.
@Sub6Resources Thanks Matthew for the contribution😍 And sorry for the late review! I have just some nits but happy to merge this one then:)
| /// The buttons to display. | ||
| final List<List<KeyboardButtonConfig>>? page2; | ||
| /// The configuration for all the pages on the keyboard. | ||
| final List<CustomButtonPage>? pages; |
There was a problem hiding this comment.
| final List<CustomButtonPage>? pages; | |
| final List<CustomButtonPage> pages; |
I think this can't be nullable anymore
| else if (type == | ||
| MathKeyboardType.expression) | ||
| standardKeyboard, | ||
| if (type == MathKeyboardType.expression) | ||
| functionKeyboard, |
There was a problem hiding this comment.
| else if (type == | |
| MathKeyboardType.expression) | |
| standardKeyboard, | |
| if (type == MathKeyboardType.expression) | |
| functionKeyboard, | |
| if (type == MathKeyboardType.expression) | |
| standardKeyboard, | |
| functionKeyboard, |
| ...(widget.customPages.fold<List<List<KeyboardButtonConfig>>>( | ||
| [], | ||
| (previousValue, customPage) { | ||
| return previousValue..addAll(customPage.buttonLayout); | ||
| }, | ||
| )), |
There was a problem hiding this comment.
| ...(widget.customPages.fold<List<List<KeyboardButtonConfig>>>( | |
| [], | |
| (previousValue, customPage) { | |
| return previousValue..addAll(customPage.buttonLayout); | |
| }, | |
| )), | |
| for (final page in widget.customPages) | |
| ...page.buttonLayout |
Could you check if this works?🙂
|
@Sub6Resources @edhom this is a very useful PR can it be merged |
|
|
Description
bool secondPagehas been replaced withint pageinMathFieldEditingControllerto allow for more than two pages.customPagesattribute that takes a list ofCustomButtonPages.CustomButtonPagetakes aList<List<KeyboardButtonConfig>>as well as an optionallabeloriconto be shown using thePageButtonConfig.fontSizeattribute toMathKeyboardand akeyboardButtonFontSizeattribute toMathFieldto allow the font size of the keyboard buttons to be adjusted.heightFactorattribute toKeyboardButtonConfigto allow for customization of the height of keyboard rows.MathKeyboardto test the functionality of custom and default pages on the keyboard.Related issues & PRs
None
Checklist
contributing guide.
math_keyboardorexamplepackage(also README etc.), I created an entry in
CHANGELOG.md(## UPCOMING RELEASEif the changeon its own is not worth an update).
math_keyboardpackage, I updated the versionaccording to Dart's semantic versioning.