I tried to print to console but can’t get it to work. I have checked other forums and tried their recommendations but no result.
import 'dart:developer';
log('your message here'); // nothing
or
import 'package:flutter/foundation.dart';
debugPrint('your message here'); // nothing
Filtering "your message here" in the Android Studio logcat shows nothing. I’m just learning Flutter. I need help.
2
Answers
You will find it on the Run section of your Android Studio. Moreover, importing
'package:flutter/material.dart';
will be enough to finddebugPrint()
. Hope you’ll find your log, happy coding!@TryCatchFinally nice to meet you.
I also needed a feature like Logcat, so I created one.
It’s called
flutter_logcat
package.You can find more details on Pub.dev site.
I hope it has the features you’re looking for.
If it does, that would make me really happy.
If you need any enhancement features, feel free to request them on GitHub issues, and I’ll work on it!
Thanks!
Add
Usage
https://pub.dev/packages/flutter_logcat