FileHandler class
Properties
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
toString()
→ String
-
A string representation of this object.
inherited
Static Methods
-
cleanupTempFiles()
→ Future<void>
-
✅ NEW: Manual cleanup trigger
-
detectSourceType(String input)
→ FileSourceType
-
Detect source type
-
dispose()
→ Future<void>
-
Cleanup on app dispose
-
downloadFile({required String source, required String fileExtension, String? customFileName, BuildContext? context})
→ Future<String>
-
Download file to Downloads folder
-
initialize()
→ void
-
Initialize file handler (call in main.dart)
-
loadFile(String source, String fileExtension)
→ Future<FileData>
-
✅ IMPROVED: Load file with automatic cleanup
-
printFile({required String source, required String fileType, String? documentName, BuildContext? context})
→ Future<void>
-
✅ IMPROVED: Print file with cleanup
-
shareFile({required String source, required String fileExtension, String? fileName, String? subject, BuildContext? context})
→ Future<void>
-
✅ IMPROVED: Share file with cleanup