Open EuclidStellar opened 4 weeks ago
[!IMPORTANT]
Review skipped
Auto reviews are disabled on base/target branches other than the default branch.
Please check the settings in the CodeRabbit UI or the
.coderabbit.yaml
file in this repository. To trigger a single review, invoke the@coderabbitai review
command.You can disable this status message by setting the
reviews.review_status
tofalse
in the CodeRabbit configuration file.
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
@EuclidStellar Lets keep this PR open, And you keep pushing further changes to your branch.
Used Reactive Text Form field in code along with form control in last commit
DigitTextField ----> DigitTextFormField
Added more Digit Component enabled with voice commands such as DigitReactiveDropDown First tried to implement it on the Flutter Material 3 widget and then transitioned it to DigitReactiveDropDown
added voice command in Digit Component ( DigitCheckBoxTile ) ( reactive checkbox ) used agreed as a keyword to mark tick in checkbox
added voice command in Digit Component ( DigitCheckBoxTile ) ( reactive checkbox ) used agreed as a keyword to mark tick in checkbox
corrected the header documentation
added DigitTextFormField integrated with voice enabling command
Description
20
This PR adds a voice-command feature to fill a form in the app. The form consists of three fields: Name, Phone Number, and Email. Users can fill these fields by speaking into the microphone. The app uses the
speech_to_text
package to convert speech to text and theflutter_tts
package to convert text to speech. Additionally, the app utilizes theDigitTextField
widget from thedigit_components
package to create the form fields.Features Added:
Voice Command to Fill Form Fields:
Form Validation:
Form
widget to validate the form fields.User Interaction:
IconButton
widget to start and stop listening for voice commands.FocusNode
widget is used to track which field is currently focused.ScaffoldMessenger
widget is used to show a snackbar when the form is successfully submitted.FlutterTts
widget is used to speak the label of the focused field.Packages Used:
Code Overview
Initialization:
speech_to_text
andflutter_tts
objects in theinitState
method.Voice Commands:
_speakLabelText
: Speaks the label of the focused field to guide the user._listen
: Listens for voice commands and updates the form fields with the recognized text.Form Validation:
_submitForm
: Validates the form fields and displays a snackbar on successful submission.UI Components:
DigitTextField
for the form fields.IconButton
to start and stop listening for voice commands.Focus
to track the focus state of the form fields.Checklist
speech_to_text
andflutter_tts
packages.DigitTextField
fromdigit_components
package.Testing
speech_to_text
,flutter_tts
, anddigit_components
packages.References
Additional Notes
Documented the code for better readability