Fix public file viewer compilation errors and add PDF styling
- Add missing imports for SfPdfViewer and Uint8List - Fix _initializeVideoPlayer method declaration - Correct SfTheme import to use syncfusion_flutter_core/theme.dart - Restore PDF bytes loading via API for public shares - Add SfTheme wrapper for PDF viewer styling
This commit is contained in:
@@ -2,7 +2,9 @@ import 'package:flutter/material.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:web/web.dart' as web;
|
||||
import 'dart:ui_web' as ui_web;
|
||||
import 'package:syncfusion_flutter_theme/syncfusion_flutter_theme.dart';
|
||||
import 'package:syncfusion_flutter_core/theme.dart';
|
||||
import 'package:syncfusion_flutter_pdfviewer/pdfviewer.dart';
|
||||
import 'dart:typed_data';
|
||||
import 'package:video_player/video_player.dart';
|
||||
import 'package:flutter/foundation.dart' show kIsWeb;
|
||||
import '../theme/app_theme.dart';
|
||||
@@ -88,6 +90,8 @@ class _PublicFileViewerState extends State<PublicFileViewer> {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> _initializeVideoPlayer() async {
|
||||
if (!kIsWeb) {
|
||||
// For mobile, use VideoPlayerController
|
||||
final url = _fileData?['viewUrl'] ?? _fileData?['downloadUrl'];
|
||||
|
||||
Reference in New Issue
Block a user