This two commits simplifies code by removing some code duplication.
Previously code for building buttons was duplicated (only difference was that we used either new created Text widget or one provided by user).
Also by initializing unset fields with default values(setupButtonDefaultValues method), we can get rid of null checks when doing widgets.
Also code for creation of buttons is moved to separate methods, to make whole widget building code smaller and it more readable.
I plan to add "previous" button support (in next PR) and separate next/done button styles/etc (they're using the same values).
This two commits simplifies code by removing some code duplication. Previously code for building buttons was duplicated (only difference was that we used either new created Text widget or one provided by user). Also by initializing unset fields with default values(setupButtonDefaultValues method), we can get rid of null checks when doing widgets. Also code for creation of buttons is moved to separate methods, to make whole widget building code smaller and it more readable.
I plan to add "previous" button support (in next PR) and separate next/done button styles/etc (they're using the same values).
Thanks for nice library!