You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 17, 2024. It is now read-only.
BTW, Conditional Import via Platforms.isWindows/isMacOS/isLinux would work as well
import'timeval64.dart if (Platforms.isMac) timeval32.dart';
However, Conditional Import is only available for Dart SDK library, i.e. dart.library.io/dart.library.js/dart.library.html/dart.library.ffi as far as I know
Background
I'm working on Dart wrapper via
dart:ffi
forlibusb
: https://github.com/woodemi/libusb.dartProblem
libusb_linux.dart
is identical tolibusb_windows.dart
whilelibusb_mac.dart
is a little differentCalling the APIs requires
import 'packages:libusb/libusb_windows.dart
for Windows,libusb_macos.dart
for macOS andlibusb_linux.dart
for Linuxhttps://github.com/woodemi/libusb.dart/blob/afabb0fb3deeef240b6a893cf79a92cf1aa878f8/example/listdevs.dart#L7-L10
It's quite cumbersome and error prone
Feature Request
Could we support something like
The text was updated successfully, but these errors were encountered: