Code Monkey home page Code Monkey logo

country-list-pick's Issues

[Feature Request] Last Picked Country Builder

countryBuilder is a nice feature, however, I also need to modify the last picked country 's design.
(Or it can be acceptable if countryBuilder also redesigns the last picked country.)
Could you add that feature?
Thanks.

Screen Shot 2021-10-15 at 12 14 53

Method not found: 'ButtonTheme.bar' Error appear after upgrading to flutter v2

Hi guys, after upgrading flutter to v2 I couldn't run my application anymore because "Method not found: 'ButtonTheme.bar'.", I tried installing 1.0.4, 1.1.0, 1.2.0, 1.2.1, 1.3.0 getting the same result.

Console complaint:
Xcode's output: ↳ ../../../SDKs/flutter/.pub-cache/hosted/pub.dartlang.org/country_pickers-1.3.0/lib/utils/my_alert_dialog.dart:139:36: Error: Method not found: 'ButtonTheme.bar'. children.add(new ButtonTheme.bar(

Country Text style

Please can you get possibility to change, the style of country text ?

RangeError (index): Invalid value: Not in inclusive range (iOS)

Whenever I scroll to the top of the country list an exception always happens in iOS which is:

RangeError (index): Invalid value: Not in inclusive range 0..241: -3

I traced the code and found that the problem is in selection_list.dart line 305:

String? countryName = countries.elementAt(scrollPosition).name;

when scrollPosition is a negative number.

Fix:

Change the condition in line 304 to:

if (scrollPosition < countries.length && scrollPosition >= 0)

Width widget

How can I increase the size of the widget in length? because currently if I have countries that are too big they are sometimes cut on 2 lines and it is not very aesthetic.

Dark mode

You can't see anything in dark mode.

Search field is really small

I am using country_list_pick: ^1.0.0+2
In the select country screen the search text field is really small because

  1. its parent container has no height set
  2. there is no vertical padding for the text field

Container( color: Colors.white, height: 50, child: TextField( controller: _controller, decoration: InputDecoration( border: InputBorder.none, focusedBorder: InputBorder.none, enabledBorder: InputBorder.none, errorBorder: InputBorder.none, disabledBorder: InputBorder.none, contentPadding: EdgeInsets.all(15), hintText: "Search...", ), onChanged: _filterElements, ), ),

Adding a height of 50 to the parent container and adding content padding of 15px works well for me.

Update alphabet sidebar while scrolling

I noticed when using the country picker, the sidebar containing the alphabet letter of the countries does not update with what is displayed on screen. It would be nice if the sidebar updates with the current country's letter that is on screen as the user scrolls through the list.

unable to locate flags

════════ Exception caught by image resource service ════════════════════════════════════════════════
Unable to load asset: packages/country_list_pick/flags/af.png
════════════════════════════════════════════════════════════════════════════════════════════════════

<<<< [ +4 ms] Error while trying to load an asset: Failed to load asset at "assets/packages/country_list_pick/flags/cu.png" (404) >>>>

Enable / Disable widget

as this can be also used for forms and many users may need to enable/disable upon some acitivities.

It would be nice to have enable/disable option.

unable to customize picklist text search field color

The country theme misses property to the search country text field style.
If by default I have a app them with bodyLarge style then even warping it around with a Theme widget is not possible to override the style of the search text field.

Currently:


class CountryTheme {
  final String? searchText;
  final String? searchHintText;
  final String? lastPickText;
  final Color? alphabetSelectedBackgroundColor;
  final Color? alphabetTextColor;
  final Color? alphabetSelectedTextColor;
  final bool? isShowTitle;
  final bool? isShowFlag;
  final bool? isShowCode;
  final bool? isDownIcon;
  final String? initialSelection;
  final bool? showEnglishName;
  final Color? labelColor;

  CountryTheme({
    this.labelColor,
    this.searchText,
    this.searchHintText,
    this.lastPickText,
    this.alphabetSelectedBackgroundColor,
    this.alphabetTextColor,
    this.alphabetSelectedTextColor,
    this.isShowTitle,
    this.isShowFlag,
    this.isShowCode,
    this.isDownIcon,
    this.initialSelection,
    this.showEnglishName,
  });
}

I would suggest to add a property: searchTextColor or searchTextStyle

Placeholder string

I can not set a placeholder string for the picker when the user see the picker for the first time, it will be cool to have something like "Select your country" or whatever the developer want to set.

Congrats for the lib, is amazing.

How to set empty value?

I tried to leave blank, but automatically, Afghanistan is selected.
I looked at the docs, and the source code, I think there is no way, right?

I found this at the source code:

selectedItem = elements[0];

So, when the empty value is passed, automatically Afghanistan will be chosen. Why?

Accessibility warning for search button

First of all great library! Thanks for your hard work.

Would you consider improving accessibility for the country list? There's a warning for e.g. search button (top right corner).

This item may not have a label readable by screen readers.

Also the check button displays below the alphabet letters. Looks like it can also be improved.

22

Locale texts

It would be nice to have the following texts as parameters, to support custom locale configurations:

  • Select Country
  • SEARCH
  • Search...
  • LAST PICK

Added value could be:

  • back icon, size and color
  • alignment for "Select Country"

Initial dial code

+1 is the same dial code for Canada and for United States, so it's impossible to set United States as the initial country selected

Validator

there is a way to set a validator? and set a value empty because always show a Afghanistan country

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.