You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are three different file classes in this SDK:
816
+
-`ParseFileBase` is and abstract class and is the foundation of every file class that can be handled by this SDK.
817
+
-`ParseFile` (former the only file class in the SDK) extends ParseFileBase and is by default used as the file class on every platform but web.
818
+
This class uses a `File` from `dart:io` for storing the raw file.
819
+
-`ParseWebFile` is the equivalent to ParseFile used at Flutter Web.
820
+
This class uses an `Uint8List` for storing the raw file.
821
+
822
+
These classes are used by default to represent files, but you can also build your own class extending ParseFileBase and provide a custom `ParseFileConstructor` similar to the `SubClasses`.
823
+
824
+
Have a look at the example application for a small (non web) example.
825
+
826
+
827
+
```dart
828
+
//A short example
829
+
Widget buildImage(ParseFileBase image){
830
+
return FutureBuilder<ParseFileBase>(
831
+
future: image.download(),
832
+
builder: (BuildContext context,
833
+
AsyncSnapshot<ParseFileBase> snapshot) {
834
+
if (snapshot.hasData) {
835
+
if (kIsWeb) {
836
+
return Image.memory((snapshot.data as ParseWebFile).file);
837
+
} else {
838
+
return Image.file((snapshot.data as ParseFile).file);
0 commit comments