feat: support custom tracker url (#59)

This commit is contained in:
Li Wei authored and GitHub committed 2022-12-12 15:58:11 +08:00
1 parent 9ef3405e43
commit 691c2f496e
71 files changed
+2209 -891

No files matched your search

+22 -14
View File
@@ -3,6 +3,14 @@ import 'dart:io';
import 'package:flutter/foundation.dart';
class Util {
static String buildAbsPath(String dir, String path, String name) {
return (dir == "" ? "" : "$dir/") + buildPath(path, name);
}
static String buildPath(String path, String name) {
return (path == "" ? "" : "$path/") + name;
}
static String fmtByte(int byte) {
if (byte < 1024) {
return "$byte B";
@@ -15,24 +23,16 @@ class Util {
}
}
static String buildPath(String path, String name) {
return (path == "" ? "" : "$path/") + name;
}
static String buildAbsPath(String dir, String path, String name) {
return (dir == "" ? "" : "$dir/") + buildPath(path, name);
}
static isWeb() {
return kIsWeb;
}
static isAndroid() {
return !kIsWeb && Platform.isAndroid;
}
static isMacos() {
return !kIsWeb && Platform.isMacOS;
static isIOS() {
return !kIsWeb && Platform.isIOS;
}
static isMobile() {
return !kIsWeb && (Platform.isAndroid || Platform.isIOS);
}
static isDesktop() {
@@ -42,10 +42,18 @@ class Util {
return Platform.isWindows || Platform.isLinux || Platform.isMacOS;
}
static isMacos() {
return !kIsWeb && Platform.isMacOS;
}
static isUnix() {
if (kIsWeb) {
return false;
}
return !Platform.isWindows;
}
static isWeb() {
return kIsWeb;
}
}