GetStream / stream-chat-flutter

Flutter Chat SDK - Build your own chat app experience using Dart, Flutter and the Stream Chat Messaging API.
https://getstream.io/chat/sdk/flutter/
Other
880 stars 313 forks source link

Reply & Show in chat functionality doesn't work in Attachment Actions Modal #1918

Closed mrcodefrost closed 1 week ago

mrcodefrost commented 1 month ago

Which packages are you using?

stream_chat_flutter

On what platforms did you experience the issue?

iOS, Android

What version are you using?

stream_chat_flutter: 7.2.0-hotfix.1 connectivity_plus: 5.0.2

What happened?

Expected Behavior : 1) tapping 'reply' should tag the attachment file (photo, video etc) and revert to it with a new message. Basically do what reply means. 2) tapping 'show in chat' should show the message in the chat screen.

Actual Behavior : Nothing happens on tapping either reply or show in chat.

image

Steps to reproduce

1. Go to Chat screen 
2. Send an attachment like video or pic 
3. tap on the attachment and open the 3 dots at top right
4. click on reply or show in chat

Supporting info to reproduce

class ChatScreen extends StatelessWidget {
  const ChatScreen({super.key});

  @override
  Widget build(BuildContext context) {
    return SafeArea(
      child: Scaffold(
        appBar: const StreamChannelHeader(),
        body: Column(
          children: <Widget>[
            Expanded(
              child: StreamMessageListView(
                markReadWhenAtTheBottom: true,
                messageBuilder: (context, details, messageList, defaultImpl) {
                  return defaultImpl.copyWith(

                      attachmentActionsModalBuilder:
                          (buildContext, attachment, attachmentActionsModal) {
                        return attachmentActionsModal.copyWith();
                      });
                },
              ),
            ),
            StreamMessageInput(),
          ],
        ),
      ),
    );
  }
}

Relevant log output

NO RELEVANT LOG OUTPUT

I/flutter ( 3901): 2024-05-14 17:22:43.564776 ℹ️ 📡 Got 1 channels from api 
D/EGL_emulation( 3901): app_time_stats: avg=200.25ms min=40.64ms max=458.87ms count=6
E/FrameTracker( 3901): force finish cuj, time out: J<IME_INSETS_ANIMATION::1@1@com.geniex.geniex>
W/FrameTracker( 3901): Missed App frame:UNKNOWN: 74, 3104928, 0, CUJ=J<IME_INSETS_ANIMATION::1@1@com.geniex.geniex>
W/FrameTracker( 3901): Missed SF frame:UNKNOWN: 74, 3104928, 0, CUJ=J<IME_INSETS_ANIMATION::1@1@com.geniex.geniex>
[GETX] GOING TO ROUTE /StreamChannel
D/EGL_emulation( 3901): app_time_stats: avg=102.66ms min=23.23ms max=190.60ms count=9
D/EGL_emulation( 3901): app_time_stats: avg=662.75ms min=632.32ms max=693.17ms count=2
D/EGL_emulation( 3901): app_time_stats: avg=250.06ms min=130.60ms max=397.56ms count=4
D/EGL_emulation( 3901): app_time_stats: avg=189.80ms min=42.20ms max=498.15ms count=6
D/EGL_emulation( 3901): app_time_stats: avg=158.33ms min=79.49ms max=219.80ms count=7
I/flutter ( 3901): 2024-05-14 17:22:50.799633 ℹ️ 🔌 Needs to reconnect : false 
D/EGL_emulation( 3901): app_time_stats: avg=93.09ms min=25.27ms max=223.71ms count=9
D/EGL_emulation( 3901): app_time_stats: avg=177.23ms min=35.40ms max=341.46ms count=7
D/EGL_emulation( 3901): app_time_stats: avg=995.15ms min=984.70ms max=1005.59ms count=2
D/EGL_emulation( 3901): app_time_stats: avg=115.40ms min=48.58ms max=379.79ms count=8
D/EGL_emulation( 3901): app_time_stats: avg=534.94ms min=33.72ms max=1478.60ms count=3
I/flutter ( 3901): 2024-05-14 17:23:00.781690 ℹ️ 🔌 Sending Event: health.check 
I/flutter ( 3901): 2024-05-14 17:23:00.798889 ℹ️ 🔌 Needs to reconnect : false 
I/flutter ( 3901): 2024-05-14 17:23:00.807789 ℹ️ 🔌 Event received: health.check 
I/flutter ( 3901): 2024-05-14 17:23:00.808394 ℹ️ 🔌 HealthCheck received : 65e9ed49-0a09-324a-0000-00000166ebde 
I/flutter ( 3901): 2024-05-14 17:23:10.800169 ℹ️ 🔌 Needs to reconnect : false

Flutter analyze output

NO RELEVANT ERRORS 

warning • The value of the local variable 'settings' isn't used • lib/features/common/auth/data/provider/remote/firebase_auth_service.dart:6:24 •
       unused_local_variable
   info • Don't invoke 'print' in production code • lib/features/common/auth/data/provider/remote/firebase_auth_service.dart:20:5 • avoid_print
   info • Don't invoke 'print' in production code • lib/features/common/auth/data/provider/remote/login_api_service.dart:20:7 • avoid_print
   info • Don't invoke 'print' in production code • lib/features/common/auth/data/provider/remote/login_api_service.dart:22:7 • avoid_print
   info • Don't invoke 'print' in production code • lib/features/common/auth/data/provider/remote/signup_user_api_service.dart:19:7 • avoid_print
   info • Don't invoke 'print' in production code • lib/features/common/auth/data/provider/remote/signup_user_api_service.dart:20:7 • avoid_print
   info • Don't invoke 'print' in production code • lib/features/common/auth/data/provider/remote/verify_otp_service.dart:24:9 • avoid_print
   info • Don't invoke 'print' in production code • lib/features/common/auth/data/provider/remote/verify_otp_service.dart:26:13 • avoid_print
   info • Don't invoke 'print' in production code • lib/features/common/auth/data/provider/remote/verify_otp_service.dart:30:13 • avoid_print
   info • Don't invoke 'print' in production code • lib/features/common/auth/data/provider/remote/verify_otp_service.dart:34:13 • avoid_print
   info • Don't invoke 'print' in production code • lib/features/common/auth/data/provider/remote/verify_otp_service.dart:38:11 • avoid_print
warning • The field doesn't override an inherited getter or setter •
       lib/features/common/auth/presentation/controllers/verify_otp/verify_otp_controller.dart:13:9 • override_on_non_overriding_member
warning • This class (or a class that this class inherits from) is marked as '@immutable', but one or more of its instance fields aren't final:
       SignupDataInputScreen.submitKey • lib/features/common/auth/presentation/views/signup/signup_data_input_screen.dart:12:7 • must_be_immutable
   info • The type of the right operand ('String') isn't a subtype or a supertype of the left operand ('TextEditingController') •
          lib/features/common/auth/presentation/views/signup/signup_data_input_screen.dart:142:81 • unrelated_type_equality_checks
   info • The type of the right operand ('String') isn't a subtype or a supertype of the left operand ('TextEditingController') •
          lib/features/common/auth/presentation/views/signup/signup_data_input_screen.dart:143:83 • unrelated_type_equality_checks
   info • Don't invoke 'print' in production code • lib/features/common/auth/presentation/views/signup/signup_data_input_screen.dart:152:33 • avoid_print
warning • Unused import: 'package:get_storage/get_storage.dart' • lib/features/common/auth/presentation/views/verify_otp/verify_otp_screen.dart:3:8 •
       unused_import
warning • The value of the field '_buyFilterController' isn't used • lib/features/common/basic_filters/presentation/views/buy_filter_screen.dart:7:29 •
       unused_field
warning • The value of the field '_rentFilterController' isn't used • lib/features/common/basic_filters/presentation/views/rent_filter_screen.dart:8:30 •
       unused_field
   info • The constant name 'VERIFIED' isn't a lowerCamelCase identifier • lib/features/common/data/status_enum.dart:1:26 • constant_identifier_names
   info • The constant name 'CREATED' isn't a lowerCamelCase identifier • lib/features/common/data/status_enum.dart:1:35 • constant_identifier_names
   info • The constant name 'ACTIVE' isn't a lowerCamelCase identifier • lib/features/common/data/status_enum.dart:1:43 • constant_identifier_names
   info • Constructors in '@immutable' classes should be declared as 'const' •
          lib/features/common/property_details/presentation/views/widgets/like_button.dart:9:3 • prefer_const_constructors_in_immutables
   info • Constructors in '@immutable' classes should be declared as 'const' •
          lib/features/common/property_details/presentation/views/widgets/notes_button.dart:9:3 • prefer_const_constructors_in_immutables
   info • Constructors in '@immutable' classes should be declared as 'const' •
          lib/features/common/property_details/presentation/views/widgets/share_button.dart:9:3 • prefer_const_constructors_in_immutables
warning • The value of the field '_welcomeController' isn't used • lib/features/common/welcome/presentation/views/welcome_screen.dart:7:27 • unused_field
   info • 'headline6' is deprecated and shouldn't be used. Use titleLarge instead. This feature was deprecated after v3.1.0-0.0.pre •
          lib/features/common/widgets/dialogs/error_dialog.dart:28:46 • deprecated_member_use
   info • 'WillPopScope' is deprecated and shouldn't be used. Use PopScope instead. This feature was deprecated after v3.12.0-1.0.pre •
          lib/features/common/widgets/dialogs/loading_dialog.dart:13:12 • deprecated_member_use
   info • 'WillPopScope.new' is deprecated and shouldn't be used. Use PopScope instead. This feature was deprecated after v3.12.0-1.0.pre •
          lib/features/common/widgets/dialogs/loading_dialog.dart:13:12 • deprecated_member_use
   info • The imported package 'http_parser' isn't a dependency of the importing package •
          lib/features/customer/consent/data/provider/remote/save_consent_verify_api_service.dart:7:8 • depend_on_referenced_packages
   info • The local variable '_setupUploadIdController' starts with an underscore •
          lib/features/customer/consent/data/provider/remote/save_consent_verify_api_service.dart:19:33 • no_leading_underscores_for_local_identifiers
   info • Don't invoke 'print' in production code • lib/features/customer/consent/data/provider/remote/save_consent_verify_api_service.dart:40:3 • avoid_print
   info • Don't invoke 'print' in production code • lib/features/customer/consent/data/provider/remote/save_consent_verify_api_service.dart:41:3 • avoid_print
   info • Don't invoke 'print' in production code • lib/features/customer/consent/data/provider/remote/save_consent_verify_api_service.dart:53:7 • avoid_print
   info • Don't invoke 'print' in production code • lib/features/customer/consent/data/provider/remote/save_consent_verify_api_service.dart:63:7 • avoid_print
   info • Don't invoke 'print' in production code • lib/features/customer/consent/data/provider/remote/save_consent_verify_api_service.dart:73:5 • avoid_print
warning • Unused import: '../../data/provider/remote/get_user_by_id_service.dart' •
       lib/features/customer/consent/presentation/controllers/setup_agent_controller.dart:6:8 • unused_import
   info • Don't invoke 'print' in production code • lib/features/customer/consent/presentation/controllers/setup_agent_controller.dart:16:5 • avoid_print
warning • Unused import: 'dart:io' • lib/features/customer/consent/presentation/controllers/setup_select_id_controller.dart:1:8 • unused_import
warning • Unused import: 'package:image_picker/image_picker.dart' • lib/features/customer/consent/presentation/controllers/setup_select_id_controller.dart:4:8
       • unused_import
   info • The file name 'setup_Identity_screen.dart' isn't a lower_case_with_underscores identifier •
          lib/features/customer/consent/presentation/views/setting_up/setup_Identity_screen.dart:1:1 • file_names
   info • Unnecessary instance of 'Container' • lib/features/customer/consent/presentation/views/setting_up/setup_Identity_screen.dart:24:20 •
          avoid_unnecessary_containers
warning • Unused import: 'package:geniex/utils/preference_manager.dart' •
       lib/features/customer/consent/presentation/views/setting_up/setup_agent_one_screen.dart:2:8 • unused_import
warning • Unused import: '../../../../../../utils/constants/string_constants.dart' •
       lib/features/customer/consent/presentation/views/setting_up/setup_agent_one_screen.dart:3:8 • unused_import
warning • Unused import: '../../../data/provider/remote/get_user_by_id_service.dart' •
       lib/features/customer/consent/presentation/views/setting_up/setup_agent_one_screen.dart:10:8 • unused_import
warning • Unused import: '../../controllers/setup_upload_id_controller.dart' •
       lib/features/customer/consent/presentation/views/setting_up/setup_agent_one_screen.dart:12:8 • unused_import
warning • Unused import: '../../controllers/setup_upload_id_controller.dart' •
       lib/features/customer/consent/presentation/views/setting_up/setup_agent_two_screen.dart:3:8 • unused_import
warning • Unused import: '../../../../../../utils/constants/string_constants.dart' •
       lib/features/customer/consent/presentation/views/setting_up/setup_agent_two_screen.dart:7:8 • unused_import
   info • Constructors in '@immutable' classes should be declared as 'const' •
          lib/features/customer/consent/presentation/views/setting_up/setup_agent_two_screen.dart:13:3 • prefer_const_constructors_in_immutables
   info • The constant name 'DriversLicence' isn't a lowerCamelCase identifier •
          lib/features/customer/consent/presentation/views/setting_up/setup_select_id_screen.dart:16:13 • constant_identifier_names
   info • The constant name 'Passport' isn't a lowerCamelCase identifier •
          lib/features/customer/consent/presentation/views/setting_up/setup_select_id_screen.dart:16:29 • constant_identifier_names
   info • The constant name 'Adharcard' isn't a lowerCamelCase identifier •
          lib/features/customer/consent/presentation/views/setting_up/setup_select_id_screen.dart:16:39 • constant_identifier_names
warning • Unused import: '../../../../../../page_routes/page_route_constant.dart' •
       lib/features/customer/consent/presentation/views/setting_up/setup_selfie_screen.dart:4:8 • unused_import
warning • Unused import: '../../controllers/selfie_controller.dart' • lib/features/customer/consent/presentation/views/setting_up/setup_selfie_screen.dart:8:8
       • unused_import
   info • Constructors in '@immutable' classes should be declared as 'const' •
          lib/features/customer/consent/presentation/views/setting_up/setup_selfie_screen.dart:18:3 • prefer_const_constructors_in_immutables
warning • The '?' is unnecessary because 'dynamic' is nullable without it • lib/features/customer/onboarding/data/model/localities_model.dart:2:10 •
       unnecessary_question_mark
warning • The '?' is unnecessary because 'dynamic' is nullable without it • lib/features/customer/onboarding/data/model/localities_model.dart:3:10 •
       unnecessary_question_mark
warning • The '?' is unnecessary because 'dynamic' is nullable without it • lib/features/customer/onboarding/data/model/localities_model.dart:4:10 •
       unnecessary_question_mark
warning • The '?' is unnecessary because 'dynamic' is nullable without it • lib/features/customer/onboarding/data/model/property_preference_model.dart:8:10 •
       unnecessary_question_mark
warning • The '?' is unnecessary because 'dynamic' is nullable without it • lib/features/customer/onboarding/data/model/property_preference_model.dart:9:10 •
       unnecessary_question_mark
   info • Unnecessary 'new' keyword • lib/features/customer/onboarding/data/model/property_preference_model.dart:36:39 • unnecessary_new
   info • Unnecessary constructor invocation • lib/features/customer/onboarding/data/model/property_preference_model.dart:36:39 • prefer_collection_literals
warning • The '?' is unnecessary because 'dynamic' is nullable without it • lib/features/customer/onboarding/data/model/review_user_interests_model.dart:8:10
       • unnecessary_question_mark
warning • The '?' is unnecessary because 'dynamic' is nullable without it • lib/features/customer/onboarding/data/model/review_user_interests_model.dart:9:10
       • unnecessary_question_mark
warning • The '?' is unnecessary because 'dynamic' is nullable without it • lib/features/customer/onboarding/data/model/review_user_interests_model.dart:10:10
       • unnecessary_question_mark
warning • The '?' is unnecessary because 'dynamic' is nullable without it • lib/features/customer/onboarding/data/model/review_user_interests_model.dart:11:10
       • unnecessary_question_mark
   info • Don't invoke 'print' in production code • lib/features/customer/onboarding/data/provider/remote/budget_preference_api_service.dart:19:5 •
          avoid_print
   info • Don't invoke 'print' in production code • lib/features/customer/onboarding/data/provider/remote/budget_preference_api_service.dart:20:5 •
          avoid_print
   info • Don't invoke 'print' in production code • lib/features/customer/onboarding/data/provider/remote/location_preference_api_service.dart:20:5 •
          avoid_print
   info • Don't invoke 'print' in production code • lib/features/customer/onboarding/data/provider/remote/location_preference_api_service.dart:21:5 •
          avoid_print
   info • Don't invoke 'print' in production code • lib/features/customer/onboarding/data/provider/remote/location_preference_api_service.dart:30:7 •
          avoid_print
   info • Don't invoke 'print' in production code • lib/features/customer/onboarding/data/provider/remote/location_preference_api_service.dart:32:5 •
          avoid_print
   info • Don't invoke 'print' in production code • lib/features/customer/onboarding/data/provider/remote/others_preference_api_service.dart:21:5 •
          avoid_print
   info • Don't invoke 'print' in production code • lib/features/customer/onboarding/data/provider/remote/others_preference_api_service.dart:22:5 •
          avoid_print
   info • Don't invoke 'print' in production code • lib/features/customer/onboarding/data/provider/remote/property_preference_api_service.dart:24:5 •
          avoid_print
   info • Don't invoke 'print' in production code • lib/features/customer/onboarding/data/provider/remote/property_preference_api_service.dart:25:5 •
          avoid_print
   info • Don't invoke 'print' in production code • lib/features/customer/onboarding/data/provider/remote/review_user_interests_api_service.dart:31:5 •
          avoid_print
   info • Don't invoke 'print' in production code • lib/features/customer/onboarding/data/provider/remote/review_user_interests_api_service.dart:32:5 •
          avoid_print
warning • The member 'value' can only be used within instance members of subclasses of 'package:get/get_rx/src/rx_types/rx_iterables/rx_list.dart' •
       lib/features/customer/onboarding/data/provider/remote/review_user_interests_api_service.dart:51:73 • invalid_use_of_protected_member
   info • Don't invoke 'print' in production code • lib/features/customer/onboarding/data/provider/remote/review_user_interests_api_service.dart:72:5 •
          avoid_print
   info • Don't invoke 'print' in production code • lib/features/customer/onboarding/data/provider/remote/review_user_interests_api_service.dart:73:5 •
          avoid_print
   info • Constructors in '@immutable' classes should be declared as 'const' •
          lib/features/customer/onboarding/presentation/views/budget_preference/budget_screen.dart:13:3 • prefer_const_constructors_in_immutables
warning • Unused import: '../../controllers/property_preference_controller.dart' •
       lib/features/customer/onboarding/presentation/views/budget_preference/finance_advice_screen.dart:5:8 • unused_import
warning • This class (or a class that this class inherits from) is marked as '@immutable', but one or more of its instance fields aren't final:
       FinancialAdviceScreen.budgetPreferenceController •
       lib/features/customer/onboarding/presentation/views/budget_preference/finance_advice_screen.dart:15:7 • must_be_immutable
warning • Unused import: '../../controllers/property_preference_controller.dart' •
       lib/features/customer/onboarding/presentation/views/budget_preference/home_loan_screen.dart:4:8 • unused_import
warning • This class (or a class that this class inherits from) is marked as '@immutable', but one or more of its instance fields aren't final:
       HomeLoanScreen.budgetPreferenceController • lib/features/customer/onboarding/presentation/views/budget_preference/home_loan_screen.dart:15:7 •
       must_be_immutable
warning • This class (or a class that this class inherits from) is marked as '@immutable', but one or more of its instance fields aren't final:
       WelcomeBudgetPreferenceScreen.budgetPreferenceController •
       lib/features/customer/onboarding/presentation/views/budget_preference/welcome_budget_screen.dart:12:7 • must_be_immutable
warning • The value of the field '_propertyPreferenceController' isn't used •
       lib/features/customer/onboarding/presentation/views/location_preference/city_preference_screen.dart:18:38 • unused_field
   info • The member 'build' overrides an inherited member but isn't annotated with '@override' •
          lib/features/customer/onboarding/presentation/views/location_preference/neighbour_property_screen.dart:32:10 • annotate_overrides
warning • The member 'value' can only be used within instance members of subclasses of 'package:get/get_rx/src/rx_types/rx_iterables/rx_list.dart' •
       lib/features/customer/onboarding/presentation/views/location_preference/neighbour_property_screen.dart:160:70 • invalid_use_of_protected_member
warning • The member 'value' can only be used within instance members of subclasses of 'package:get/get_rx/src/rx_types/rx_iterables/rx_list.dart' •
       lib/features/customer/onboarding/presentation/views/location_preference/neighbour_property_screen.dart:169:76 • invalid_use_of_protected_member
warning • The member 'value' can only be used within instance members of subclasses of 'package:get/get_rx/src/rx_types/rx_iterables/rx_list.dart' •
       lib/features/customer/onboarding/presentation/views/location_preference/neighbour_property_screen.dart:179:83 • invalid_use_of_protected_member
warning • The member 'value' can only be used within instance members of subclasses of 'package:get/get_rx/src/rx_types/rx_iterables/rx_list.dart' •
       lib/features/customer/onboarding/presentation/views/location_preference/neighbour_property_screen.dart:206:59 • invalid_use_of_protected_member
warning • The member 'value' can only be used within instance members of subclasses of 'package:get/get_rx/src/rx_types/rx_iterables/rx_list.dart' •
       lib/features/customer/onboarding/presentation/views/location_preference/neighbour_property_screen.dart:207:57 • invalid_use_of_protected_member
warning • The member 'value' can only be used within instance members of subclasses of 'package:get/get_rx/src/rx_types/rx_iterables/rx_list.dart' •
       lib/features/customer/onboarding/presentation/views/location_preference/neighbour_property_screen.dart:208:48 • invalid_use_of_protected_member
   info • Don't invoke 'print' in production code •
          lib/features/customer/onboarding/presentation/views/location_preference/neighbour_property_screen.dart:209:9 • avoid_print
warning • The member 'value' can only be used within instance members of subclasses of 'package:get/get_rx/src/rx_types/rx_iterables/rx_list.dart' •
       lib/features/customer/onboarding/presentation/views/location_preference/neighbour_property_screen.dart:209:72 • invalid_use_of_protected_member
warning • The member 'value' can only be used within instance members of subclasses of 'package:get/get_rx/src/rx_types/rx_iterables/rx_list.dart' •
       lib/features/customer/onboarding/presentation/views/location_preference/neighbour_property_screen.dart:211:61 • invalid_use_of_protected_member
warning • The member 'value' can only be used within instance members of subclasses of 'package:get/get_rx/src/rx_types/rx_iterables/rx_list.dart' •
       lib/features/customer/onboarding/presentation/views/location_preference/neighbour_property_screen.dart:212:59 • invalid_use_of_protected_member
warning • The member 'value' can only be used within instance members of subclasses of 'package:get/get_rx/src/rx_types/rx_iterables/rx_list.dart' •
       lib/features/customer/onboarding/presentation/views/location_preference/neighbour_property_screen.dart:213:50 • invalid_use_of_protected_member
   info • Don't invoke 'print' in production code •
          lib/features/customer/onboarding/presentation/views/location_preference/neighbour_property_screen.dart:214:11 • avoid_print
warning • The member 'value' can only be used within instance members of subclasses of 'package:get/get_rx/src/rx_types/rx_iterables/rx_list.dart' •
       lib/features/customer/onboarding/presentation/views/location_preference/neighbour_property_screen.dart:214:74 • invalid_use_of_protected_member
   info • Use 'const' literals as arguments to constructors of '@immutable' classes •
          lib/features/customer/onboarding/presentation/views/location_preference/neighbour_screen.dart:67:28 • prefer_const_literals_to_create_immutables
warning • The operand can't be null, so the condition is always 'true' •
       lib/features/customer/onboarding/presentation/views/location_preference/neighbour_screen.dart:91:36 • unnecessary_null_comparison
   info • Don't invoke 'print' in production code • lib/features/customer/onboarding/presentation/views/location_preference/neighbour_screen.dart:92:23 •
          avoid_print
   info • Don't invoke 'print' in production code • lib/features/customer/onboarding/presentation/views/location_preference/neighbour_screen.dart:93:23 •
          avoid_print
warning • This class (or a class that this class inherits from) is marked as '@immutable', but one or more of its instance fields aren't final:
       WelcomeLocationPreferenceScreen.locationPreferenceController •
       lib/features/customer/onboarding/presentation/views/location_preference/welcome_location_preference_screen.dart:12:7 • must_be_immutable
warning • Unused import: '../../controllers/property_preference_controller.dart' •
       lib/features/customer/onboarding/presentation/views/other_preference/importance_preference_screen.dart:4:8 • unused_import
warning • The value of the field '_propertyPreferenceController' isn't used •
       lib/features/customer/onboarding/presentation/views/property_preference/welcome_property_preference_screen.dart:14:38 • unused_field
warning • Unused import: '../../../../../../../utils/sizer.dart' • lib/features/customer/onboarding/presentation/views/review/widgets/detail_panel.dart:2:8 •
       unused_import
warning • The operand can't be null, so the condition is always 'true' • lib/features/customer/profile/presentation/views/profile_screen.dart:43:66 •
       unnecessary_null_comparison
warning • The member 'value' can only be used within instance members of subclasses of 'package:get/get_rx/src/rx_types/rx_iterables/rx_list.dart' •
       lib/features/customer/profile/presentation/views/site_visit_screen.dart:48:61 • invalid_use_of_protected_member
warning • Dead code • lib/network/commom_api_service.dart:71:5 • dead_code
   info • Don't invoke 'print' in production code • lib/network/http_client.dart:31:5 • avoid_print
   info • Don't invoke 'print' in production code • lib/network/http_client.dart:44:9 • avoid_print
   info • Don't invoke 'print' in production code • lib/network/http_client.dart:49:5 • avoid_print
   info • Don't invoke 'print' in production code • lib/network/http_client.dart:114:5 • avoid_print
   info • Don't invoke 'print' in production code • lib/network/http_client.dart:165:5 • avoid_print
   info • Don't invoke 'print' in production code • lib/network/http_client.dart:260:11 • avoid_print
   info • Don't invoke 'print' in production code • lib/network/http_client.dart:267:11 • avoid_print
   info • The declaration 'putRequest' isn't referenced • lib/network/http_client.dart:274:22 • unused_element
   info • Don't invoke 'print' in production code • lib/network/http_client.dart:278:7 • avoid_print
   info • Don't invoke 'print' in production code • lib/network/http_client.dart:345:5 • avoid_print
   info • The declaration 'putRequest' isn't referenced • lib/network/http_client.dart:423:22 • unused_element
   info • Don't invoke 'print' in production code • lib/network/http_client.dart:425:7 • avoid_print
   info • Don't invoke 'print' in production code • lib/network/http_client.dart:489:5 • avoid_print
   info • Use 'const' with the constructor to improve performance • lib/page_routes/store_page_route.dart:88:56 • prefer_const_constructors
   info • The private field _widgetOptions could be 'final' • lib/utils/bottom_navigation_bar.dart:20:23 • prefer_final_fields
   info • Use 'const' with the constructor to improve performance • lib/utils/bottom_navigation_bar.dart:21:5 • prefer_const_constructors
   info • Use 'const' with the constructor to improve performance • lib/utils/bottom_navigation_bar.dart:22:5 • prefer_const_constructors
   info • Use 'const' with the constructor to improve performance • lib/utils/bottom_navigation_bar.dart:23:5 • prefer_const_constructors
   info • 'WillPopScope' is deprecated and shouldn't be used. Use PopScope instead. This feature was deprecated after v3.12.0-1.0.pre •
          lib/utils/bottom_navigation_bar.dart:49:12 • deprecated_member_use
   info • 'WillPopScope.new' is deprecated and shouldn't be used. Use PopScope instead. This feature was deprecated after v3.12.0-1.0.pre •
          lib/utils/bottom_navigation_bar.dart:49:12 • deprecated_member_use
   info • The private field _widgetOptions could be 'final' • lib/utils/broker_bottom_navigation_bar.dart:20:23 • prefer_final_fields
   info • Use 'const' with the constructor to improve performance • lib/utils/broker_bottom_navigation_bar.dart:21:5 • prefer_const_constructors
   info • Use 'const' with the constructor to improve performance • lib/utils/broker_bottom_navigation_bar.dart:22:5 • prefer_const_constructors
   info • Use 'const' with the constructor to improve performance • lib/utils/broker_bottom_navigation_bar.dart:23:5 • prefer_const_constructors
   info • 'WillPopScope' is deprecated and shouldn't be used. Use PopScope instead. This feature was deprecated after v3.12.0-1.0.pre •
          lib/utils/broker_bottom_navigation_bar.dart:49:12 • deprecated_member_use
   info • 'WillPopScope.new' is deprecated and shouldn't be used. Use PopScope instead. This feature was deprecated after v3.12.0-1.0.pre •
          lib/utils/broker_bottom_navigation_bar.dart:49:12 • deprecated_member_use
   info • The constant name 'FIGMA_DESIGN_WIDTH' isn't a lowerCamelCase identifier • lib/utils/sizer.dart:5:11 • constant_identifier_names
   info • The constant name 'FIGMA_DESIGN_HEIGHT' isn't a lowerCamelCase identifier • lib/utils/sizer.dart:6:11 • constant_identifier_names
   info • The constant name 'FIGMA_DESIGN_STATUS_BAR' isn't a lowerCamelCase identifier • lib/utils/sizer.dart:7:11 • constant_identifier_names
   info • Don't invoke 'print' in production code • lib/utils/utils.dart:11:57 • avoid_print
   info • Don't invoke 'print' in production code • lib/utils/utils.dart:20:57 • avoid_print

Flutter doctor output

[✓] Flutter (Channel stable, 3.19.5, on Ubuntu 22.04.4 LTS 6.5.0-28-generic, locale en_IN)
    • Flutter version 3.19.5 on channel stable at /home/mindit/snap/flutter/common/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 300451adae (7 weeks ago), 2024-03-27 21:54:07 -0500
    • Engine revision e76c956498
    • Dart version 3.3.3
    • DevTools version 2.31.1

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /home/mindit/Android/Sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: /snap/android-studio/155/jbr/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop
    • clang version 10.0.0-4ubuntu1
    • cmake version 3.16.3
    • ninja version 1.10.0
    • pkg-config version 0.29.1

[✓] Android Studio (version 2023.3)
    • Android Studio at /snap/android-studio/155
    • Flutter plugin version 79.0.2
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160)

[✓] Android Studio (version 2023.2)
    • Android Studio at /snap/android-studio/153
    • Flutter plugin version 78.4.1
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)

[✓] VS Code (version 1.89.1)
    • VS Code at /snap/code/current/usr/share/code
    • Flutter extension can be installed from:
      🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (3 available)
    • sdk gphone64 x86 64 (mobile) • emulator-5554 • android-x64    • Android 14 (API 34) (emulator)
    • Linux (desktop)              • linux         • linux-x64      • Ubuntu 22.04.4 LTS 6.5.0-28-generic
    • Chrome (web)                 • chrome        • web-javascript • Google Chrome 123.0.6312.105

[✓] Network resources
    • All expected network resources are available.

• No issues found!

Code of Conduct

mrcodefrost commented 1 month ago

Screen recording of the bug

https://github.com/GetStream/stream-chat-flutter/assets/72447688/a07f86d0-da64-4f04-946b-de2a26fa6ad2

github-actions[bot] commented 3 weeks ago

This issue is stale because it has been open for 20 days with no activity.

github-actions[bot] commented 2 weeks ago

This issue was closed because it has been inactive for 7 days since being marked as stale.

deven98 commented 1 week ago

Hey @mrcodefrost 👋

Since we do not know what your chat screen implementation looks like, we cannot make any assumptions in the media widget as to how we can show messages or add replies - so it is up to you to do this.

Having said that, it is relatively straightforward. Assuming you have a StreamMessageListView and StreamMessageInput on the screen, here is a simple implementation for this based on your code:

class ChatScreen extends StatefulWidget {
  const ChatScreen({super.key});

  @override
  State<ChatScreen> createState() => _ChatScreenState();
}

class _ChatScreenState extends State<ChatScreen> {
  late final messageInputController = StreamMessageInputController();
  final focusNode = FocusNode();

  @override
  Widget build(BuildContext context) {
    return SafeArea(
      child: Scaffold(
        appBar: const StreamChannelHeader(),
        body: Column(
          children: <Widget>[
            Expanded(
              child: StreamMessageListView(
                markReadWhenAtTheBottom: true,
                messageBuilder: (context, details, messageList, defaultImpl) {
                  return defaultImpl.copyWith(
                    onReplyTap: reply,
                    onShowMessage: showMessage,
                  );
                },
              ),
            ),
            StreamMessageInput(
              onQuotedMessageCleared: messageInputController.clearQuotedMessage,
              focusNode: focusNode,
              messageInputController: messageInputController,
            ),
          ],
        ),
      ),
    );
  }

  void reply(Message message) {
    messageInputController.quotedMessage = message;
    WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
      focusNode.requestFocus();
    });
  }

  void showMessage(Message message, Channel c) async {
    final client = StreamChat.of(context).client;
    final channel = client.channel(
      c.type,
      id: c.id,
    );
    if (channel.state == null) {
      await channel.watch();
    }

    /// Now navigate to a new page and add a new `StreamChannel` with an initialMessageId:
    // StreamChannel(
    //   initialMessageId: YOUR_MESSAGE_ID,
    //   child: YourChatScreen(),
    //   ...
    // )
  }
}

Hope this helps, I'll try to see if we can add more docs around this soon.

Thanks!