Merge branch 'wger-project:master' into master

This commit is contained in:
lenka369
2025-11-15 02:31:12 +01:00
committed by GitHub
11 changed files with 294 additions and 242 deletions

View File

@@ -9,7 +9,7 @@ runs:
uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version: 3.35.5
flutter-version: 3.35.7
cache: true
- name: Install Flutter dependencies

View File

@@ -67,14 +67,19 @@ jobs:
python bump-wger-version.py ${{ inputs.ref }}
../flatpak-flutter/flatpak-flutter.py --app-module wger flatpak-flutter.json
- name: Push updated config to flathub repository
uses: cpina/github-action-push-to-another-repository@main
env:
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
with:
destination-github-username: wger-project
destination-repository-name: de.wger.flutter
user-email: github-actions@github.com
target-branch: release-${{ inputs.ref }}
create-target-branch-if-needed: true
commit-message: Update to ${{ inputs.ref }}
# TODO: this is currently commented out because it seems the action used below
# doesn't work anymore. This is probably not all that surprising as it
# isn't being developed anymore. This should be update so that the process
# works automatically again, till then this can be done manually.
#- name: Push updated config to flathub repository
# uses: cpina/github-action-push-to-another-repository@main
# env:
# SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
# with:
# destination-github-username: wger-project
# destination-repository-name: de.wger.flutter
# user-email: github-actions@github.com
# target-branch: release-${{ inputs.ref }}
# create-target-branch-if-needed: true
# commit-message: Update to ${{ inputs.ref }}

View File

@@ -2,6 +2,10 @@
Thank you all for contributing to the project, you are true heroes! 🫶
*Generated on 2025-11-10*
---
## Contributors
- thisisyoussef - [https://github.com/thisisyoussef](https://github.com/thisisyoussef)
@@ -89,7 +93,7 @@ Thank you all for contributing to the project, you are true heroes! 🫶
- Thilina Herath - [https://github.com/thilinatnt](https://github.com/thilinatnt)
- ToldYouThat
- Yair Chen - [https://github.com/chenyair](https://github.com/chenyair)
- henok3878 - [https://github.com/henok3878](https://github.com/henok3878)
- henok3878 - [https://github.com/h3nock](https://github.com/h3nock)
- Patrick Witter - [https://github.com/patrickwitter](https://github.com/patrickwitter)
- ton-An - [https://github.com/ton-An](https://github.com/ton-An)
- Prakash Shekhar - [https://github.com/prakash-shekhar](https://github.com/prakash-shekhar)
@@ -100,40 +104,50 @@ Thank you all for contributing to the project, you are true heroes! 🫶
- Jannik Norden
- Allan Nordhøy - [https://github.com/comradekingu](https://github.com/comradekingu)
- Stefano Rossi - [https://github.com/stefanorossiti](https://github.com/stefanorossiti)
- Dylan Aird - [https://github.com/Dolaned](https://github.com/Dolaned)
## Translators
### Amharic
- henok3878 - [https://github.com/h3nock](https://github.com/h3nock)
### Arabic
- Anonymous - [https://github.com/weblate](https://github.com/weblate)
- Hanaa - [https://github.com/hn-n](https://github.com/hn-n)
- Ahmed zein - [https://github.com/Ahmed-Zein](https://github.com/Ahmed-Zein)
### Catalan
- Zixu Sun - [https://github.com/ziixu](https://github.com/ziixu)
- Anonymous - [https://github.com/weblate](https://github.com/weblate)
- guillem - [https://github.com/gbuendia](https://github.com/gbuendia)
### Chinese (Simplified Han script)
- Herb Huang
### Chinese (Simplified)
- 纪颖志 - [https://github.com/jiyingzhi](https://github.com/jiyingzhi)
- Yi-Han Hsiung - [https://github.com/AaronHsiung](https://github.com/AaronHsiung)
- Tsz Hong CHAN - [https://github.com/tomyan112](https://github.com/tomyan112)
- Eddie Tang - [https://github.com/EDED2314](https://github.com/EDED2314)
- Jing - [https://github.com/jingcheng16](https://github.com/jingcheng16)
- sr-c - [https://github.com/sr-c](https://github.com/sr-c)
- tony - [https://github.com/tonyxxliu](https://github.com/tonyxxliu)
- yiter
### Chinese (Traditional Han script)
- Peter Dave Hello - [https://github.com/PeterDaveHello](https://github.com/PeterDaveHello)
### Polish
### Chinese (Traditional)
- Karol Solecki - [https://github.com/karolsol](https://github.com/karolsol)
- Piotr Strebski - [https://github.com/strebski](https://github.com/strebski)
- Dawid Panyło
- Anonymous - [https://github.com/weblate](https://github.com/weblate)
- Marcin Schoenknecht
- Patryk - [https://github.com/byakurau](https://github.com/byakurau)
- Michał Homza - [https://github.com/HagiaHaya](https://github.com/HagiaHaya)
- Jacob - [https://github.com/devzom](https://github.com/devzom)
### Serbian
- Mladen Trišić - [https://github.com/mtrisic](https://github.com/mtrisic)
### Dutch
- Joey Haalboom - [https://github.com/JoeyHaalboom](https://github.com/JoeyHaalboom)
### Russian
- Алексей Курышко - [https://github.com/alexkuryshko](https://github.com/alexkuryshko)
- lightningcpu - [https://github.com/lightningcpu](https://github.com/lightningcpu)
- Кирилл Александрович Злобин - [https://github.com/gungstarbeiter](https://github.com/gungstarbeiter)
- Ivan Katkov - [https://github.com/Porphyrion](https://github.com/Porphyrion)
- Nikita Epifanov
- hugoalh
- Tsz Hong CHAN - [https://github.com/tomyan112](https://github.com/tomyan112)
- Chung-Wei Chung - [https://github.com/webb790709](https://github.com/webb790709)
- HY Cheng
### Croatian
@@ -141,18 +155,78 @@ Thank you all for contributing to the project, you are true heroes! 🫶
- Roland Geider - [https://github.com/rolandgeider](https://github.com/rolandgeider)
- SMilohanic - [https://github.com/sandimilohanic](https://github.com/sandimilohanic)
### Portuguese
### Czech
- Edson Wolf - [https://github.com/edsonblwolf](https://github.com/edsonblwolf)
- Fjuro - [https://github.com/Fjuro](https://github.com/Fjuro)
- Fjuro
- CaptainDolphy - [https://github.com/CaptainDolphy](https://github.com/CaptainDolphy)
- Roman Kalivoda - [https://github.com/RKCZ](https://github.com/RKCZ)
### Dutch
- Joey Haalboom - [https://github.com/JoeyHaalboom](https://github.com/JoeyHaalboom)
### English
- guillem - [https://github.com/gbuendia](https://github.com/gbuendia)
- Allan Nordhøy - [https://github.com/comradekingu](https://github.com/comradekingu)
- Roland Geider - [https://github.com/rolandgeider](https://github.com/rolandgeider)
### French
- William - [https://github.com/WilliamR312](https://github.com/WilliamR312)
- florent4014 - [https://github.com/florent4014](https://github.com/florent4014)
- Anonymous - [https://github.com/weblate](https://github.com/weblate)
- Wilton Rodrigues
- Guilherme Salomão - [https://github.com/salomaoparkour](https://github.com/salomaoparkour)
- Bruno de Moura - [https://github.com/bruunomooura](https://github.com/bruunomooura)
- Dalton Scavassa
- Stefan Taiguara - [https://github.com/Teitei011](https://github.com/Teitei011)
- Eduardo Menges Mattje - [https://github.com/EduMenges](https://github.com/EduMenges)
- Edu Cavalheiro - [https://github.com/EduCavalheiro](https://github.com/EduCavalheiro)
- João Goulart - [https://github.com/usehalter](https://github.com/usehalter)
- Xav Basco
- David Olewski - [https://github.com/Arigowin](https://github.com/Arigowin)
- yoyomax80400 - [https://github.com/yoyomax80400](https://github.com/yoyomax80400)
- loued - [https://github.com/Loued](https://github.com/Loued)
- Célian
- MrSniikyz - [https://github.com/BabyGeek](https://github.com/BabyGeek)
- Roland Geider - [https://github.com/rolandgeider](https://github.com/rolandgeider)
- J. Lavoie
- Antoine Vibien - [https://github.com/r1llettes](https://github.com/r1llettes)
- Stefano Rossi - [https://github.com/stefanorossiti](https://github.com/stefanorossiti)
### German
- kvnrmnn - [https://github.com/rmnn92](https://github.com/rmnn92)
- Anonymous - [https://github.com/weblate](https://github.com/weblate)
- Roland Geider - [https://github.com/rolandgeider](https://github.com/rolandgeider)
- Victor Jouhoff - [https://github.com/jouhoffv](https://github.com/jouhoffv)
- m4skedbyte
- Axel Steinbrecher
- Christoph Suesser - [https://github.com/TheFitzZZ](https://github.com/TheFitzZZ)
- Luis Lüscher - [https://github.com/lslschr](https://github.com/lslschr)
- mondstern
- J. Lavoie
- Marvin M - [https://github.com/M123-dev](https://github.com/M123-dev)
- Lydia
- Allan Nordhøy - [https://github.com/comradekingu](https://github.com/comradekingu)
### Greek
- Dimitrys Meliates
- Antonis-geo - [https://github.com/Antonis-geo](https://github.com/Antonis-geo)
### Hebrew
- Anonymous - [https://github.com/weblate](https://github.com/weblate)
- n,rdo
- Tomer Ben Rachel - [https://github.com/TomerPacific](https://github.com/TomerPacific)
### Hindi
- pavan arun bagwe - [https://github.com/pavanb0](https://github.com/pavanb0)
- Anonymous - [https://github.com/weblate](https://github.com/weblate)
- Debayan Sutradhar - [https://github.com/rnayabed](https://github.com/rnayabed)
### Indonesian
- aryakdaniswara - [https://github.com/aryakdaniswara](https://github.com/aryakdaniswara)
- Anonymous - [https://github.com/weblate](https://github.com/weblate)
- Debi Maulana Ahsan Halla
- Roland Geider - [https://github.com/rolandgeider](https://github.com/rolandgeider)
### Italian
@@ -171,32 +245,41 @@ Thank you all for contributing to the project, you are true heroes! 🫶
- mondstern
- Stefano Rossi - [https://github.com/stefanorossiti](https://github.com/stefanorossiti)
### French
### Japanese
- William - [https://github.com/WilliamR312](https://github.com/WilliamR312)
- florent4014 - [https://github.com/florent4014](https://github.com/florent4014)
- Anonymous - [https://github.com/weblate](https://github.com/weblate)
- Xav Basco
- David Olewski - [https://github.com/Arigowin](https://github.com/Arigowin)
- yoyomax80400 - [https://github.com/yoyomax80400](https://github.com/yoyomax80400)
- loued - [https://github.com/Loued](https://github.com/Loued)
- Célian
- MrSniikyz - [https://github.com/BabyGeek](https://github.com/BabyGeek)
- Roland Geider - [https://github.com/rolandgeider](https://github.com/rolandgeider)
- J. Lavoie
- Antoine Vibien - [https://github.com/r1llettes](https://github.com/r1llettes)
- Stefano Rossi - [https://github.com/stefanorossiti](https://github.com/stefanorossiti)
- Tsz Hong CHAN - [https://github.com/tomyan112](https://github.com/tomyan112)
- sasukeiscool - [https://github.com/sasukeiscool](https://github.com/sasukeiscool)
- yiter
### Ukrainian
### Norwegian Bokmål
- Максим Горпиніч - [https://github.com/Maksim2005UA](https://github.com/Maksim2005UA)
- Roland Geider - [https://github.com/rolandgeider](https://github.com/rolandgeider)
- Максим Горпиніч
- Allan Nordhøy - [https://github.com/comradekingu](https://github.com/comradekingu)
### Polish
- Karol Solecki - [https://github.com/karolsol](https://github.com/karolsol)
- Piotr Strebski - [https://github.com/strebski](https://github.com/strebski)
- Dawid Panyło
- Anonymous - [https://github.com/weblate](https://github.com/weblate)
- Dan - [https://github.com/Kefir2105](https://github.com/Kefir2105)
- Dan
- Tymofii Lytvynenko
- Artem - [https://github.com/defaultpage](https://github.com/defaultpage)
- Marcin Schoenknecht
- Patryk - [https://github.com/byakurau](https://github.com/byakurau)
- Michał Homza - [https://github.com/HagiaHaya](https://github.com/HagiaHaya)
- Jacob - [https://github.com/devzom](https://github.com/devzom)
### Portuguese
- Edson Wolf - [https://github.com/edsonblwolf](https://github.com/edsonblwolf)
- Anonymous - [https://github.com/weblate](https://github.com/weblate)
- Wilton Rodrigues
- Guilherme Salomão - [https://github.com/salomaoparkour](https://github.com/salomaoparkour)
- Bruno de Moura - [https://github.com/bruunomooura](https://github.com/bruunomooura)
- Dalton Scavassa
- Stefan Taiguara - [https://github.com/Teitei011](https://github.com/Teitei011)
- Eduardo Menges Mattje - [https://github.com/EduMenges](https://github.com/EduMenges)
- Edu Cavalheiro - [https://github.com/EduCavalheiro](https://github.com/EduCavalheiro)
- João Goulart - [https://github.com/usehalter](https://github.com/usehalter)
### Portuguese (Brazil)
@@ -210,99 +293,26 @@ Thank you all for contributing to the project, you are true heroes! 🫶
- Luigi Henrick Feitoza Silva - [https://github.com/luigihenrick](https://github.com/luigihenrick)
- João Hortêncio Moraes - [https://github.com/joaohortencio](https://github.com/joaohortencio)
### Tamil
- தமிழ்நேரம் - [https://github.com/TamilNeram](https://github.com/TamilNeram)
### Chinese (Simplified Han script)
- Herb Huang
### Hindi
- pavan arun bagwe - [https://github.com/pavanb0](https://github.com/pavanb0)
- Anonymous - [https://github.com/weblate](https://github.com/weblate)
- Debayan Sutradhar - [https://github.com/rnayabed](https://github.com/rnayabed)
### Turkish
- Oğuz Ersen - [https://github.com/oersen](https://github.com/oersen)
- Roland Geider - [https://github.com/rolandgeider](https://github.com/rolandgeider)
- Cem Avcı - [https://github.com/cem256](https://github.com/cem256)
- Oğuz Ersen
- Cenk Cidecio - [https://github.com/ccidecio](https://github.com/ccidecio)
- ToldYouThat
### German
- kvnrmnn - [https://github.com/rmnn92](https://github.com/rmnn92)
- Anonymous - [https://github.com/weblate](https://github.com/weblate)
- Roland Geider - [https://github.com/rolandgeider](https://github.com/rolandgeider)
- Victor Jouhoff - [https://github.com/jouhoffv](https://github.com/jouhoffv)
- m4skedbyte
- Axel Steinbrecher
- Christoph Suesser - [https://github.com/TheFitzZZ](https://github.com/TheFitzZZ)
- Luis Lüscher - [https://github.com/lslschr](https://github.com/lslschr)
- mondstern
- J. Lavoie
- Marvin M - [https://github.com/M123-dev](https://github.com/M123-dev)
- Lydia
- Allan Nordhøy - [https://github.com/comradekingu](https://github.com/comradekingu)
### Indonesian
- aryakdaniswara - [https://github.com/aryakdaniswara](https://github.com/aryakdaniswara)
- Anonymous - [https://github.com/weblate](https://github.com/weblate)
- Debi Maulana Ahsan Halla
- Roland Geider - [https://github.com/rolandgeider](https://github.com/rolandgeider)
### Catalan
- Zixu Sun - [https://github.com/ziixu](https://github.com/ziixu)
- Anonymous - [https://github.com/weblate](https://github.com/weblate)
- guillem - [https://github.com/gbuendia](https://github.com/gbuendia)
### Chinese (Simplified)
- 纪颖志 - [https://github.com/jiyingzhi](https://github.com/jiyingzhi)
- Yi-Han Hsiung - [https://github.com/AaronHsiung](https://github.com/AaronHsiung)
- Tsz Hong CHAN - [https://github.com/tomyan112](https://github.com/tomyan112)
- Eddie Tang - [https://github.com/EDED2314](https://github.com/EDED2314)
- Jing - [https://github.com/jingcheng16](https://github.com/jingcheng16)
- sr-c - [https://github.com/sr-c](https://github.com/sr-c)
- tony - [https://github.com/tonyxxliu](https://github.com/tonyxxliu)
- yiter
### Greek
- Dimitrys Meliates
- Antonis-geo - [https://github.com/Antonis-geo](https://github.com/Antonis-geo)
### Czech
- Fjuro - [https://github.com/Fjuro](https://github.com/Fjuro)
- Fjuro
- CaptainDolphy - [https://github.com/CaptainDolphy](https://github.com/CaptainDolphy)
- Roman Kalivoda - [https://github.com/RKCZ](https://github.com/RKCZ)
### Arabic
### Portuguese (Portugal)
- Anonymous - [https://github.com/weblate](https://github.com/weblate)
- Hanaa - [https://github.com/hn-n](https://github.com/hn-n)
- Ahmed zein - [https://github.com/Ahmed-Zein](https://github.com/Ahmed-Zein)
### Hebrew
### Romanian
- Anonymous - [https://github.com/weblate](https://github.com/weblate)
- n,rdo
- Tomer Ben Rachel - [https://github.com/TomerPacific](https://github.com/TomerPacific)
- Bogdan Bujor - [https://github.com/qSharpy](https://github.com/qSharpy)
- dimii27 - [https://github.com/dimii27](https://github.com/dimii27)
### Japanese
### Russian
- Anonymous - [https://github.com/weblate](https://github.com/weblate)
- Tsz Hong CHAN - [https://github.com/tomyan112](https://github.com/tomyan112)
- sasukeiscool - [https://github.com/sasukeiscool](https://github.com/sasukeiscool)
- yiter
- Алексей Курышко - [https://github.com/alexkuryshko](https://github.com/alexkuryshko)
- lightningcpu - [https://github.com/lightningcpu](https://github.com/lightningcpu)
- Кирилл Александрович Злобин - [https://github.com/gungstarbeiter](https://github.com/gungstarbeiter)
- Ivan Katkov - [https://github.com/Porphyrion](https://github.com/Porphyrion)
- Nikita Epifanov
### Serbian
- Mladen Trišić - [https://github.com/mtrisic](https://github.com/mtrisic)
### Spanish
@@ -317,33 +327,26 @@ Thank you all for contributing to the project, you are true heroes! 🫶
- Roland Geider - [https://github.com/rolandgeider](https://github.com/rolandgeider)
- martingetzel - [https://github.com/martingetzel](https://github.com/martingetzel)
### Chinese (Traditional)
### Tamil
- hugoalh
- Tsz Hong CHAN - [https://github.com/tomyan112](https://github.com/tomyan112)
- Chung-Wei Chung - [https://github.com/webb790709](https://github.com/webb790709)
- HY Cheng
- தமிழ்நேரம் - [https://github.com/TamilNeram](https://github.com/TamilNeram)
### Portuguese (Portugal)
### Turkish
- Oğuz Ersen - [https://github.com/oersen](https://github.com/oersen)
- Roland Geider - [https://github.com/rolandgeider](https://github.com/rolandgeider)
- Cem Avcı - [https://github.com/cem256](https://github.com/cem256)
- Oğuz Ersen
- Cenk Cidecio - [https://github.com/ccidecio](https://github.com/ccidecio)
- ToldYouThat
### Ukrainian
- Максим Горпиніч - [https://github.com/Maksim2005UA](https://github.com/Maksim2005UA)
- Roland Geider - [https://github.com/rolandgeider](https://github.com/rolandgeider)
- Максим Горпиніч
- Anonymous - [https://github.com/weblate](https://github.com/weblate)
### Romanian
- Bogdan Bujor - [https://github.com/qSharpy](https://github.com/qSharpy)
- dimii27 - [https://github.com/dimii27](https://github.com/dimii27)
### English
- guillem - [https://github.com/gbuendia](https://github.com/gbuendia)
- Allan Nordhøy - [https://github.com/comradekingu](https://github.com/comradekingu)
- Roland Geider - [https://github.com/rolandgeider](https://github.com/rolandgeider)
### Norwegian Bokmål
- Roland Geider - [https://github.com/rolandgeider](https://github.com/rolandgeider)
- Allan Nordhøy - [https://github.com/comradekingu](https://github.com/comradekingu)
### Amharic
- henok3878 - [https://github.com/henok3878](https://github.com/henok3878)
- Dan - [https://github.com/Kefir2105](https://github.com/Kefir2105)
- Dan
- Tymofii Lytvynenko
- Artem - [https://github.com/defaultpage](https://github.com/defaultpage)

View File

@@ -11,8 +11,8 @@ GEM
artifactory (3.0.17)
atomos (0.1.3)
aws-eventstream (1.4.0)
aws-partitions (1.1163.0)
aws-sdk-core (3.232.0)
aws-partitions (1.1181.0)
aws-sdk-core (3.236.0)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.992.0)
aws-sigv4 (~> 1.9)
@@ -20,18 +20,18 @@ GEM
bigdecimal
jmespath (~> 1, >= 1.6.1)
logger
aws-sdk-kms (1.112.0)
aws-sdk-core (~> 3, >= 3.231.0)
aws-sdk-kms (1.117.0)
aws-sdk-core (~> 3, >= 3.234.0)
aws-sigv4 (~> 1.5)
aws-sdk-s3 (1.199.0)
aws-sdk-core (~> 3, >= 3.231.0)
aws-sdk-s3 (1.203.0)
aws-sdk-core (~> 3, >= 3.234.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.5)
aws-sigv4 (1.12.1)
aws-eventstream (~> 1, >= 1.0.2)
babosa (1.0.4)
base64 (0.3.0)
bigdecimal (3.2.3)
bigdecimal (3.3.1)
claide (1.1.0)
colored (1.2)
colored2 (3.1.2)
@@ -161,7 +161,7 @@ GEM
httpclient (2.9.0)
mutex_m
jmespath (1.6.2)
json (2.15.0)
json (2.16.0)
jwt (2.10.2)
base64
logger (1.7.0)
@@ -173,11 +173,11 @@ GEM
nanaimo (0.4.0)
naturally (2.3.0)
nkf (0.2.0)
optparse (0.6.0)
optparse (0.8.0)
os (1.1.4)
plist (3.7.2)
public_suffix (6.0.2)
rake (13.3.0)
rake (13.3.1)
representable (3.2.0)
declarative (< 0.1.0)
trailblazer-option (>= 0.1.1, < 0.2.0)
@@ -225,6 +225,7 @@ PLATFORMS
arm64-darwin-22
arm64-darwin-23
arm64-darwin-24
arm64-darwin-25
x86_64-linux
DEPENDENCIES
@@ -235,4 +236,4 @@ DEPENDENCIES
mutex_m
BUNDLED WITH
2.6.9
2.7.2

View File

@@ -0,0 +1 @@
wger Workout Manager

View File

@@ -78,6 +78,12 @@
</screenshot>
</screenshots>
<releases>
<release version="1.9.1" date="2025-11-10">
<description>
<p>Bug fixes and improvements.</p>
</description>
<url>https://github.com/wger-project/flutter/releases/tag/1.9.1</url>
</release>
<release version="1.9.0" date="2025-09-23">
<description>
<p>Bug fixes and improvements.</p>

View File

@@ -1,20 +1,73 @@
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:logging/logging.dart';
import 'package:wger/l10n/generated/app_localizations.dart';
class ImageFormatNotSupported extends StatelessWidget {
Widget handleImageError(
BuildContext context,
Object error,
StackTrace? stackTrace,
String imageUrl,
) {
final imageFormat = imageUrl.split('.').last.toUpperCase();
final logger = Logger('handleImageError');
logger.warning('Failed to load image $imageUrl: $error, $stackTrace');
// NOTE: for the moment the other error messages are not localized
String message = '';
switch (error.runtimeType) {
case NetworkImageLoadException:
message = 'Network error';
case HttpException:
message = 'Http error';
case FormatException:
//TODO: not sure if this is the right exception for unsupported image formats?
message = AppLocalizations.of(context).imageFormatNotSupported(imageFormat);
default:
message = 'Other exception';
}
return AspectRatio(
aspectRatio: 1,
child: ImageError(
message,
errorMessage: error.toString(),
),
);
}
class ImageError extends StatelessWidget {
final String title;
final String? errorMessage;
const ImageFormatNotSupported(this.title, {super.key});
const ImageError(this.title, {this.errorMessage, super.key});
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
return Container(
padding: const EdgeInsets.all(5),
color: theme.colorScheme.errorContainer,
child: Row(
child: Column(
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
spacing: 8,
children: [const Icon(Icons.broken_image), Text(title)],
children: [
if (errorMessage != null)
Tooltip(message: errorMessage, child: const Icon(Icons.broken_image))
else
const Icon(Icons.broken_image),
Text(
title,
overflow: TextOverflow.ellipsis,
maxLines: 2,
textAlign: TextAlign.center,
),
],
),
);
}

View File

@@ -37,14 +37,12 @@ class ExerciseImageWidget extends StatelessWidget {
? Image.network(
image!.url,
semanticLabel: 'Exercise image',
errorBuilder: (context, error, stackTrace) {
_logger.warning('Failed to load image ${image!.url}: $error, $stackTrace');
final imageFormat = image!.url.split('.').last.toUpperCase();
return ImageFormatNotSupported(
i18n.imageFormatNotSupported(imageFormat),
);
},
errorBuilder: (context, error, stackTrace) => handleImageError(
context,
error,
stackTrace,
image!.url,
),
)
: const Image(
image: AssetImage('assets/images/placeholder.png'),

View File

@@ -36,8 +36,6 @@ class Gallery extends StatelessWidget {
@override
Widget build(BuildContext context) {
final provider = Provider.of<GalleryProvider>(context);
final i18n = AppLocalizations.of(context);
final theme = Theme.of(context);
return Padding(
padding: const EdgeInsets.all(5),
@@ -66,23 +64,12 @@ class Gallery extends StatelessWidget {
image: NetworkImage(currentImage.url!),
fit: BoxFit.cover,
imageSemanticLabel: currentImage.description,
imageErrorBuilder: (context, error, stackTrace) {
final imageFormat = currentImage.url!.split('.').last.toUpperCase();
return AspectRatio(
aspectRatio: 1,
child: Container(
color: theme.colorScheme.errorContainer,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
spacing: 8,
children: [
const Icon(Icons.broken_image),
Text(i18n.imageFormatNotSupported(imageFormat)),
],
),
),
);
},
imageErrorBuilder: (context, error, stackTrace) => handleImageError(
context,
error,
stackTrace,
currentImage.url!,
),
),
);
},
@@ -102,7 +89,6 @@ class ImageDetail extends StatelessWidget {
@override
Widget build(BuildContext context) {
final i18n = AppLocalizations.of(context);
return Container(
key: Key('image-${image.id!}-detail'),
padding: const EdgeInsets.all(10),
@@ -116,13 +102,12 @@ class ImageDetail extends StatelessWidget {
child: Image.network(
image.url!,
semanticLabel: image.description,
errorBuilder: (context, error, stackTrace) {
final imageFormat = image.url!.split('.').last.toUpperCase();
return ImageFormatNotSupported(
i18n.imageFormatNotSupported(imageFormat),
);
},
errorBuilder: (context, error, stackTrace) => handleImageError(
context,
error,
stackTrace,
image.url!,
),
),
),
Padding(

View File

@@ -373,10 +373,10 @@ packages:
dependency: "direct main"
description:
name: flex_seed_scheme
sha256: b06d8b367b84cbf7ca5c5603c858fa5edae88486c4e4da79ac1044d73b6c62ec
sha256: "828291a5a4d4283590541519d8b57821946660ac61d2e07d955f81cfcab22e5d"
url: "https://pub.dev"
source: hosted
version: "3.5.1"
version: "3.6.1"
flutter:
dependency: "direct main"
description: flutter
@@ -484,10 +484,10 @@ packages:
dependency: "direct main"
description:
name: flutter_svg
sha256: b9c2ad5872518a27507ab432d1fb97e8813b05f0fc693f9d40fad06d073e0678
sha256: "055de8921be7b8e8b98a233c7a5ef84b3a6fcc32f46f1ebf5b9bb3576d108355"
url: "https://pub.dev"
source: hosted
version: "2.2.1"
version: "2.2.2"
flutter_svg_icons:
dependency: "direct main"
description:
@@ -555,10 +555,10 @@ packages:
dependency: "direct main"
description:
name: get_it
sha256: a4292e7cf67193f8e7c1258203104eb2a51ec8b3a04baa14695f4064c144297b
sha256: ae78de7c3f2304b8d81f2bb6e320833e5e81de942188542328f074978cc0efa9
url: "https://pub.dev"
source: hosted
version: "8.2.0"
version: "8.3.0"
glob:
dependency: transitive
description:

View File

@@ -21,7 +21,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
# - the version number is taken from the git tag vX.Y.Z
# - the build number is computed by reading the last one from the play store
# and increasing by one
version: 1.9.0+100
version: 1.9.1+110
environment:
sdk: '>=3.8.0 <4.0.0'
@@ -40,16 +40,16 @@ dependencies:
equatable: ^2.0.7
fl_chart: ^1.1.1
flex_color_scheme: ^8.3.1
flex_seed_scheme: ^3.5.1
flex_seed_scheme: ^3.6.1
flutter_html: ^3.0.0
flutter_staggered_grid_view: ^0.7.0
flutter_svg: ^2.2.1
flutter_svg: ^2.2.2
flutter_svg_icons: ^0.0.1
flutter_typeahead: ^5.2.0
flutter_zxing: ^2.2.1
font_awesome_flutter: ^10.12.0
freezed_annotation: ^3.0.0
get_it: ^8.2.0
get_it: ^8.3.0
http: ^1.5.0
image_picker: ^1.2.0
intl: ^0.20.0