random_x 0.3.1 copy "random_x: ^0.3.1" to clipboard
random_x: ^0.3.1 copied to clipboard

A Dart Library for all of your random needs you'll ever require in your projects.

RandomX

RandomX Pub release GitHub Release Date GitHub issues GitHub top language Likes Popularity GitHub license support

Show some ❤️ and star the repo ⭐ ⭐. #

GitHub followers Twitter Follow

Open Source Love


random_x is a 100% free Dart open-source minimalist Library built with Dart SDK to make Flutter development easier and more joyful than ever.

Text("RandomX The Library For All Of Your Random Needs"),

Table of contents #

Getting started #

In the pubspec.yaml of your flutter project, add the following dependency:

dependencies:
  ...
  random_x: <latest_version>

In your library add the following import:

import 'package:random_x/random_x.dart';

Example App #

You can easily check our few features by accessing our Example App

Usage #

Random_X is a Random Library For all of your random needs for your projects that you'll ever need(possibly). Include it in your build method like:

Text(RndX.generateName()),
Text(RndX.randomSSN(withdashes: true)),

It also offers several configurable parameters in a variety of functions, which you can utilize and tailor to your needs. If you don't want the customization, I've given default values for each functions.


Why use random_x? #

random_x is known for :

RandomX RandomX
Absolute top-notch in terms of the speed, efficiency, and compatibility 100% free & open-source
101% ready for production One library for all of your random needs

RandomX


RandomX Features #

There are lots and lots of features included in the library which is practically messy to explain all here but I will try to give you an glimpse of some of an amazing features of the Package.

Complete User Details #

Row(children:[
   Text(RndX.randomCompletePersonDetails().name),
   Text(RndX.randomCompletePersonDetails().gender),
   Text(RndX.randomCompletePersonDetails().race),
   Text(RndX.randomCompletePersonDetails().religion),
   Text(RndX.randomCompletePersonDetails().birthDay),
   ++ many more....
],)

Random Colors #

          /// Generating a random color and applying it to the text.
          Text(
            "Generate Random Color",
            style: TextStyle(
              color: RndX.randomColor,
            ),
          ),

          /// Generating a random color with alpha.
          Text(
            "Generate Random Color With Alpha",
            style: TextStyle(
              color: RndX.randomColorWithAlpha,
            ),
          ),

          /// Generating a random color with random opacity.
          Text(
            "Generate Random Color With Random Opacity",
            style: TextStyle(
              color: RndX.randomColorWithOpacity,
            ),
          ),

          /// Generating a random color with random opacity and greenish color.
          Text(
            "Generate Random Color With Random Opacity Greenish",
            style: TextStyle(
              color: RndX.randomColorWithOpacityAndGreen,
            ),
          ),

          /// Generating a random color with random opacity and greenish.
          Text(
            "Generate Random Color With Random Opacity Redish",
            style: TextStyle(
              color: RndX.randomColorWithOpacityAndGreen,
            ),
          ),

          /// Generating a random primary color and applying it to the text.
          Text(
            "Generate Random Primary Color",
            style: TextStyle(
              color: RndX.randomPrimaryColor,
            ),
          ),

          /// Generating a random accent color.
          Text(
            "Generate Random Accent Color",
            style: TextStyle(
              color: RndX.randomAccentColor,
            ),
          ),

Random Strings #

Text(RndX.randomString(type: RandomCharStringType.alphaNumerical, length: 10)),
The parameters are type and Length which you can easily customize as per your needs.

Random Credit Cards #

Row(
      children: [
        Text(RndX.randomFullCreditCard().ccn),
        Text(RndX.randomFullCreditCard().expiryDate),
        Text(RndX.randomFullCreditCard().cvv),
        Text(RndX.randomFullCreditCard().cardType),

      ],
    )

Random UUID #

   Text(RndX.genUUID()),

It generated version 4 of UUID with very subtle algoritm.

Random Name #

Text(RndX.generateName()),

Random Addresses #

 Row(
      children: [
        Text(RndX.randomAddress().address1),
        Text(RndX.randomAddress().address2),
        Text(RndX.randomAddress().city),
        Text(RndX.randomAddress().postalCode),
        Text(RndX.randomAddress().state),
        Text(RndX.randomAddress().coordinates.lat.toString()),
        Text(RndX.randomAddress().coordinates.lng.toString()),
      ],
    );

You can get random USA addresses using randomAddress function and then using the same instance to access the other instances of addresses.

Random UserAgent #

Row(
      children: [
        Text(RndX.getRandomUA()),
        Text(RndX.getRandomUA(count: 4, type: UserAgentType.macOs), ),
        Text(RndX.getRandomUA(count: 4, type: UserAgentType.mobile), ),
      ],
    );

You can easily generate random UA with custom configuration as well as shown above, there are few more parameters more there you can explore yourselves.


Contributing #

random_x is 100% free and open source. We encourage and endorse an engaged, strong community that accepts contributions from the general public– which includes you. You may contribute to the expanding community of random_x.

  • Pick up any issue marked with "good first issue"
  • Fix a bug
  • Write and somewhat enhance documentation. Documentation is really important to us. We would welcome assistance translating our documents into multiple languages.
  • If you are a developer, feel free to check out the source and submit pull requests.
  • Please don't forget to like, follow, and star our repo!

❤️ Found this project useful? #

If you considered this project useful, please consider giving it a ⭐ on Github, sharing it on social media, and giving it a like on PUB.dev.


Project Created And Maintained By #

Joseph Yaduvanshi #

TECH ENTHUSIAST || APP DEVELOPMENT ❤️ || eatSleepCode — repeat👨🏻‍💻 | Okay BYEE!

Donate #

If you found this project helpful or you learned something from the source code and want to thank me, consider buying me a cup of ☕

  • [Bitcoin Address] 1JDas41DHqkfZb6VmXRndpQqUxNTTL6TFw

Active Contributors #

Any new Contributors are welcomed.

Code and documentation Copyright 2022 Joseph Yaduvanshi. Code released under the Apache License. Docs released under Creative Commons.

37
likes
160
pub points
82%
popularity

Publisher

verified publisherjosephyaduvanshi.dev

A Dart Library for all of your random needs you'll ever require in your projects.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

crypto, flutter

More

Packages that depend on random_x