Launch Offer

Flutter Foundations Course

Buy now and get 25% off the regular price!

View Course

How to quickly generate some fake data when building Flutter UIs

Are you building some UI in Flutter and need to show some temporary data?

The faker package makes this super easy!

You can use it to generate addresses, names, food, dates, sports... you name it!

Here's an example:

import 'package:faker/faker.dart'; void main() { final faker = 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 }

Note: new random data will be generated every time a new Faker() object is created, including when you hot-reload and hot-restart.

Happy coding!

Want More?

Invest in yourself with my high-quality Flutter courses.

The Complete Dart Developer Guide

The Complete Dart Developer Guide

Learn Dart Programming in depth. Includes: basic to advanced topics, exercises, and projects. Fully updated to Dart 2.15.

The Complete Flutter Course Bundle

The Complete Flutter Course Bundle

Learn about State Management, App Architecture, Navigation, Testing, and much more by building a full-stack Flutter eCommerce app on iOS, Android, and web.

Flutter Animations Masterclass - Full Course

Flutter Animations Masterclass - Full Course

Master Flutter animations and build a completely custom habit tracking application.