Daniel-Ioannou / flutter_currency_picker

A flutter package to select a currency from a list of currencies.
https://pub.dev/packages/currency_picker
MIT License
35 stars 83 forks source link

Added new searchFieldDecoration #78

Closed iabdousd closed 11 months ago

iabdousd commented 1 year ago

Added new searchFieldDecoration to customize the decoration of the search field

Daniel-Ioannou commented 11 months ago

@iabdousd Thank you for your contribution but customize search text field was implemented in theme. Released in v2.0.18.

showCurrencyPicker(
  context: context,
  theme: CurrencyPickerThemeData(
    // Optional. Styles the search field.
    inputDecoration: InputDecoration(
      labelText: 'Search',
      hintText: 'Start typing to search',
      prefixIcon: const Icon(Icons.search),
      border: OutlineInputBorder(
        borderSide: BorderSide(
          color: const Color(0xFF8C98A8).withOpacity(0.2),
        ),
      ),
    ),
  ),
  onSelect: (Currency currency) {
    print('Select currency: ${currency.name}');
  },
);