mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2025-05-08 09:15:13 -04:00
lint work
This commit is contained in:
parent
9e4008214d
commit
6e8725f569
43 changed files with 257 additions and 332 deletions
|
@ -1,9 +1,8 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'dart:io' show Platform;
|
||||
|
||||
import 'package:ansicolor/ansicolor.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:loggy/loggy.dart';
|
||||
import 'package:ansicolor/ansicolor.dart';
|
||||
import 'dart:io' show Platform;
|
||||
import 'package:flutter/foundation.dart' show kIsWeb;
|
||||
|
||||
// Loggy tools
|
||||
const LogLevel traceLevel = LogLevel('Trace', 1);
|
||||
|
@ -73,19 +72,17 @@ class CallbackPrinter extends LoggyPrinter {
|
|||
}
|
||||
}
|
||||
|
||||
var globalTerminalPrinter = CallbackPrinter();
|
||||
CallbackPrinter globalTerminalPrinter = CallbackPrinter();
|
||||
|
||||
extension TraceLoggy on Loggy {
|
||||
void trace(dynamic message, [Object? error, StackTrace? stackTrace]) =>
|
||||
this.log(traceLevel, message, error, stackTrace);
|
||||
}
|
||||
|
||||
LogOptions getLogOptions(LogLevel? level) {
|
||||
return LogOptions(
|
||||
LogOptions getLogOptions(LogLevel? level) => LogOptions(
|
||||
level ?? LogLevel.all,
|
||||
stackTraceLevel: LogLevel.error,
|
||||
);
|
||||
}
|
||||
|
||||
class RootLoggy implements LoggyType {
|
||||
@override
|
||||
|
@ -100,7 +97,7 @@ void initLoggy() {
|
|||
logOptions: getLogOptions(null),
|
||||
);
|
||||
|
||||
const isTrace = String.fromEnvironment("logTrace", defaultValue: "") != "";
|
||||
const isTrace = String.fromEnvironment('logTrace') != '';
|
||||
LogLevel logLevel;
|
||||
if (isTrace) {
|
||||
logLevel = traceLevel;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue