DiscData class

Properties

databasesPath Future<String>
no setter
filesPath Future<String>
no setter
hashCode int
The hash code for this object.
no setterinherited
pathJoin String
final
rootPath Future<String>
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

appendDataToFile(dynamic data, DataType dataType, {String? fileName, String? path}) Future<void>
Use for app append data to a specific file on disc.
checkFileExists({String? fileName, String? path}) Future<bool>
deleteFile({String? fileName, String? path}) Future<bool>
getEntityFileOnDisc<D, T>(String urlColumnName, String key, dynamic value, {String? path}) Future<D?>
It will take the url from T's table and get the file on path/fileName or the systePath/fileName
D is the type of the loaded data (Unit8List, String, integer, etc)
getFile({String? fileName, String? path}) Future<File?>
if path (entire Lunix or windows path) is provide, fileName must be null.
getImageFromDisc({String? imageName, String? path, BoxFit fit = BoxFit.fill}) Future<Image?>
  • returns the Image or null if image do not exist. It takes imageName if image is in files directory or the the entire path of the image.
  • getParentDir(String path) String
    get reduce url path by one directory.
    Exampe:
    if path = "/flutter/app/dir/test"
    getParentDir(path) returns "/flutter/app/dir"
    noSuchMethod(Invocation invocation) → dynamic
    Invoked when a nonexistent method or property is accessed.
    inherited
    readFileAsBase64({String? fileName, String? path}) Future<String?>
    if path (entire Lunix or windows path) is provide, fileName must be null
    readFileAsBytes({String? fileName, String? path}) Future<Uint8List?>
    if path (entire Lunix or windows path) is provide, fileName must be null
    readFileAsString({String? fileName, String? path}) Future<String?>
    if path (entire Lunix or windows path) is provide, fileName must be null
    saveDataToDisc(dynamic data, DataType dataType, {String? takeThisName, String? path, bool recursive = false}) Future<String?>
    Use for saving data to a specific path on disc
    toString() String
    A string representation of this object.
    inherited
    validatePath(String? path) String?
    Check if the given path is correct.
    If the path wasn't correct it will correct it and return a god one

    Operators

    operator ==(Object other) bool
    The equality operator.
    inherited

    Static Properties

    instance DiscData
    final