addLog method

dynamic addLog(
  1. String text, {
  2. bool record = true,
  3. bool newLine = false,
})

Implementation

addLog(String text, {bool record = true, bool newLine = false}) {
  if (newLine) {
    print("\n");
    logs.add("-----------------------------------------------------------");
  }
  String newText = "${DateTime.now().millisecondsSinceEpoch}, flutter_app_rename_tool: $text";
  print(newText);
  if (record) {
    logs.add(newText);
  }
}