Enhancement: Add font size control,list preview text, more robust example\main.dart... #13
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…allowing tinkering and previewing of all capabilities, and optional device preview also included.
This PR includes a few (optional) enhancements to allow control of font sizes in preview text and font list display, as well as the capability to optionally enable preview text within the font list.
The
example/main.darthas been enhanced to include a control panel that allows previewing and tinkering with all of the possible settings. Additionally it now includes a 'useDevicePreview' constant that can be set to true to enable previewingFontPickeron a wide variety of possible flutter devices, screen sizes and orientations.A 'live' web preview of this PR (with device preview enabled) can be found at https://timmaffett.github.io/flutter_font_picker/. (The device preview capabilities are provided via the wonderful [https://pub.dev/packages/device_preview package](https://pub.dev/packages/device_preview package) )
All of the changes are compatible, flexible and reactive to various screen sizes and orientations (as were all the previous FontPicker() capabilities).
Initially I needed to make the font sizes a little larger to aid in choosing fonts, but then this expanded to the other features when I additionally determined that adding list preview text would greatly make my user's lives easier by allowing them to see preview text directly in the font picker list without having to individually select each font in turn.
The
readme.mdfile now includes a link to the live example on my github.io, but please feel free to compile your own example and put it on your github.io, (or continue using the example on mine), or remove the live example link entirely.I personally find live examples very useful when I am previewing packages, and with the additional device previewing it allows users to better see how it will work great for them in different use cases..