FLUTTER ECOSYSTEM

poqueque/random_name_generator

用于生成随机人名的 Dart 库

random_name_generator 项目封面
Stars
5
Forks
6
最近推送(UTC)
2024年11月4日
项目状态
未归档
Eduard Carreras GitHub avatar
GITHUB User

Eduard Carreras ↗

语言Dart

此仓库发布的插件

使用的依赖

依赖清单 2 项
  • lints开发依赖^3.0.0
  • test开发依赖^1.21.4

原始 README

以下为英文项目原文快照,最新内容请访问 GitHub。

展开 / 收起项目 README

GitHub license Version

This package creates random people names to be used in Dart/Flutter apps. The generation is done based in the most common names in each of the selectable zones.

Please star the repo to support the project

Features

Creation of names for a random person, man or woman. Creation of names, surnames or full names. The names are generated randomly based on the list of 100 most common names and surnames.

Usage

RandomNames is a tool class to create random names for specific Zone. To create a RandomNames instance you need to use one of available Zone objects.

var randomNames = RandomNames(Zone.us);

The RandomNames object has several methods to get random people names:

randomNames.name() gives a random first name (man or woman)

randomNames.womanName() gives a random woman first name

randomNames.manName() gives a random man first name

randomNames.surname() gives a random last name

randomNames.fullName() gives a random full name (man or woman)

randomNames.womanFullName() gives a random woman full name

randomNames.manFullName() gives a random man full name

Supported Zones

There are static accessors to the different zones available on the Zone class:

Zone.catalonia
Zone.france
Zone.spain
Zone.uk
Zone.us
Zone.turkey
Zone.germany
Zone.canada
Zone.afghanistan
Zone.austria
Zone.belgium
Zone.brazil
Zone.china
Zone.egypt
Zone.finland
Zone.india
Zone.iran
Zone.israel
Zone.italy
Zone.japan
Zone.poland
Zone.romania
Zone.russia
Zone.saudiArabia
Zone.southAfrica
Zone.switzerland
Zone.uganda
Zone.ukraine
Zone.zimbabwe

Additional information

Feel free to create a pull request to expand the library for other Zones.