Aus öffentlichen Paketdaten erstellte Orientierung.
Ein Flutter-Plugin, das das Lesen und Bearbeiten von Metadaten (Tags) in Audio-Dateien ermöglicht und mehrere Audioformate unterstützt. Es bietet eine einfache Schnittstelle zum Zugriff auf und zur Änderung gängiger Tag-Felder wie Titel, Künstler, Album und Genre. Für Android entwickelt, integriert es sich nahtlos in Flutter-Anwendungen, die sich auf Musikverwaltung oder Audiosignalverarbeitung konzentrieren. Das Plugin nutzt native Android-Funktionen, um eine zuverlässige Tag-Manipulation sicherzustellen.
Anwendungsfälle
Bearbeitung von Audio-Dateimetadaten in Musik-Apps
Songinformationen in Mediaplayers anzeigen
Massenmarkierung von Audio-Dateien
Metadaten zwischen Geräten synchronisieren
Persönliche Musikbibliotheken verwalten
Hauptmerkmale
Unterstützt mehrere Audioformate
Metadaten-Tags lesen und schreiben
Einfache API für gängige Tag-Felder
Nur für Android-Plattformen unterstützter Support
Zuverlässige native Integration
Geeignet für
Musik-App-Entwickler
Audiodatei-Manager
Medienbibliotheks-Tools
Markierungswerkzeuge
Android-orientierte Audio-Projekte
Hinweise
Beschränkt auf die Android-Plattform
Erforderliche Dateiberechtigungen
Unterstützt möglicherweise nicht alle Audioformate
Metadatenänderungen erfordern Schreibzugriff auf Dateien
Kein iOS-Support verfügbar
Original-README
Originaler README-Schnappschuss aus dem verknüpften Quell-Repository. Aktuelle Inhalte finden Sie im Repository.
flutter_audio_tagger
A Flutter plugin for reading and editing audio file metadata (ID3 tags) on Android. The plugin reads tag data from audio files and returns edited files as raw bytes (Uint8List), giving your app full control over where and how the resulting file is saved.
Platform Support
Platform
Supported
Android
Yes
iOS
No
Web
No
Desktop
No
Features
Read all metadata tags from an audio file, including artwork
Read metadata tags only (without artwork)
Read artwork only
Edit metadata tags (without touching artwork)
Edit artwork only
Edit metadata tags and artwork together in a single call
Returns the complete modified audio file as bytes (Uint8List) along with the file extension, so your app decides where to write it
Every editing method returns an AudioFileData object. The plugin does not write the file to disk. Your app receives the raw bytes and is responsible for saving them. Use dart:io to write the bytes to any path your app has access to.
import'dart:io';
// Edit tagsAudioFileData editedFile = await tagger.editTags(updatedTag, originalFilePath);
// Write the bytes to a fileString savePath = '/storage/emulated/0/Download/edited.${editedFile.fileExtension}';
File outputFile = File(savePath);
await outputFile.writeAsBytes(editedFile.musicData);
You can save to any writable location: the app's documents directory, the downloads folder, an external storage path, or overwrite the original file. The fileExtension field tells you the format of the audio data so you can construct the correct filename.
import'package:path_provider/path_provider.dart';
// Save to app documents directoryDirectory appDir = awaitgetApplicationDocumentsDirectory();
String fileName = 'my_song.${editedFile.fileExtension}';
File file = File('${appDir.path}/$fileName');
await file.writeAsBytes(editedFile.musicData);
// Or overwrite the original fileFile original = File(originalFilePath);
await original.writeAsBytes(editedFile.musicData);