mock_data 1.0.1 copy "mock_data: ^1.0.1" to clipboard
mock_data: ^1.0.1 copied to clipboard

outdated

Generate random data(string, integer, IPs, etc...)

example/mock_data_example.dart

import 'package:mock_data/mock_data.dart';

main() {

  // Mock string of given length and group of characters.
  mockString(); // default length of 16 and include of '!'.
  mockString(10);
  mockString(15, 'a#');
  mockString(3, '!');
  mockString(7, 'aA');

  // Mock integer in range of min to max.
  mockInteger(); // default min set to 1 and max to 10.
  mockInteger(3, 30);
  mockInteger(-15, 5);
  mockInteger(-25, -15);

  // Mock IPv4 with given format.
  mockIPv4(); // default format set to '*.*.*.*'.
  mockIPv4('192.168.0.*');
  mockIPv4('192.168.*.*');
  mockIPv4('192.*.*.55');

  // Generate range of mocks of particular function(more at [mockRange]).
  mockRange(mockString, 3);
  mockRange(mockInteger, 5, min: 3, max: 15);
  mockRange(mockIPv4, 7, format: '*.*.0.0');

}
29
likes
0
points
845
downloads

Publisher

unverified uploader

Weekly Downloads

Generate random data(string, integer, IPs, etc...)

Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on mock_data