Search packages, repositories and app categories

Package detailsv2.2.0

faker

A library for generating fake data. faker is heavily inspired by the Python package faker and, the Ruby package ffaker.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
296K
Likes
942
Pub points
150

Install package

flutter pub add faker

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

Faker is a Flutter/Dart package that generates realistic fake data, inspired by the Python and Ruby counterparts. It provides a wide range of data types including names, addresses, emails, phone numbers, company details, and more. Ideal for testing, prototyping, and seeding databases, it helps create consistent and believable mock data without relying on real user information. The library supports multiple platforms, making it versatile across Android, iOS, Web, macOS, Windows, and Linux. Its simple API allows developers to quickly generate random yet structured data.

Use cases

  • Testing UI components
  • Populating mock databases
  • Prototyping app interfaces
  • Generating sample user data
  • Creating test scenarios

Key features

  • Extensive data generators
  • Cross-platform support
  • Simple and intuitive API
  • Realistic data patterns
  • Easy integration with Flutter

Suitable for

  • Developers in testing environments
  • UI/UX designers prototyping apps
  • Teams building demo applications
  • Anyone needing fake data for development

Considerations

  • Not suitable for production data
  • Data is randomly generated and not unique
  • May require seed control for reproducible tests
  • Limited customization beyond built-in providers

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

faker

Build Status Coverage Status Faker on pub

A library for Dart that generates fake data.

faker is heavily inspired by the Python package faker, and the Ruby package ffaker.

Usage

A simple usage example:

import 'package:faker/faker.dart';

main() {
  var faker = new Faker();

  faker.internet.email();
  // francisco_lebsack@buckridge.com

  faker.internet.ipv6Address();
  // 2450:a5bf:7855:8ce9:3693:58db:50bf:a105

  faker.internet.userName();
  // fiona-ward

  faker.person.name();
  // Fiona Ward

  faker.person.prefix();
  // Mrs.

  faker.person.suffix();
  // Sr.
  
  faker.lorem.sentence();
  // Nec nam aliquam sem et
}

Features and bugs

Please file feature requests and bugs at the issue tracker.

Copyright

Copyright (c) 2015 Jesper Håkansson. See LICENSE for details. Copyright (c) 2013 Emmanuel Oga. Copyright (c) 2012 Daniele Faraglia. Copyright (c) 2007 Benjamin Curtis.

Categories

Dependencies

Dependency list 1 items

Source repository

Projects using this package