v2.0.1
mock_data
Dart를 사용하여 임의의 데이터를 생성합니다. 임의의 문자열, 정수, 이름, 색상, IP 주소, UUID, URL 및 날짜를 생성하는 데 사용할 수 있습니다.
29좋아요 2.3천30일 다운로드160Pub 점수
AndroidiOSWebmacOSWindowsLinux
Dart를 사용하여 랜덤 데이터(문자열, 정수, IP 등)를 생성합니다.
아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.
API provides generation of:
A simple usage example:
import 'package:mock_data/mock_data.dart';
main() {
mockName(); // Generate male or female first name.
mockName('male'); // Generate male first name.
mockName('female'); // Generate female first name.
mockInteger(1, 6); // Generate integer in range from 1 do 6.
mockString(16); // Generate string of length 16.
mockIPv4(); // Generate IPv4 represented with
// format(default is '*.*.*.*') as String.
mockIPv6(); // Generate IPv6, same usage as with IPv4.
mockColor('hex'); // Generate color represented in hex format.
mockColor('rgb'); // Generate color represented in RGB format.
mockUUID(); // Generate UUIDv4
mockLocation(); // Generate random location.
mockLocation(53.55, 108.14, 1000); // Generate random location in 1000 m radius from the specified coordinates.
}
These are some basic examples. There are many more methods and they all support tweeking of parameters to suit you in generating random data. By reading examples you can learn more about functionality and usage of mock_data
의존성 목록 2 개
^1.17.5^1.11.0사용 목적에 따라 검색하고 개발 활동을 비교한 뒤 원본 저장소에서 요구 사항을 확인하세요.
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗