搜索插件、代码仓与 APP 分类

gender_picker 封面
插件详情v1.1.0

gender_picker

一个非常出色且响应迅速的库,可用于水平或垂直方式选择性别

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
120
喜欢数
42
Pub 分数
140

安装插件

flutter pub add gender_picker

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

一个用于选择性别的反应式 Flutter 库,支持水平和垂直布局。它提供了一个直观且可自定义的界面,让用户轻松选择性别选项,非常适合用于个人资料设置或用户注册流程。该包设计轻量且易于集成,提供流畅的 UI 反馈和跨平台的响应式设计。它在 Android、iOS、Web、macOS、Windows 和 Linux 上都能无缝运行。

适合场景

  • 用户资料创建
  • 注册表单
  • 个人设置
  • 聊天应用用户详情
  • 需要选择性别的表单输入

主要特点

  • 水平和垂直布局选项
  • 响应式 UI 更新
  • 跨平台兼容性
  • 可自定义外观
  • 与 Flutter 的简单集成
  • 响应式设计

适合对象

  • 应用开发者构建用户资料
  • 需要性别输入的表单
  • 跨平台 Flutter 应用
  • 以用户界面为重点的应用程序
  • 极简表单组件

使用建议

  • 仅限性别选择
  • 无内置验证
  • 需要手动处理所选值
  • 不适合复杂表单
  • 如果在大型应用中使用,依赖外部状态管理

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

gender_picker 1.1.0

An awesome gender picker widget comes with latest feature to support in your project design.

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.

Screenshot_20200314_120050_com mateen example

Installing

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

dependencies: gender_picker: ^1.1.0

Sample Usage

import 'package:gender_picker/source/enums.dart';
import 'package:gender_picker/source/gender_picker.dart';
GenderPickerWithImage(
              showOtherGender: true,
              verticalAlignedText: false,
              selectedGender: Gender.Male,
              selectedGenderTextStyle: TextStyle(
                  color: Color(0xFF8b32a8), fontWeight: FontWeight.bold),
              unSelectedGenderTextStyle: TextStyle(
                  color: Colors.white, fontWeight: FontWeight.normal),
              onChanged: (Gender gender) {
                print(gender);
              },
              equallyAligned: true,
              animationDuration: Duration(milliseconds: 300),
              isCircular: true,
              // default : true,
              opacityOfGradient: 0.4,
              padding: const EdgeInsets.all(3),
              size: 50, //default : 40
            )

This project is a starting point for a Dart package, a library module containing code that can be shared easily across multiple Flutter or Dart projects.

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

所属分类

源码仓库

使用此插件的项目

暂无相关数据。