The print() statement is not printing any data within Android Studio's console in Flutter iOS version, but same code works fine for flutter android version.
Here is the flutter Doctor summary:
[✓] Flutter (Channel master, v1.10.7-pre.109, on Mac OS X 10.14.6 18G103, locale en-IN)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 11.0)
[✓] Android Studio (version 3.5)
[✓] IntelliJ IDEA Community Edition (version 2019.1)
[✓] Connected device (1 available)
• No issues found!
you can simply use print('whatever you want to print') same as console. log() in javascript.
You need to go to your Settings > General > Device Management. Inside Device Management, select the developer name and tap Trust “YOUR DEVELOPER NAME”. You should now be able to run your Flutter app on your local device.
I had the same issue. What worked for me was to add
import 'dart:developer';
to the top of my file, and then use
log('your message here');
instead of print.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With