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


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

🚀 Before you start

faker_x was not create just to be a typicall 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 makes sence 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 valueing dart developers time, faker_x uses code generation to to generate its library code, so if you wish to add new resources or fake value generators, you only need 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 is 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 Contribution Guide. It is written in details 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 resource and values that are available for them.

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