How to find unused flutter classes in Android Studio or Visual Studio Code

Dart code metrics https://pub.dev/packages/dart_code_metrics supports finding unused files for flutter. As commented by in 2023, unfortunately, it is not free anymore https://dcm.dev/pricing/. To purchase a license, see their website. install: flutter pub add –dev dart_code_metrics run “flutter packages get” or use your IDE to “Pub get”. run: flutter pub run dart_code_metrics:metrics check-unused-files lib result: Unused … Read more

Button onClick attribute is none if activity written in Kotlin

It seems like the designer does not support Kotlin yet. Here are some solution: XML (Not Recommended) Add the following line to your Button tag. This is exactly what the designer will do. android:onClick=”sendMessage” Old Fashion No need to add anything. val button = findViewById<Button>(R.id.Button) button.setOnClickListener { } kotlin-android-extensions (Recommended) Add apply plugin: “kotlin-android-extensions” to … Read more

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