random_users 0.1.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 56

Random Users #

Pub Build Status

Just a static list of Random Users to be used for for all things pulled from https://randomuser.me/.

Usage #

import 'package:random_users/random_users.dart';

// get the same 1000 users every time.
List<RandomUser> users = getUsers(1000);
print('Users: ${users.map((user) => user.firstName)}');

User data currently includes:

  • firstName
  • lastName
  • phoneNumber
  • userName
  • password
  • email
  • gender
  • largePicture
  • mediumPicture
  • thumbNail

Development #

Random Users leverages the dart_dev package for most of its tooling needs, including static analysis, code formatting, running tests, collecting coverage, and serving examples. Check out the dart_dev readme for more information.

Testing - pub run dart_dev test

Formatting - pub run dart_dev format

Changelog #

0.0.3 #

  • Adding a default constructor to RandomUser

0.0.2 #

  • Readme updates

0.0.1 #

  • Initial version, created by Stagehand.
  • Initial rollout with lists of users.


import 'package:random_users/random_users.dart';

main() {
  List<RandomUser> users = getUsers(1000);
  print('Users: ${users.map((user) => user.firstName)}');

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  random_users: ^0.1.0

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:random_users/random_users.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Feb 27, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.5

Health suggestions

Fix lib/src/random_users_base.dart. (-0.50 points)

Analysis of lib/src/random_users_base.dart reported 1 hint:

line 15 col 26: Unnecessary new keyword.

Maintenance suggestions

Homepage URL is insecure. (-5 points)

Update the homepage field and use a secure (https) URL.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.24.3 <3.0.0
dart2_constant ^1.0.0 1.0.2+dart2
Dev dependencies
build_runner >=0.6.0 <2.0.0
build_test >=0.9.0 <2.0.0
coverage >=0.10.0 <0.13.0
dart_dev ^2.0.0
dart_style ^1.0.9
test >=0.12.30 <2.0.0