-
-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
seed for random generator #29
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,4 @@ | ||
import '../faker.dart'; | ||
import 'data/person/firstnames.dart'; | ||
import 'data/user_agent/user_agent.dart'; | ||
import 'data/user_agent/user_agent_data.dart'; | ||
import 'data/person/lastnames.dart'; | ||
import 'random_generator.dart'; | ||
|
||
|
@@ -152,25 +149,4 @@ class Internet { | |
/// faker.internet.password(); | ||
/// ``` | ||
String password({int length = 10}) => random.string(length, min: length); | ||
|
||
/// Generates an User Agent from Predefined Dictionary | ||
/// with the given [osName] if provided. | ||
/// if not provided [osName] is an empty String or [''] | ||
/// | ||
/// Example: | ||
/// ```dart | ||
/// faker.internet.userAgent(); | ||
/// faker.internet.userAgent(osName:'ios'); | ||
/// ``` | ||
String userAgent({String osName = ''}) => random | ||
.element(UserAgents.fromJson(userAgentDatas) | ||
.userAgents | ||
.map((e) => e) | ||
.where( | ||
(element) => | ||
element.osName.toLowerCase().contains(osName.toLowerCase()), | ||
) | ||
.toList()) | ||
.userAgent | ||
.toString(); | ||
Comment on lines
-155
to
-175
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why are these being deleted? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep. My bad. It seems that I used and older fork of faker, without the userAgent and image commit. Can you omit those changes, or should I make another pull request? Only added a method in random_generator.dart There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please make a new commit that brings those deletions back if possible. |
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why remove
image
?