Coder Social home page Coder Social logo

faker_x's Introduction

CI Build Checks Pub Version Pub Popularity Pub Points Pub Likes GitHub Repo stars GitHub contributors Pub Publisher GitHub


BEST faker package available for dart that generates fake data you need.

๐Ÿš€ Before you start

faker_x was not created just to be a typical faker library but a library that is easy to contribute and grow.

With faker libraries there are many localizations that need to be supported while each of them share many resources which fake values can be generated from, almost all of them will have different resources that only make sense for that localization. Being easy to change, contribute & maintain was one of the top metrics of development when I started creating this package. In order to give dart language a faker library it deserves while also valuing dart developers time, faker_x uses code generation to generate its library code, tests & documents so if you wish to add new resources or fake value generators, you only need to focus on putting in the data instead of reading the source code and trying to figure it out (which you are free to do so if you wish). Please read the contribution guide to read the step by step guide on how to change or add new values and resources to faker_x.

๐Ÿช„ Usage

Here are some of the values faker_x can generate. for complete details checkout Localizations.

final phoneNumber = FakerX.localized.en_us.phone.phoneNumber;
final address = FakerX.localized.en_us.address.address;
final jobTitle = FakerX.localized.en_us.job.jobTitle;
final fullName = FakerX.localized.en_us.person.fullName;
final colorHex = FakerX.localized.en_us.color.colorHex;
final sentence = FakerX.localized.en_us.lorem.sentence;
final car = FakerX.localized.en_us.vehicle.car;
final email = FakerX.localized.en_us.internet.email;
final ipv4 = FakerX.localized.en_us.internet.ipv4;
final emoji = FakerX.localized.en_us.internet.emoji;
final avatarUri = FakerX.localized.en_us.image.avatarUri;
final geoLocation = FakerX.localized.en_us.location.geoLocation;

final emailFrom = FakerX.localized.en_us.internet.emailFrom(
      firstName: 'alireza',
      lastName: 'easazade',
      provider: 'gmail.com',
    );

final image = FakerX.localized.en_us.image.image(
          width: 300,
          height: 400,
          keywords: ['pet', 'dog'],
        );    

๐Ÿ“œ Contribution Guide

Please Read the Contribution Guide. It is written in detail to avoid any confusions and help you understand what you need to do to make your contributions. If there is any confusion or question you can open an issue or ask your question on your open pull request.

๐Ÿ’Ž Resources & ๐ŸŒ Localizations

Below you can see a table of all the locales and all the resources and values that are available for them. Right now faker_x supports only 2 locales which you can see in table below. more will be added soon

  • Fake value generators marked in [black] are available for all locales and generate the value differently according to that locale.
  • Fake value generators marked in [green]๐ŸŸข are globally shared between different locales and generate values using same methods for all locales.
  • Fake value generator marked in [blue]๐Ÿ”ต are the ones that are only available for that locale
en_us address(14) address | building number | city name | city prefix ๐Ÿ”ต | city suffix ๐Ÿ”ต | neighborhood ๐Ÿ”ต | postcode | postcode format ๐Ÿ”ต | secondary address ๐Ÿ”ต | state | state abbr ๐Ÿ”ต | street address ๐Ÿ”ต | street name | street suffix ๐Ÿ”ต
animal(1) animal name
vehicle(1) car
color(2) color hex ๐ŸŸข | color name
person(7) first name en ๐ŸŸข | last name en ๐ŸŸข | first name | first name female | first name male | full name | last name
phone(2) international phone number | phone number
job(3) job prefix ๐Ÿ”ต | job suffix ๐Ÿ”ต | job title
automotive(1) license plate
lorem(3) paragraph ๐ŸŸข | sentence | word
image(2) avatar uri ๐ŸŸข | image ๐ŸŸข
internet(18) disposable email ๐ŸŸข | disposable mail provider ๐ŸŸข | domain name ๐ŸŸข | domain suffixes ๐ŸŸข | email ๐ŸŸข | email from ๐ŸŸข | emoji ๐ŸŸข | http url ๐ŸŸข | https url ๐ŸŸข | ipv4 ๐ŸŸข | ipv6 ๐ŸŸข | mac address ๐ŸŸข | mail provider ๐ŸŸข | password ๐ŸŸข | safe email ๐ŸŸข | uri ๐ŸŸข | user name ๐ŸŸข | user name from ๐ŸŸข
location(1) geo location ๐ŸŸข
fa_ir address(10) address | alley ๐Ÿ”ต | building name ๐Ÿ”ต | building number | city name | postcode | state | street name | street prefix ๐Ÿ”ต | street suffix ๐Ÿ”ต
animal(1) animal name
vehicle(1) car
color(2) color hex ๐ŸŸข | color name
person(7) first name en ๐ŸŸข | last name en ๐ŸŸข | first name | first name female | first name male | full name | last name
phone(2) international phone number | phone number
job(1) job title
automotive(1) license plate
lorem(3) paragraph ๐ŸŸข | sentence | word
image(2) avatar uri ๐ŸŸข | image ๐ŸŸข
internet(18) disposable email ๐ŸŸข | disposable mail provider ๐ŸŸข | domain name ๐ŸŸข | domain suffixes ๐ŸŸข | email ๐ŸŸข | email from ๐ŸŸข | emoji ๐ŸŸข | http url ๐ŸŸข | https url ๐ŸŸข | ipv4 ๐ŸŸข | ipv6 ๐ŸŸข | mac address ๐ŸŸข | mail provider ๐ŸŸข | password ๐ŸŸข | safe email ๐ŸŸข | uri ๐ŸŸข | user name ๐ŸŸข | user name from ๐ŸŸข
location(1) geo location ๐ŸŸข

faker_x's People

Contributors

easazade avatar

Stargazers

 avatar  avatar  avatar Hamid Montazeri avatar Rio  avatar Eingress Ltd avatar Hadi Azarnasab avatar Payam Zahedi avatar Amirmohammad Shams avatar

Watchers

 avatar

faker_x's Issues

Invalid Email with emailFrom()

Hello,
Thank You for such great package,
But I'm facing an issue right now that is:
When I generate the email with emailFrom() method I get instance of 'stringorformat'@yahoo.com,
Code:

   var fakerX = FakerX.defaultInstance;
   emailController.text = fakerX.internet.emailFrom(
                    firstName: nameController.text,
                  );

Please respond asap

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.