Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

print() statement not printing to console in flutter iOS app within Android Studio

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!
like image 481
Aravinth thiyagarajan Avatar asked Oct 02 '19 12:10

Aravinth thiyagarajan


People also ask

How do I print form data in console in Flutter?

you can simply use print('whatever you want to print') same as console. log() in javascript.

How do I transfer my Flutter app to iOS?

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.


Video Answer


1 Answers

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.

like image 136
Bianco Avatar answered Sep 17 '22 07:09

Bianco