FeedbackDraft class

Data payload for submitting user feedback, bug reports, and suggestions.

Encapsulates title, description, reporter info, platform runtime, and optional diagnostics.

Example

final draft = FeedbackDraft(
  title: 'Dark mode contrast is too low in settings',
  description: 'The toggle button text is hard to read when dark mode is enabled.',
  reporterName: 'Jordan',
  reporterEmail: 'jordan@example.com',
  platform: FeedbackPlatform.current,
  appVersion: '1.2.0',
  buildNumber: '42',
  metadata: {'screen': 'SettingsView', 'osVersion': '17.4'},
);

final result = await client.submit(draft);
print('Submitted ID: ${result.submissionId}');

Constructors

FeedbackDraft({required String title, required String description, String? reporterName, String? reporterEmail, required FeedbackPlatform platform, String? appVersion, String? buildNumber, Map<String, String> metadata = const {}, List<FeedbackAttachment> attachments = const []})
Creates a FeedbackDraft ready for submission.
const

Properties

appVersion String?
Application version string (e.g. '1.0.4').
final
attachments List<FeedbackAttachment>
List of uploaded screenshot or log attachments.
final
buildNumber String?
Application build or compilation number (e.g. '12').
final
description String
Detailed description of the user feedback or steps to reproduce.
final
hashCode int
The hash code for this object.
no setterinherited
metadata Map<String, String>
Custom key-value diagnostic metadata (device info, screen names, state).
final
platform FeedbackPlatform
Target platform where the feedback was generated.
final
reporterEmail String?
Optional email address for reply notifications.
final
reporterName String?
Optional self-reported name of the submitting user.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
title String
Short title summarizing the feedback or issue.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson({required String appKey, required String submittedAt}) Map<String, dynamic>
Serializes FeedbackDraft to a JSON payload ready for POST /api/v1/feedback.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited