svthalia / Reaxit

The latest ThaliApp built on Flutter.
GNU General Public License v3.0
11 stars 3 forks source link

Show event documents #421

Closed Scarletto closed 1 year ago

Scarletto commented 1 year ago

Closes #401.

Summary

Made class Document (as a JsonSerializable) and added it to the Event model and serialization.

Added dependency open_file_plus, a helpful small package that makes opening downloaded files in external apps easy and clean.

Made FileButton, an ElevatedButton that gets a file via ThaliaCacheManager() and opens it in an external application.

Added FileButtons for all event documents in EventScreen.

How to test

Steps to test the changes you made:

  1. Go to any event with documents like TPay Test.
  2. Click on any document.
Scarletto commented 1 year ago

hella old dart version ayo

JAicewizard commented 1 year ago

Did it work out removing the mime-type converters?

Scarletto commented 1 year ago

Did it work out removing the mime-type converters?

Yes, I now download the file, copy the file with the proper extension and put it in the cache, delete the old cached file.

JAicewizard commented 1 year ago

You can merge if you want. Would be nice if we could not use the file extension and just base it off MIME but I dont think this will be abused