generateFieldValue method
Generate a single field value given a field "type" (e.g., name, email, bio, product_description).
Implementation
@override
Future<String> generateFieldValue({
required FieldType fieldType,
String? context,
Duration timeout = const Duration(seconds: 15),
}) async {
switch (fieldType) {
case FieldType.name:
return 'John Doe';
case FieldType.email:
return 'john.doe@example.com';
case FieldType.phone:
return '+1 202 555 0132';
case FieldType.bio:
case FieldType.description:
return 'Passionate maker and urban explorer.';
case FieldType.date:
return DateTime.now().toIso8601String().split('T').first;
case FieldType.address:
return '123 Main St';
case FieldType.city:
return 'New York';
case FieldType.company:
return 'ACME Inc';
case FieldType.time:
return '12:00 PM';
default:
return 'Sample ${fieldType.name}';
}
}