Please enable JavaScript.
Coggle requires JavaScript to display documents.
Run & Test Flutter Application on a real devices - Coggle Diagram
Run & Test Flutter Application on a real devices
Android
Setting up device
Enable Developer Options
Go to
Setting > About phone.
Tap
Build number
seven times to enable developer options
Go to
Settings > Developer
options and enable USB debugging.
Install USB Drivers
If you're using Windows,
Install the necessary USB drivers
for your device. These can be found on the manufacturer's website
Running App on a Real Device
Connect your device
Connect your Android device to your computer using a USB cable.
Allow USB Debugging
When prompted on your device, allow USB debugging.
Run App
Open Flutter project in your IDE (VS Code or Android Studio)
Run the command
flutter devices
to ensure your device is detected.
Execute
flutter run
[run a number id device]
to build and run your app on the connected device.
iOS
Setting up device
Enroll in the Apple Developer Program
You need to be a member of the Apple Developer program to test apps on a real iOS device.
Enable Developer Mode
Go to
Setting > Privacy & Security > Developer Mode
and enable it.
Create a Provisioning Profile
Use
Xcode
to create a provisioning profile for your device.
Running App on a Real Device
Connect your device
Connect your iOS device to your computer using a USB cable.
Trust your computer
On your device, trust the computer when prompted.
Run App
Open your Flutter project in your
IDE
.
Run the command
flutter devices
to ensure your device is detected.
Execute
flutter run
[run a number id device]
to build and run your app on the connected device.
Testing App
Debugging
1.Using Flutter Dev Tools
Launch Flutter DevTools to inspect your app, view logs, and debug performance issues.
2. Hot Reload
Use the hot reload feature to quickly test changes without restarting the app.
Performance Testing
Profile Mode
Run your app in profile mode using the command
flutter run --profile
to analyze performance.
Widget and Layouts
Use the Flutter Inspector to examine widget hierarchy and layout performance.