Skip to content
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

Remover operador null audio_record_page #284

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

RoxyRoses
Copy link
Contributor

Pull Request: Remoção de Operador Condicional Redundante no AudioRecordPage

Resumo

Este pull request simplifica o código na página AudioRecordPage ao remover o operador condicional (?.) desnecessário na chamada de WidgetsBinding.instance. Essa alteração garante compatibilidade com as versões mais recentes do Flutter e melhora a legibilidade do código.


Alterações Realizadas

  1. Remoção do Operador Condicional:
    • Atualizado o método addPostFrameCallback para remover o uso do operador ?. em WidgetsBinding.instance.

Diferenças no Código

diff --git a/lib/app/features/help_center/presentation/pages/audio/audio_record_page.dart b/lib/app/features/help_center/presentation/pages/audio/audio_record_page.dart
index dcd2b59d..d5519d60 100644
--- a/lib/app/features/help_center/presentation/pages/audio/audio_record_page.dart
+++ b/lib/app/features/help_center/presentation/pages/audio/audio_record_page.dart
@@ -26,7 +26,7 @@ class _AudioRecordState
   @override
   void initState() {
     super.initState();
-    WidgetsBinding.instance?.addPostFrameCallback((timeStamp) async {
+    WidgetsBinding.instance.addPostFrameCallback((timeStamp) async {
       await controller.startAudioRecord();
     });
 

@RoxyRoses RoxyRoses self-assigned this Dec 9, 2024
@RoxyRoses RoxyRoses requested a review from a team as a code owner December 9, 2024 18:13
@RoxyRoses RoxyRoses linked an issue Dec 9, 2024 that may be closed by this pull request
Copy link

sonarcloud bot commented Dec 9, 2024

Copy link

codeclimate bot commented Dec 9, 2024

Code Climate has analyzed commit d22543e and detected 0 issues on this pull request.

View more on Code Climate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[fix] Operador Null-Aware Desnecessário em audio_record_page.dart
1 participant