Ahmadre / FlutterIconPicker

An adaptive comprehensive IconPicker for Flutter
MIT License
116 stars 78 forks source link

Feat/73 preselected icon #75

Closed Ahmadre closed 1 month ago

Ahmadre commented 1 month ago

Related issues:

Overview

This PR introduces the feature of pre-selecting an icon and on default scroll to the selected icon after initialization.

For this you can use now: selectedIcon: IconPickerIcon(...).

This behaviour can be disabled with the parameter: shouldScrollToSelectedIcon = false.

The background can be controlled by: selectedIconBackgroundColor = Color...

This PR also has to introduce a BREAKING CHANGE where the return type is NOT IconData anymore, but our own IconPickerIcon Class:

IconPickerIcon(
    name: 'camera',
    data: Icons.camera, 
    pack: IconPack.material,
);