Skip to main content

flutter_freedome_content 1.2.0 copy "flutter_freedome_content: ^1.2.0" to clipboard
flutter_freedome_content: ^1.2.0 copied to clipboard

FreeDome content management for Flutter: content libraries, upload / delete, playback-ready content items and change events for FreeDome dome systems.

example/main.dart

// Minimal example: list the content libraries of a FreeDome server and upload a video item.
import 'package:flutter/foundation.dart';
import 'package:flutter_freedome_content/flutter_freedome_content.dart';

Future<void> main() async {
  final contentService = FreeDomeContentService(
    baseUrl: 'http://192.168.1.10:8080',
  );
  try {
    final libraries = await contentService.getLibraries();
    for (final library in libraries) {
      debugPrint('${library.name}: ${library.contentCount} items');
    }
    if (libraries.isNotEmpty) {
      final video = VideoContent(
        id: 'intro',
        name: 'Intro',
        videoUrl: 'https://example.com/intro.mp4',
        duration: const Duration(minutes: 5),
        quality: VideoQuality.hd,
        metadata: const {'category': 'demo'},
        createdAt: DateTime.now(),
        updatedAt: DateTime.now(),
      );
      final id = await contentService.uploadContent(libraries.first.id, video);
      debugPrint('Uploaded as $id');
    }
  } on FreeDomeContentException catch (e) {
    debugPrint('Content error: $e');
  } finally {
    contentService.dispose();
  }
}
0
likes
150
points
154
downloads

Documentation

API reference

Publisher

verified publisherfreedome.nativemind.net

Weekly Downloads

FreeDome content management for Flutter: content libraries, upload / delete, playback-ready content items and change events for FreeDome dome systems.

Homepage
Repository (GitLab)

License

unknown (license)

Dependencies

flutter, flutter_freedome_connectivity, flutter_localizations, freedome_client, freedome_protocol, http, intl, json_annotation

More

Packages that depend on flutter_freedome_content