how to enable logs in flutter code example
Example 1: how to log data to the flutter console ?
print('counter value : $_counter');
Example 2: logging in flutter
onPressed: () async {
setState(() {
sponner = true;
});
try {
final newUser = await _auth.signInWithEmailAndPassword(
email: email, password: password);
if (newUser != null) {
Navigator.pushNamed(context, ChatScreen.id);
}
sponner = false;
} catch (e) {
print(e);
}
},