Skip to content
pubscout

random_x

0.3.1, released 4 years ago by josephyaduvanshi.dev

A Dart library providing random data generation utilities for Flutter and Dart projects

WASM-ready
$ flutter pub add random_x
Source repository

What it does

It offers functions to generate random names, colors, UUIDs, credit card numbers, SSNs, user details, and more. The API is simple and stateless, returning values directly.

AI-written summary of version 0.3.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need quick random data for testing or demo purposes
  • You want a single dependency for various random utilities
  • You prefer a lightweight, pure Dart implementation

Skip it when

  • You need cryptographically secure randomness
  • You require a comprehensive data mocking framework with fixtures
  • You are building a production-grade data generator with validation

Strengths

  • All-in-one random utilities in one package
  • Zero build_runner or codegen required
  • Supports Flutter and web platforms

Weaknesses

  • No cryptographic security guarantees
  • Limited documentation on edge cases
  • No official support for custom data schemas

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
1

Add dependency in pubspec and import 'package:random_x/random_x.dart';

import 'package:random_x/random_x.dart';

void main(){
  print(RndX.randomColor);
  print(RndX.randomUUID);
  print(RndX.randomName());
}

Works with

Packages commonly used together with random_x: ones it builds on, ones built on it, and its own family.