casvanluijtelaar / faker.dart

generate massive amounts of fake data in dart and flutter
Other
41 stars 7 forks source link

Support creating multiple `Faker` instances #16

Closed ahmednfwela closed 5 months ago

ahmednfwela commented 6 months ago

Currently the only way to access faker is using the singleton accessor Faker.instance, which doesn't work well when we want to generate multiple Fakers, one for each locale, e.g.

final fakerEn = Faker()..setLocale(FakerLocaleType.en);
final fakerAr = Faker()..setLocale(FakerLocaleType.ar);
casvanluijtelaar commented 5 months ago

that's a usecase I did not think about before. will add

casvanluijtelaar commented 5 months ago

supported in Faker 0.2.2 through the Faker.unique() method