fix: Clean LSP suggestions.

This commit is contained in:
Zhang Hua 2024-07-07 14:32:54 +08:00
parent e9479b1dcf
commit e6479c2841
No known key found for this signature in database
GPG Key ID: 69528D6DCD2BE030

View File

@ -98,12 +98,12 @@ class AppLogger {
// which is the specification to store application logs on Linux. // which is the specification to store application logs on Linux.
// See https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html // See https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
// TODO: Use path_provider once it supports XDG_STATE_HOME // TODO: Use path_provider once it supports XDG_STATE_HOME
if (bool.hasEnvironment("XDG_STATE_HOME")) { if (const bool.hasEnvironment("XDG_STATE_HOME")) {
String xdgStateHomeRaw = String.fromEnvironment("XDG_STATE_HOME"); String xdgStateHomeRaw = const String.fromEnvironment("XDG_STATE_HOME");
if (!xdgStateHomeRaw.isEmpty) { if (xdgStateHomeRaw.isNotEmpty) {
return xdgStateHomeRaw; return xdgStateHomeRaw;
} }
} }
return join(String.fromEnvironment("HOME"), ".local", "state"); return join(const String.fromEnvironment("HOME"), ".local", "state");
} }
} }