When developing mobile apps with Flutter, there are cases where you want to output logs to check values and debug. There are three methods to log in Flutter.
First, using “log()” from the dart:developer package:
import 'dart:developer';
log()
Using the built-in dart print():
print()
Using “debugPrint()” from the package:flutter/foundation.dart package:
import 'package:flutter/foundation.dart';
debugPrint();