flutter_freedome_content
Это содержимое пока не доступно на вашем языке.
1.2.0+ is a facade over
freedome_client. New code should use the client directly — see doc/migration-to-freedome_client.md.
FreeDome content management library for Flutter applications.
Features
Section titled “Features”- Content library management
- Multiple content types (video, image, audio, interactive)
- Content upload and download
- Search and filtering
- Content metadata management
- Integration with FreeDome connectivity
Installation
Section titled “Installation”Add this to your package’s pubspec.yaml file:
dependencies: flutter_freedome_content: ^1.0.0 flutter_freedome_connectivity: ^1.0.0Content Service
Section titled “Content Service”import 'package:flutter_freedome_content/flutter_freedome_content.dart';
final contentService = FreeDomeContentService(baseUrl: 'https://api.example.com');
// Get all librariesfinal libraries = await contentService.getLibraries();
// Get content from a libraryfinal content = await contentService.getContentItems('library_id');
// Upload new contentfinal videoContent = VideoContent( id: 'unique_id', name: 'My Video', videoUrl: 'https://example.com/video.mp4', duration: Duration(minutes: 5), quality: VideoQuality.hd, metadata: {'category': 'tutorial'}, createdAt: DateTime.now(), updatedAt: DateTime.now(),);
final contentId = await contentService.uploadContent('library_id', videoContent);Content Types
Section titled “Content Types”// Video contentfinal video = VideoContent( id: 'video_1', name: 'Sample Video', videoUrl: 'https://example.com/video.mp4', duration: Duration(minutes: 10), quality: VideoQuality.fullHd, metadata: {'resolution': '1920x1080'}, createdAt: DateTime.now(), updatedAt: DateTime.now(),);
// Image contentfinal image = ImageContent( id: 'image_1', name: 'Sample Image', imageUrl: 'https://example.com/image.jpg', resolution: ImageResolution.high, metadata: {'format': 'JPEG'}, createdAt: DateTime.now(), updatedAt: DateTime.now(),);
// Audio contentfinal audio = AudioContent( id: 'audio_1', name: 'Sample Audio', audioUrl: 'https://example.com/audio.mp3', duration: Duration(minutes: 3), format: AudioFormat.mp3, bitrate: 320, metadata: {'genre': 'music'}, createdAt: DateTime.now(), updatedAt: DateTime.now(),);Search Content
Section titled “Search Content”// Search by queryfinal results = await contentService.searchContent( query: 'tutorial', type: ContentType.video, tags: ['education', 'beginner'],);
// Search in specific libraryfinal libraryResults = await contentService.searchContent( libraryId: 'library_123', type: ContentType.image,);API Reference
Section titled “API Reference”Models
Section titled “Models”ContentItem- Base class for all content typesVideoContent- Video content with quality settingsImageContent- Image content with resolution settingsAudioContent- Audio content with format and bitrateInteractiveContent- Interactive applicationsContentLibrary- Content library containerContentEvent- Content-related events
ContentType- video, image, audio, interactiveVideoQuality- sd, hd, fullHd, ultraHdImageResolution- low, medium, high, ultraAudioFormat- mp3, wav, flac, aac
Services
Section titled “Services”FreeDomeContentService- Main content management service
Events
Section titled “Events”LibrariesLoadedEvent- Fired when libraries are loadedContentUploadedEvent- Fired when content is uploadedContentDeletedEvent- Fired when content is deleted
License
Section titled “License”NativeMindNONC — see the LICENSE file.
Commercial use → NativeMind sales