Skip to content

DropDown Arrow change functionality #42

Open

Description

@Shvet

If possible can add functionality to change drop down arrow? To just change arrow i need to user builder method.
Also you may need to add how to show image in custom widget as we have to specify package name from where assets are being showing in this case.

Here is Example in which i have to waste my time to just find how to use flags from package's assets.

  CountryCodePicker(
                            showDropDownButton: true,
                            showFlagDialog: true,
                            showFlag: true,
                            initialSelection: '+91',
                            onChanged: (value) {},
                            padding: EdgeInsets.zero,
                            margin: EdgeInsets.zero,
                            builder: (countryCode) {
                              return Container(
                                padding: const EdgeInsets.all(8.0),
                                child: Row(
                                  children: [
                                    Image.asset(
                                      countryCode!.flagUri!,
                                      width: 36,
                                      height: 24,
                                      package: 'country_code_picker',
                                    ),
                                    const SizedBox(width: 4.0),
                                    Text(
                                      '${countryCode.code} ${countryCode.dialCode}',
                                      style: Theme.of(context)
                                          .textTheme
                                          .bodyLarge!
                                          .copyWith(fontWeight: FontWeight.w500),
                                    ),
                                    const SizedBox(width: 4.0),
                                    Icon(
                                      Icons.arrow_drop_down_circle_rounded,
                                      size: 18,
                                      color: AppColors.secondaryColor,
                                    ),
                                  ],
                                ),
                              );
                            },
                          ),

I have to manully write package name in Image.asset(package:) as there is no documents on customisation.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions