import 'dart:io';

import 'package:flutter/foundation.dart';
import 'package:path_provider/path_provider.dart';

bool get isDesktop {
  if (kIsWeb) return false;
  return Platform.isLinux || Platform.isWindows || Platform.isMacOS;
  // return const [
  //   TargetPlatform.windows,
  //   TargetPlatform.linux,
  //   TargetPlatform.macOS,
  // ].contains(defaultTargetPlatform);
}

Future<Directory> logFileDirectory() async {
  final temporaryDirectory = await getApplicationSupportDirectory();
  return Directory('${temporaryDirectory.path}/logs').create(recursive: true);
}
