random_datetime 0.0.1 copy "random_datetime: ^0.0.1" to clipboard
random_datetime: ^0.0.1 copied to clipboard

Get randomized datetime objects. The plugin always you to add time-unit wise limitations to the randomized datetime objects. For example, Randomized DateTime where time is between 7 to 10 PM.

example/random_datetime_example.dart

import 'package:random_datetime/random_datetime.dart';
import 'package:random_datetime/range.dart';
import 'package:random_datetime/range_options.dart';

void main() async {
  final now = DateTime.now();

  final RandomDateTime randomDT = RandomDateTime(
      options: RandomOptions(
    yearRange: Range(end: now.year + 1),
    dayRange: Range(start: now.day + 3, end: now.day + 14),
    hourRange: const Range(start: 22, end: 10),
  ));

  for (var i = 0; i < 5; i++) {
    print(randomDT.random());
  }
}
0
likes
0
points
56
downloads

Publisher

unverified uploader

Weekly Downloads

Get randomized datetime objects. The plugin always you to add time-unit wise limitations to the randomized datetime objects. For example, Randomized DateTime where time is between 7 to 10 PM.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on random_datetime