Code Monkey home page Code Monkey logo

country-list-pick's Introduction

Fiaz Luthfi -- @HiFiaz ๐Ÿ‘‹

Hi, I'm fiaz a freelance flutter developer and also love vue.js. I've worked to create flutter app with Oracle, Bank Standard Chartered and some startups. Previously worked as Manager in a company to handle some client with some of project. And yes for now am full freelance developer and open to work with you ๐Ÿ’•

How I work

๐Ÿ’Œ Send me brief of work
๐Ÿ’ป Communicate how we work and project prices
โœ… Create list of work and milestone
โœ๏ธ Testing and Getting Feedback
๐Ÿ’ Send Source Code and Done

Get In Touch

hifiaz

country-list-pick's People

Contributors

d00rman avatar giaotuancse avatar hifiaz avatar imurnane avatar joshuachinemezu avatar jpainam avatar mohammadkashanijabbari avatar u-gin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

country-list-pick's Issues

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.

Dark mode

You can't see anything in dark mode.

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?

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)

Validator

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

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.

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

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(

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.

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.

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"

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) >>>>

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

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

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.

[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

Country Text style

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

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.