AddForm class


AddForm - Bug Creation & Update Form Screen

Purpose:

  • Used to add new bugs or edit existing bugs.
  • Provides input fields for title, description, assigned developer, date, severity, and status.
  • Submits data via BugBloc events (AddBugEvent / UpdateBugEvent).

Features:

  • Handles both Add and Update modes (based on isEditMode flag).
  • Uses StatefulBuilder for local state management of severity & status.
  • Validates input fields before submission.
  • Supports Date Picker for selecting date.

Usage Example:

AddForm(isEditMode: false) // For adding a new bug
AddForm(
  isEditMode: true,
  id: "bugId",
  title: "Bug Title",
  desc: "Bug Description",
  ...
) // For editing an existing bug

Inheritance

Constructors

AddForm({Key? key, required bool? isEditMode, String? title, String? desc, String? date, String? developer, String? id, String? severity, String? status})

Properties

assignedDeveloperController TextEditingController
getter/setter pair
date String?
final
dateController TextEditingController
getter/setter pair
desc String?
final
descriptionController TextEditingController
getter/setter pair
developer String?
final
hashCode int
The hash code for this object.
no setterinherited
id String?
final
isEditMode bool?
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
severity String?
final
status String?
final
title String?
final
titleController TextEditingController
getter/setter pair

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

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