random_users 0.1.0

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.

example/random_users_example.dart

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:


dependencies:
  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';
  
Version Uploaded Documentation Archive
0.1.0 Mar 4, 2019 Go to the documentation of random_users 0.1.0 Download random_users 0.1.0 archive
0.0.3 Sep 23, 2016 Go to the documentation of random_users 0.0.3 Download random_users 0.0.3 archive
0.0.2 Sep 21, 2016 Go to the documentation of random_users 0.0.2 Download random_users 0.0.2 archive
0.0.1 Sep 21, 2016 Go to the documentation of random_users 0.0.1 Download random_users 0.0.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
3
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
95
Overall:
Weighted score of the above. [more]
50
Learn more about scoring.

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

  • Dart: 2.3.2
  • pana: 0.12.19

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in primary library package:random_users/random_users.dart.

Maintenance suggestions

Homepage URL is insecure. (-5 points)

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

Dependencies

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