-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a browser for the "Dateispeicher" Applet based on the existing Parser.
- Loading branch information
Showing
16 changed files
with
568 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:open_file/open_file.dart'; | ||
|
||
import '../client/client.dart'; | ||
|
||
void launchFile(BuildContext context, String url, String filename, String filesize, Function callback) { | ||
showDialog( | ||
context: context, | ||
barrierDismissible: false, | ||
builder: (BuildContext context) { | ||
return AlertDialog( | ||
title: Text("Download... $filesize"), | ||
content: const Center( | ||
heightFactor: 1.1, | ||
child: CircularProgressIndicator(), | ||
), | ||
); | ||
}); | ||
client | ||
.downloadFile(url, filename) | ||
.then((filepath) { | ||
Navigator.of(context).pop(); | ||
|
||
if (filepath == "") { | ||
showDialog( | ||
context: context, | ||
builder: (context) => AlertDialog( | ||
title: const Text("Fehler!"), | ||
content: Text( | ||
"Beim Download der Datei $filename ist ein unerwarteter Fehler aufgetreten. Wenn dieses Problem besteht, senden Sie uns bitte einen Fehlerbericht."), | ||
actions: [ | ||
TextButton( | ||
child: const Text('OK'), | ||
onPressed: () { | ||
Navigator.of(context).pop(); | ||
}, | ||
), | ||
], | ||
)); | ||
} else { | ||
OpenFile.open(filepath); | ||
callback(); // Call the callback function after the file is opened | ||
} | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:sph_plan/view/data_storage/root_view.dart'; | ||
|
||
class DataStorageAnsicht extends StatefulWidget { | ||
const DataStorageAnsicht({super.key}); | ||
|
||
@override | ||
State<StatefulWidget> createState() => _DataStorageAnsichtState(); | ||
} | ||
|
||
class _DataStorageAnsichtState extends State<DataStorageAnsicht> { | ||
|
||
|
||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return const DataStorageRootView(); | ||
} | ||
} | ||
|
Oops, something went wrong.