hot reload and hot restart not working in flutter

Viewed 940

Problem 1:
When I click run button to build the app. my app build successfully. it install in my real device but it stack in splash screen not going to next screen. and terminal shows

"Observatory listening on ************************************"

Step 1: clicking the run icon

Step 2: after build the app it show

"Observatory listening on ************************************"

Problem 2:

But when I run flutter run comment in terminal my app will work properly but hot reload and hot restart not work.

Terminal Error:

C:\Users\asifa\AndroidStudioProjects\asifzakirpatientapp>flutter run
Launching lib\main.dart on V2025 in debug mode...
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done                        57.3s
√ Built build\app\outputs\flutter-apk\app-debug.apk.
Installing build\app\outputs\flutter-apk\app.apk...                11.0s
I/flutter (23089): Observatory listening on ************************************
1 Answers

When using the terminal to run flutter run, it won't automatically hot reload and hot restart on save. You need to press r to hot reload on your terminal and R to hot restart. To disconnect your emulator, press d on your terminal.

Related