How do I run/test my Flutter app on a real device?

For Android, this is pretty easy: Enable Developer options and USB debugging on your device. This varies slightly by Android version, but the short version is you tap on the Device Build Number 7 times. Then a “Developer Options” option comes up and you can click “enable USB Debugging.” See the linked Android documentation for … Read more

How can I check if a Flutter application is running in debug?

In later versions, you can use kDebugMode: if (kDebugMode) doSomething(); While asserts can technically be used to manually create an “is debug mode” variable, you should avoid that. Instead, use the constant kReleaseMode from package:flutter/foundation.dart The difference is all about tree shaking. Tree shaking (aka the compiler removing unused code) depends on variables being constants. … Read more

Message “flutter run: No connected devices”

Flutter supports both iOS and Android device/simulators. In the terminal, run the flutter devices command to verify that Flutter recognizes your connected Android device. Here is a reference document on how you can set up a device/simulator to run your application. For, Android (on a Mac system) Set up your Android device To prepare to … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)