Skip to content

Conversation

@timmaffett
Copy link
Contributor

…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.dart has 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 previewing FontPicker on 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.md file 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..

@timmaffett
Copy link
Contributor Author

I have now also added 2 of the TODO's (From the code)

  1. Favorites capability (optional) - this adds favorite button to each font and then favorites are stored and shown at the top of the list (after recents) when displaying the font list in the future.

  2. The language list is automatically prune of languages that are not present in the current font list.

@timmaffett
Copy link
Contributor Author

The example app at (https://timmaffett.github.io/flutter_font_picker/)[https://timmaffett.github.io/flutter_font_picker/] has now been updated to include the favorites option and language pruning.

(You must turn on the favorites option in the settings control panel)

@timmaffett
Copy link
Contributor Author

I have resolved conflicts and made sure everything is dart analyze and dart format clean.

@timmaffett
Copy link
Contributor Author

merged changes to of googleFontLanguages variable name change to possibleGoogleFontLanguagesWeWillDisplay to update_constants.dart
(I changed the name because to reflect it's actual purpose now that the language filtering is implemented and any languages not present in the selected font list will not be shown)

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.

1 participant