gender_selector 1.0.6

  • Readme
  • Changelog
  • Example
  • Installing
  • 86

gender_selector #

A Flutter Package for gender selector widget for the app.

The goal of this project is to provide an ultimate widget for selecting the gender

The source code is 100% Dart, and everything resides in the /lib folder.

Happy learning. 👍

Show some ❤️ and star the repo to support the project #

GitHub stars GitHub forks GitHub watchers GitHub followers Twitter Follow

Open Source Love License

Screenshots #

Medium Article #

Medium Article

Installation #

First Include this dependency in your pubspec.yaml


Then import it in your code.

Widget #

  margin: EdgeInsets.only(left: 10, top: 30, right: 10, bottom: 10,),
  selectedGender: Gender.FEMALE,
  onChanged: (gender) async {

    setState(() {
      if(gender == Gender.FEMALE) {
        selectedGender = "female";
      } else {
        selectedGender = "male";



Contribution Guide #

This project is open to all kinds of contribution in all of its categories. Together, we can make it the ultimate Gender Selector available for free, for everyone, forever.

For resource contribution, just follow the following format: [reference-name](link) - Description, and raise a Pull Request. If you want to contribute multiple resources, raise separate PRs for each of them. Please consider adding resources maintaining the default sorting order of the category, like alphabetical sorting.

If you have any suggestion for including more categories, feel free to open a Github issue for us to have more discussion on it. Please DO NOT contribute low-quality, spammy or self-promotional stuff. Let's keep this project clean and useful.

If you feel that a particular resource(s)/template(s) available here is not a good fit for this project and should be removed, feel free to let me know by opening an issue.

❤️ Found this project useful? #

If you found this project useful, then please consider giving it a ⭐ on Github and sharing it with your friends via social media.

Project Created & Maintained By #

Dhruvil Patel & Nirav Patel (BZZZARD) #

Donate #

If you found this project helpful or you learned something from the source code and want to thank me, consider buying me a cup of ☕

License #

Copyright 2019 Dhruvil Patel

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.

## Getting Started

For help getting started with Flutter, view our online

[1.0.6] - Release #

  • Improved

[1.0.5] - Release #

  • changed

[1.0.4] - Release #

  • changed

[1.0.3] - Release #

  • New Example Added

[1.0.2] - Release #

  • Image Loading Issue Solved

[1.0.1] - Release #

  • Image Loading Issue Solved

[1.0.0] - Release #

  • First Stable Release

[0.0.4] - Release #

  • Minor Changes

[0.0.3] - Release #

  • Minor Changes

[0.0.2] - Release #

  • Example Added

[0.0.1] - Release #

  • A Flutter widget for adding gender selection in the app.


import 'package:flutter/material.dart';
import 'package:gender_selector/gender_selector.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
      home: MyHomePage(title: 'Flutter Demo Home Page'),

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

  _MyHomePageState createState() => _MyHomePageState();

class _MyHomePageState extends State<MyHomePage> {
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      body: Center(
        child: GenderSelector(
          onChanged: (gender) {


Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  gender_selector: ^1.0.6

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:gender_selector/gender_selector.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Jul 2, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.13
  • Flutter: 1.17.5

Analysis suggestions

Package not compatible with SDK dart

because of import path [gender_selector] that is in a package requiring null.

Health suggestions

Fix lib/gender_selector.dart. (-0.50 points)

Analysis of lib/gender_selector.dart reported 1 hint:

line 7 col 7: This class (or a class that this class inherits from) is marked as '@immutable', but one or more of its instance fields aren't final: GenderSelector.maleimg, GenderSelector.femaleimg, GenderSelector.maletxt, GenderSelector.femaletxt, GenderSelector.padding, GenderSelector.margin, GenderSelector.selectedGender, GenderSelector.onChanged

Maintenance issues and suggestions

Homepage URL doesn't exist. (-20 points)

At the time of the analysis the homepage field was unreachable.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.12 1.14.13
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6 1.2.0
vector_math 2.0.8
Dev dependencies