libmagic 5.45.0+0
libmagic: ^5.45.0+0 copied to clipboard
A binding to the libmagic library for magic numbers detection using dart:ffi provinding a simple and easy way to identify file types from dart code.
Use this package as a library
Depend on it
Run this command:
With Dart:
$ dart pub add libmagic
With Flutter:
$ flutter pub add libmagic
This will add a line like this to your package's pubspec.yaml (and run an implicit dart pub get
):
dependencies:
libmagic: ^5.45.0+0
Alternatively, your editor might support dart pub get
or flutter pub get
. Check the docs for your editor to learn more.
Import it
Now in your Dart code, you can use:
import 'package:libmagic/libmagic.dart';