ChristianKleineidam / logging_to_logcat

Add a function to Logger to make it print to Logcat
https://pub.dev/packages/logging_to_logcat
Other
7 stars 3 forks source link

error: The getter 'root' isn't defined for the type 'Logger' #3

Open s-mehrabi-amp opened 1 year ago

s-mehrabi-amp commented 1 year ago

After adding the dependency and importing the library, I get error: The getter 'root' isn't defined for the type 'Logger'. (undefined_getter at [******] lib\main.dart:17) and error: There's no constant named 'ALL' in 'Level'. (undefined_enum_constant at [******] lib\main.dart:18) when I try to call activateLogcat()

Future initLogging() async {
  Logger.root.activateLogcat();
  Logger.root.level = Level.ALL;
}
ChristianKleineidam commented 6 months ago

This sounds like you haven't important the Logger library. My library is just an extension of the general Logger library. Without it, it won't work.