Merge branch 'master' into feature/flexible-routines

# Conflicts:
#	android/app/build.gradle
#	lib/l10n/app_ta.arb
#	lib/widgets/measurements/charts.dart
#	macos/Podfile.lock
#	pubspec.lock
#	pubspec.yaml
This commit is contained in:
Roland Geider
2025-01-05 01:47:54 +01:00
29 changed files with 719 additions and 235 deletions

View File

@@ -26,7 +26,7 @@ jobs:
uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version: 3.24.x
flutter-version: 3.27.x
- name: Flutter info
run: |

View File

@@ -20,11 +20,14 @@ jobs:
with:
cache: true
channel: 'stable'
flutter-version: '3.24.x'
flutter-version: '3.27.x'
- run: dart --version
- run: flutter --version
- name: Install sqlite3-dev
run: sudo apt install libsqlite3-dev
- name: Install app dependencies
run: flutter pub get

View File

@@ -4,7 +4,42 @@
# This file should be version controlled and should not be manually edited.
version:
revision: bbfbf1770cca2da7c82e887e4e4af910034800b6
channel: stable
revision: "8495dee1fd4aacbe9de707e7581203232f591b2f"
channel: "stable"
project_type: app
# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: 8495dee1fd4aacbe9de707e7581203232f591b2f
base_revision: 8495dee1fd4aacbe9de707e7581203232f591b2f
- platform: android
create_revision: 8495dee1fd4aacbe9de707e7581203232f591b2f
base_revision: 8495dee1fd4aacbe9de707e7581203232f591b2f
- platform: ios
create_revision: 8495dee1fd4aacbe9de707e7581203232f591b2f
base_revision: 8495dee1fd4aacbe9de707e7581203232f591b2f
- platform: linux
create_revision: 8495dee1fd4aacbe9de707e7581203232f591b2f
base_revision: 8495dee1fd4aacbe9de707e7581203232f591b2f
- platform: macos
create_revision: 8495dee1fd4aacbe9de707e7581203232f591b2f
base_revision: 8495dee1fd4aacbe9de707e7581203232f591b2f
- platform: web
create_revision: 8495dee1fd4aacbe9de707e7581203232f591b2f
base_revision: 8495dee1fd4aacbe9de707e7581203232f591b2f
- platform: windows
create_revision: 8495dee1fd4aacbe9de707e7581203232f591b2f
base_revision: 8495dee1fd4aacbe9de707e7581203232f591b2f
# User provided section
# List of Local paths (relative to this file) that should be
# ignored by the migrate tool.
#
# Files that are not part of the templates will be ignored by default.
unmanaged_files:
- 'lib/main.dart'
- 'ios/Runner.xcodeproj/project.pbxproj'

View File

@@ -43,7 +43,7 @@ Alternatively, you can use the test server (the db is reset every day):
Install Flutter and all its dependencies, and create a new virtual device:
<https://flutter.dev/docs/get-started/install>.
The app currently uses flutter 3.24
The app currently uses flutter 3.27
### 3

View File

@@ -12,16 +12,6 @@ if (localPropertiesFile.exists()) {
}
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
// Keys for the android play store
def keystoreProperties = new Properties()
@@ -32,33 +22,27 @@ if (keystorePropertiesFile.exists()) {
android {
namespace = "de.wger.flutter"
compileSdkVersion 34
ndkVersion "25.1.8937393"
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17
jvmTarget = JavaVersion.VERSION_11
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
lintOptions {
disable 'InvalidPackage'
}
defaultConfig {
// Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "de.wger.flutter"
minSdkVersion 21
targetSdkVersion 34
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
minSdk = flutter.minSdkVersion
targetSdk = flutter.targetSdkVersion
versionCode = flutter.versionCode
versionName = flutter.versionName
}
signingConfigs {
@@ -71,8 +55,6 @@ android {
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.release
}
debug {

View File

@@ -7,9 +7,13 @@ allprojects {
rootProject.buildDir = '../build'
subprojects {
// Workaround for APK builds - https://github.com/flutter/flutter/issues/153281
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
// Workaround for APK builds - https://github.com/flutter/flutter/issues/153281
subprojects {
afterEvaluate { project ->
if (project.extensions.findByName("android") != null) {
Integer pluginCompileSdk = project.android.compileSdk
@@ -25,13 +29,39 @@ subprojects {
+ " to increase their compileSdk to the latest (otherwise try updating to the latest version)."
)
project.android {
compileSdk 31
compileSdk 34
}
}
}
}
}
project.buildDir = "${rootProject.buildDir}/${project.name}"
// Workaround for " Could not create an instance of type com.android.build.api.variant.impl.LibraryVariantBuilderImpl." error
// Note that this instance seems to be caused by flutter_barcode_scanner, which hasn't been
// updated in three years, might be time to look for a different package
subprojects {
afterEvaluate { project ->
if (project.hasProperty('android')) {
project.android {
if (namespace == null) {
project.logger.error(
"Warning: project "
+ project.name
+ " has no namespace set, this will prevent compilation, "
+ " setting one now to "
+ project.group
+ "\nIf there is not a new version of " + project.name + ", consider filing an issue against "
+ project.name
)
namespace project.group
}
}
}
}
}
subprojects {
project.evaluationDependsOn(':app')
}

View File

@@ -1,6 +1,5 @@
#Fri Jun 23 08:50:38 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip

View File

@@ -18,8 +18,8 @@ pluginManagement {
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.3.1" apply false
id "org.jetbrains.kotlin.android" version "1.7.10" apply false
id "com.android.application" version "8.2.2" apply false
id "org.jetbrains.kotlin.android" version "2.0.20" apply false
}
include ":app"

View File

52
flatpak/app-icon-grid.svg Normal file
View File

@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" height="127.99999" id="svg1"
version="1.1" viewBox="0 0 33.866671 33.866665" width="128.00002"
xmlns="http://www.w3.org/2000/svg"
inkscape:export-filename="../Entwicklung/wger/flutter/flatpak/logo512.png"
inkscape:export-xdpi="383.99997" inkscape:export-ydpi="383.99997"
inkscape:version="1.3 (0e150ed, 2023-07-21)" sodipodi:docname="app-icon-grid.svg"
xml:space="preserve"><sodipodi:namedview
bordercolor="currentColor"
borderopacity="0.25"
id="namedview1"
pagecolor="#ffffff"
showgrid="false"
inkscape:current-layer="layer1"
inkscape:cx="68.059028"
inkscape:cy="67.351921"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="px"
inkscape:pagecheckerboard="0"
inkscape:pageopacity="0.0"
inkscape:showpageshadow="2"
inkscape:window-height="1004"
inkscape:window-maximized="0"
inkscape:window-width="1728"
inkscape:window-x="2731"
inkscape:window-y="124"
inkscape:zoom="2.8284271" />
<defs id="defs1" />
<g id="layer1" transform="translate(-32.279167,-138.64166)" inkscape:groupmode="layer"
inkscape:label="Layer 1"><circle
style="display:inline;opacity:0.2;fill:none;fill-opacity:1;stroke:currentColor;stroke-width:0.261937;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal;enable-background:new"
cx="49.212509"
cy="155.575"
id="circle2892"
r="15.743801" />
<rect
style="display:inline;opacity:0.2;fill:none;fill-opacity:1;stroke:currentColor;stroke-width:0.261937;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal;enable-background:new"
height="27.254602" id="rect2896" rx="2.096508" ry="2.096508" width="27.254602"
x="35.585205" y="141.94769" />
<g id="layer1-2" transform="matrix(0.32793309,0,0,0.32793309,9.2292922,118.73149)"
inkscape:label="Ebene 1"><path
style="fill:#2a4c7d;fill-opacity:1;stroke:#2a4c7d;stroke-width:0.250912;stroke-opacity:1"
d="m 119.24535,156.14635 c -11.30087,-5.25195 -20.477151,-10.71647 -32.026846,-17.17666 -5.209585,-2.91363 -5.521935,-3.33309 -7.088981,-5.078 -0.628356,-0.69967 -0.949626,-1.5731 -0.949626,-2.09903 0,-6.25575 0,-19.57957 0,-19.57957 V 92.633492 c 0,-0.529453 0.388777,-1.437466 0.837451,-2.006725 1.905684,-2.417852 2.039373,-2.508366 7.456347,-5.44992 8.609232,-4.891712 17.881585,-8.879857 26.458905,-13.781576 5.60244,-3.206248 7.07027,-3.64232 9.87937,-2.934989 1.78871,0.450395 36.96673,19.013221 38.40647,20.356984 0.51333,0.479114 1.15499,1.151574 1.58609,1.835763 0.38406,0.609518 0.86538,1.428234 0.86538,1.980463 v 19.456238 19.45623 c 0,0.57418 -0.41316,1.08395 -0.74242,1.55435 -0.99791,1.42567 -2.19608,2.73782 -3.65592,3.72685 -0.37773,0.25591 -1.56393,1.00043 -2.30115,1.44708 -9.40184,5.02554 -18.58109,10.08136 -27.11373,14.61154 -0.77197,0.40923 -1.74807,0.94024 -2.16915,1.18002 -3.90779,2.22537 -4.24475,2.35774 -6.22884,2.44686 -1.42618,0.064 -2.27404,-0.0326 -3.21335,-0.36631 z"
id="path28-3"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
sodipodi:nodetypes="ccsscsaccssascsasccssc" />
<path style="fill:#ffffff;stroke-width:2.34985"
d="m 103.12614,95.844789 v 2.349812 h -5.87463 v 2.349919 h -5.874635 v 8.22445 h -2.34981 v 7.04954 h 2.34981 v 8.22446 h 5.874635 v 2.34981 h 5.87463 v 2.34991 h 8.22445 v -12.92418 h 21.14862 v 12.92418 h 8.22445 v -2.34991 h 5.87464 v -2.34981 h 5.87463 v -8.22446 h 2.34981 v -7.04954 h -2.34981 v -8.22445 H 146.5983 V 98.1946 h -5.87464 v -2.349812 h -8.22445 V 108.76897 H 111.35059 V 95.844789 Z m 2.34982,2.349812 h 3.52473 v 28.198179 h -3.52473 z m 29.37307,0 h 3.52481 v 28.198179 h -3.52481 z m -35.247707,2.349919 h 3.524817 v 23.49845 h -3.524817 z m 41.122337,0 h 3.52473 v 23.49845 h -3.52473 z m -46.996957,2.34982 h 3.524806 v 18.7988 h -3.524806 z m 52.871597,0 h 3.52472 v 18.7988 h -3.52472 z m -35.24771,8.22444 h 21.14862 v 2.34983 h -21.14862 z"
fill="#000000" id="path981" inkscape:export-xdpi="96" inkscape:export-ydpi="96" /></g></g></svg>

After

Width:  |  Height:  |  Size: 4.6 KiB

View File

@@ -2,7 +2,40 @@
<component type="desktop-application">
<id>de.wger.flutter</id>
<name>wger</name>
<summary>Fitness/workout, nutrition and weight tracker</summary>
<summary>Fitness and nutrition tracker</summary>
<description>
<p>wger is a free and open-source fitness application designed to help you achieve your
fitness goals.
</p>
<ul>
<li>
Workout Management
<ul>
<li>Create and customize workout routines tailored to your fitness level and
goals
</li>
<li>Track your progress with detailed exercise logs</li>
<li>Access a vast library of exercises</li>
</ul>
</li>
<li>
Nutrition Tracking
<ul>
<li>Log your food intake using the Open Food Facts database</li>
<li>Calculate your calorie intake and macronutrient breakdown</li>
<li>Set personalized dietary goals and track your progress</li>
</ul>
</li>
<li>
Body Measurement Tracking
<ul>
<li>Monitor your body weight, body fat percentage, and other measurements</li>
<li>Visualize your progress with charts and graphs</li>
</ul>
</li>
</ul>
</description>
<metadata_license>CC0-1.0</metadata_license>
<project_license>AGPL-3.0-or-later</project_license>
@@ -13,79 +46,17 @@
</recommends>
<developer_name>wger</developer_name>
<url type="homepage">https://wger.de/</url>
<url type="contact">https://fosstodon.org/@wger</url>
<url type="bugtracker">https://github.com/wger-project/flutter/issues</url>
<url type="donation">https://buymeacoffee.com/wger</url>
<url type="vcs-browser">https://github.com/wger-project/flutter</url>
<url type="translate">https://hosted.weblate.org/engage/wger/</url>
<description>
<p>
From fitness lovers to fitness lovers get your health organized with WGER,
your Workout Manager!
</p>
<p>
Have you already found your #1 fitness app and do you love to create your own sports
routines? No matter what type of sporty beast you are we all have something in common:
We love to keep track of our health data &lt;3
</p>
<p>
So we dont judge you for still managing your fitness journey with your handy little
workout log book but welcome to 2021!
</p>
<p>
We have developed a 100% free digital health and fitness tracker app for you, sized down
to the most relevant features to make your life easier. Get started, keep training and
celebrate your progress!
</p>
<p>wger is an Open Source project and all about:</p>
<ul>
<li>
Your body:
No need to google for the ingredients of your favourite treats choose your daily
meals from more than 78000 products and see the nutritional values. Add meals to the
nutritional plan and keep an overview of your diet in the calendar.
</li>
<li>
Your workouts:
You know what is best for your body. Create your own workouts out of a growing
variety from 200 different exercises. Then, use the Gym Mode to guide you through
the training while you log your weights with one tap.
</li>
<li>
Your progress:
Never lose sight of your goals. Track your weight and keep your statistics.
</li>
<li>
Your data:
wger is your personalized fitness diary but you own your data. Use the REST API to
access and do amazing things with it.
</li>
</ul>
<p>Please note: This free app is not based on additional fundings and we dont ask you to
donate money. More than that it is a community project which is growing constantly. So
be prepared for new features anytime!
</p>
<p>
OpenSource what does that mean?
Open Source means that the whole source code for this app and the server it talks to is
free and available to anybody:
</p>
<ul>
<li>Do you want to run wger on your own server for you or your local gym? Go ahead!</li>
<li>Do you miss a feature and want to implement it? Start now!</li>
<li>Do you want to check that nothing is being sent anywhere? You can!</li>
</ul>
<p>Join our community and become a part of sport enthusiasts and IT geeks from all over the
world. We keep working on adjusting and optimizing the app customized to our needs. We
love your input so feel free to jump in anytime and contribute your wishes and ideas!
</p>
<ul>
<li>find the source code on https://github.com/wger-project
</li>
<li>
ask your questions or just say hello on our discord Server
https://discord.gg/rPWFv6W
</li>
</ul>
</description>
<!-- https://docs.flathub.org/banner-preview/ -->
<branding>
<color scheme_preference="light" type="primary">#a2aedd</color>
<color scheme_preference="dark" type="primary">#687bd9</color>
</branding>
<screenshots>
<screenshot type="default">

View File

@@ -1,23 +1,23 @@
{
"appId": "de.wger.flutter",
"lowercaseAppName": "wger",
"githubReleaseOrganization": "wger-project",
"githubReleaseProject": "flutter",
"localLinuxBuildDir": "../build/linux",
"appStreamPath": "de.wger.flutter.metainfo.xml",
"desktopPath": "de.wger.flutter.desktop",
"icons": {
"64x64": "logo64.png",
"128x126": "logo128.png",
"512x512": "logo512.png"
},
"freedesktopRuntime": "22.08",
"finishArgs": [
"--share=ipc",
"--share=network",
"--socket=fallback-x11",
"--socket=wayland",
"--socket=pulseaudio",
"--device=dri"
]
"appId": "de.wger.flutter",
"lowercaseAppName": "wger",
"githubReleaseOrganization": "wger-project",
"githubReleaseProject": "flutter",
"localLinuxBuildDir": "../build/linux",
"appStreamPath": "de.wger.flutter.metainfo.xml",
"desktopPath": "de.wger.flutter.desktop",
"icons": {
"64x64": "logo64.png",
"128x126": "logo128.png",
"512x512": "logo512.png"
},
"freedesktopRuntime": "24.08",
"finishArgs": [
"--share=ipc",
"--share=network",
"--socket=fallback-x11",
"--socket=wayland",
"--socket=pulseaudio",
"--device=dri"
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@@ -112,7 +112,7 @@ SPEC CHECKSUMS:
package_info_plus: c0502532a26c7662a62a356cebe2692ec5fe4ec4
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
pointer_interceptor_ios: 508241697ff0947f853c061945a8b822463947c1
rive_common: 3a4c254c6e4db7e4b9e05daeb3d1f47ae4f7bf76
rive_common: 4743dbfd2911c99066547a3c6454681e0fa907df
shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78
sqlite3: 0aa20658a9b238a3b1ff7175eb7bdd863b0ab4fd
sqlite3_flutter_libs: b55ef23cfafea5318ae5081e0bf3fbbce8417c94
@@ -121,4 +121,4 @@ SPEC CHECKSUMS:
PODFILE CHECKSUM: 4e8f8b2be68aeea4c0d5beb6ff1e79fface1d048
COCOAPODS: 1.16.0
COCOAPODS: 1.16.2

View File

@@ -147,7 +147,7 @@
"@logMeal": {},
"addIngredient": "सामग्री जोड़ें",
"@addIngredient": {},
"logIngredient": "पोषण डायरी में सहेजें",
"logIngredient": "पोषण डायरी में सामग्री दर्ज करें",
"@logIngredient": {},
"searchIngredient": "सामग्री खोजें",
"@searchIngredient": {},
@@ -320,5 +320,15 @@
"scanBarcode": "बारकोड स्कैन करें",
"@scanBarcode": {},
"close": "बंद करें",
"@close": {}
"@close": {},
"userProfile": "आपकी प्रोफ़ाइल",
"@userProfile": {},
"invalidUsername": "कृपया सही यूजरनेम प्रविष्ट करे",
"@invalidUsername": {
"description": "Error message when the user enters an invalid username"
},
"onlyLogging": "सिर्फ कैलोरी ट्रैक करें",
"@onlyLogging": {},
"onlyLoggingHelpText": "यदि आप केवल अपनी कैलोरी लॉग करना चाहते हैं और विशिष्ट भोजन के साथ विस्तृत पोषण योजना नहीं बनाना चाहते हैं तो बॉक्स को चेक करें",
"@onlyLoggingHelpText": {}
}

View File

@@ -3,7 +3,7 @@
"@userProfile": {},
"weightUnit": "எடை அலகு",
"@weightUnit": {},
"setNr": "{nr} அமைக்கவும்",
"setNr": "{nr} அமை",
"@setNr": {
"description": "Header in form indicating the number of the current set. Can also be translated as something like 'Set Nr. xy'.",
"type": "text",
@@ -183,7 +183,7 @@
"@labelDashboard": {
"description": "Title for screen dashboard"
},
"success": "செய்",
"success": "வெற்றி",
"@success": {
"description": "Message when an action completed successfully, usually used as a heading"
},
@@ -255,7 +255,7 @@
},
"useMetric": "உடல் எடைக்கு மெட்ரிக் அலகுகளைப் பயன்படுத்துங்கள்",
"@useMetric": {},
"repetitionUnit": "மீண்டும் மீண்டும் அலகு",
"repetitionUnit": "மீண்டும் அலகு",
"@repetitionUnit": {},
"set": "கணம்",
"@set": {
@@ -263,7 +263,7 @@
},
"dayDescriptionHelp": "இந்த நாளில் என்ன செய்யப்படுகிறது என்பதற்கான விளக்கம் (எ.கா. 'இழுக்க நாள்') அல்லது என்ன உடல் பாகங்கள் பயிற்சி அளிக்கப்படுகின்றன (எ.கா. 'மார்பு மற்றும் தோள்கள்')",
"@dayDescriptionHelp": {},
"sameRepetitions": "எல்லா தொகுப்புகளுக்கும் நீங்கள் அதே மறுபடியும் மறுபடியும் எடையும் செய்தால், நீங்கள் ஒரு வரிசையை நிரப்பலாம். எடுத்துக்காட்டாக, 4 செட்களுக்கு மறுபடியும் மறுபடியும் 10 ஐ உள்ளிடவும், இது தானாகவே \"4 ஃச் 10\" ஆகிறது.",
"sameRepetitions": "எல்லா தொகுப்புகளுக்கும் நீங்கள் அதே மறுபடியும் எடையும் செய்தால், நீங்கள் ஒரு வரிசையை நிரப்பலாம். எடுத்துக்காட்டாக, 4 செட்களுக்கு மறுபடியும் 10 ஐ உள்ளிடவும், இது தானாகவே \"4 ஃச் 10\" ஆகிறது.",
"@sameRepetitions": {},
"comment": "கருத்து",
"@comment": {
@@ -299,7 +299,7 @@
},
"todaysWorkout": "இன்று உங்கள் பயிற்சி",
"@todaysWorkout": {},
"logHelpEntries": "ஒரு நாளில் ஒரே எண்ணிக்கையிலான மறுபடியும் மறுபடியும் ஒன்றுக்கு மேற்பட்ட நுழைவு இருந்தால், ஆனால் வெவ்வேறு எடைகள் இருந்தால், அதிக எடையுடன் நுழைவு மட்டுமே வரைபடத்தில் காட்டப்பட்டுள்ளது.",
"logHelpEntries": "ஒரு நாளில் ஒரே எண்ணிக்கையிலான மறுபடியும் ஒன்றுக்கு மேற்பட்ட நுழைவு இருந்தால், ஆனால் வெவ்வேறு எடைகள் இருந்தால், அதிக எடையுடன் நுழைவு மட்டுமே வரைபடத்தில் காட்டப்பட்டுள்ளது.",
"@logHelpEntries": {},
"logHelpEntriesUnits": "ஒரு எடை அலகு (கிலோ அல்லது எல்பி) மற்றும் மறுபடியும் உள்ளீடுகள் மட்டுமே பட்டியலிடப்பட்டுள்ளன என்பதை நினைவில் கொள்க, நேரம் போன்ற பிற சேர்க்கைகள் அல்லது தோல்வி வரை இங்கே புறக்கணிக்கப்படும்.",
"@logHelpEntriesUnits": {},
@@ -375,7 +375,7 @@
"name": {}
}
},
"chartDuringPlanTitle": "{chartName} ஊட்டச்சத்து திட்டத்தின் போது {planName}",
"chartDuringPlanTitle": "{chartName}ஊட்டச்சத்து திட்டத்தின்போது {planName}",
"@chartDuringPlanTitle": {
"description": "chart of 'chartName' (e.g. 'weight', 'body fat' etc.) logged during plan",
"type": "text",
@@ -454,7 +454,7 @@
"value": {}
}
},
"kJ": "கே.சே.",
"kJ": "கேசே",
"@kJ": {
"description": "Energy in a meal in kilo joules, kJ"
},
@@ -590,6 +590,10 @@
"@goToToday": {
"description": "Label on button to jump back to 'today' in the calendar widget"
},
"enterRepetitionsOrWeight": "தயவுசெய்து மறுபடியும் அல்லது எடையை நிரப்பவும்",
"@enterRepetitionsOrWeight": {
"description": "Error message when the user hasn't filled in the forms for exercise sets"
},
"enterValue": "தயவுசெய்து ஒரு மதிப்பை உள்ளிடவும்",
"@enterValue": {
"description": "Error message when the user hasn't entered a value on a required field"
@@ -619,7 +623,7 @@
},
"baseNameEnglish": "அனைத்து பயிற்சிகளுக்கும் ஆங்கிலத்தில் அடிப்படை பெயர் தேவை",
"@baseNameEnglish": {},
"nrOfSets": "ஒரு உடற்பயிற்சிக்கு அமைக்கிறது: {nrOfSets}",
"nrOfSets": "ஒரு பயிற்சிக்கு அமைக்கிறது: {nrOfSets}",
"@nrOfSets": {
"description": "Label shown on the slider where the user selects the nr of sets",
"type": "text",
@@ -670,7 +674,7 @@
"@productFound": {
"description": "Header label for dialog when product is found with barcode"
},
"productFoundDescription": "பார்கோடு இந்த தயாரிப்புக்கு ஒத்திருக்கிறது: {productName}. நீங்கள் தொடர விரும்புகிறீர்களா?",
"productFoundDescription": "பார்கோடு இந்தத் தயாரிப்புக்கு ஒத்திருக்கிறது: {productName}. நீங்கள் தொடர விரும்புகிறீர்களா?",
"@productFoundDescription": {
"description": "Dialog info when product is found with barcode",
"type": "text",
@@ -682,7 +686,7 @@
"@productNotFound": {
"description": "Header label for dialog when product is not found with barcode"
},
"productNotFoundDescription": "ச்கேன் செய்யப்பட்ட பார்கோடு {barcode} உடன் தயாரிப்பு WGER தரவுத்தளத்தில் காணப்படவில்லை",
"productNotFoundDescription": "ச்கேன் செய்யப்பட்ட பார்கோடு {barcode} with உடன் தயாரிப்பு WGER தரவுத்தளத்தில் காணப்படவில்லை",
"@productNotFoundDescription": {
"description": "Dialog info when product is not found with barcode",
"type": "text",
@@ -749,7 +753,7 @@
"@settingsCacheDeletedSnackbar": {},
"aboutPageTitle": "Wger பற்றி",
"@aboutPageTitle": {},
"contributeExerciseWarning": "உங்கள் கணக்கு {days} நாட்களை விட பழையதாக இருந்தால் மட்டுமே நீங்கள் பயிற்சிகளை பங்களிக்க முடியும், மேலும் உங்கள் மின்னஞ்சலை சரிபார்த்துள்ளீர்கள்",
"contributeExerciseWarning": "உங்கள் கணக்கு {days} நாட்களைவிடப் பழையதாக இருந்தால் மட்டுமே நீங்கள் பயிற்சிகளைப் பங்களிக்க முடியும், மேலும் உங்கள் மின்னஞ்சலைச் சரிபார்த்துள்ளீர்கள்",
"@contributeExerciseWarning": {
"description": "Number of days before which a person can add exercise",
"placeholders": {
@@ -877,7 +881,7 @@
"@quads": {
"description": "Generated entry for translation for server strings"
},
"repetitions": "மறுபடியும் மறுபடியும்",
"repetitions": "மறுபடியும்",
"@repetitions": {
"description": "Generated entry for translation for server strings"
},
@@ -922,5 +926,29 @@
"description": "Log a specific meal (imperative form)"
},
"done": "முடிந்தது",
"@done": {}
"@done": {},
"overallChangeWeight": "ஒட்டுமொத்த மாற்றம்",
"@overallChangeWeight": {
"description": "Overall change in weight, added for localization"
},
"goalTypeMeals": "உணவில் இருந்து",
"@goalTypeMeals": {
"description": "added for localization of Class GoalType's filed meals"
},
"goalTypeBasic": "அடிப்படை",
"@goalTypeBasic": {
"description": "added for localization of Class GoalType's filed basic"
},
"goalTypeAdvanced": "மேம்பட்ட",
"@goalTypeAdvanced": {
"description": "added for localization of Class GoalType's filed advanced"
},
"indicatorRaw": "மூல",
"@indicatorRaw": {
"description": "added for localization of Class Indicator's field text"
},
"indicatorAvg": "ஏ.வி.சி",
"@indicatorAvg": {
"description": "added for localization of Class Indicator's field text"
}
}

View File

@@ -299,11 +299,11 @@
"@addMeal": {},
"mealLogged": "Страву записано в щоденник",
"@mealLogged": {},
"logMeal": "Записати цю страву",
"logMeal": "Запис прийому їжі в щоденник харчування",
"@logMeal": {},
"addIngredient": "Додати інгредієнт",
"@addIngredient": {},
"logIngredient": "Зберегти в щоденник харчування",
"logIngredient": "Занесіть інгредієнт до щоденника харчування",
"@logIngredient": {},
"searchIngredient": "Пошук інгредієнта",
"@searchIngredient": {
@@ -743,5 +743,148 @@
"max_reps": "Максимальна кількість повторень",
"@max_reps": {
"description": "Generated entry for translation for server strings"
}
},
"goalMacro": "Макроцілі",
"@goalMacro": {
"description": "The goal for macronutrients"
},
"goalFiber": "Волокно гол",
"@goalFiber": {},
"goalTypeBasic": "Базовий",
"@goalTypeBasic": {
"description": "added for localization of Class GoalType's filed basic"
},
"goalTypeAdvanced": "Просунутий",
"@goalTypeAdvanced": {
"description": "added for localization of Class GoalType's filed advanced"
},
"useMetric": "Використовуйте метричні одиниці вимірювання маси тіла",
"@useMetric": {},
"settingsTitle": "налаштування",
"@settingsTitle": {},
"deficit": "дефіцит",
"@deficit": {
"description": "Caloric deficit (either planned or unplanned)"
},
"gValue": "{value} г",
"@gValue": {
"description": "A value in grams, e.g. 5 g",
"type": "text",
"placeholders": {
"value": {}
}
},
"percentValue": "{value} %",
"@percentValue": {
"description": "A value in percent, e.g. 10 %",
"type": "text",
"placeholders": {
"value": {}
}
},
"settingsExerciseCacheDescription": "Кеш вправ",
"@settingsExerciseCacheDescription": {},
"chartAllTimeTitle": "{name} за весь час",
"@chartAllTimeTitle": {
"description": "All-time chart of 'name' (e.g. 'weight', 'body fat' etc.)",
"type": "text",
"placeholders": {
"name": {}
}
},
"chart30DaysTitle": "{name} останні 30 днів",
"@chart30DaysTitle": {
"description": "last 30 days chart of 'name' (e.g. 'weight', 'body fat' etc.)",
"type": "text",
"placeholders": {
"name": {}
}
},
"chartDuringPlanTitle": "{chartName} під час плану харчування {planName}",
"@chartDuringPlanTitle": {
"description": "chart of 'chartName' (e.g. 'weight', 'body fat' etc.) logged during plan",
"type": "text",
"placeholders": {
"chartName": {},
"planName": {}
}
},
"kcalValue": "{value} ккал",
"@kcalValue": {
"description": "A value in kcal, e.g. 500 kcal",
"type": "text",
"placeholders": {
"value": {}
}
},
"log": "Журнал",
"@log": {
"description": "Log a specific meal (imperative form)"
},
"settingsIngredientCacheDescription": "Кеш інгредієнтів",
"@settingsIngredientCacheDescription": {},
"overallChangeWeight": "Загальна зміна",
"@overallChangeWeight": {
"description": "Overall change in weight, added for localization"
},
"goalTypeMeals": "Від їжі",
"@goalTypeMeals": {
"description": "added for localization of Class GoalType's filed meals"
},
"indicatorRaw": "сирий",
"@indicatorRaw": {
"description": "added for localization of Class Indicator's field text"
},
"indicatorAvg": "середнє",
"@indicatorAvg": {
"description": "added for localization of Class Indicator's field text"
},
"onlyLogging": "Слідкуйте лише за калоріями",
"@onlyLogging": {},
"onlyLoggingHelpText": "Поставте прапорець, якщо ви хочете лише реєструвати свої калорії та не хочете встановлювати детальний план харчування з певними стравами",
"@onlyLoggingHelpText": {},
"goalEnergy": "Енергетична мета",
"@goalEnergy": {},
"goalProtein": "Білкова мета",
"@goalProtein": {},
"goalCarbohydrates": "Мета вуглеводів",
"@goalCarbohydrates": {},
"goalFat": "Товстий гол",
"@goalFat": {},
"today": "Сьогодні",
"@today": {},
"loggedToday": "Зареєстровано сьогодні",
"@loggedToday": {},
"aboutDonateTitle": "Пожертвуйте",
"@aboutDonateTitle": {},
"aboutDonateText": "Купіть нам каву, щоб допомогти проекту, оплатити витрати на сервер і підтримати нас",
"@aboutDonateText": {},
"surplus": "надлишок",
"@surplus": {
"description": "Caloric surplus (either planned or unplanned)"
},
"aboutMastodonText": "Слідкуйте за оновленнями та новинами про проект на Mastodon",
"@aboutMastodonText": {
"description": "Text for the mastodon section in the about dialog"
},
"done": "Готово",
"@done": {},
"noIngredientsDefined": "Інгредієнти ще не визначені",
"@noIngredientsDefined": {},
"noMatchingExerciseFound": "Відповідних вправ не знайдено",
"@noMatchingExerciseFound": {
"description": "Message returned if no exercises match the searched string"
},
"ingredientLogged": "Інгредієнт зареєстровано в щоденнику",
"@ingredientLogged": {},
"selectMealToLog": "Виберіть страву, щоб записати в щоденник",
"@selectMealToLog": {},
"aboutMastodonTitle": "Мастодонт",
"@aboutMastodonTitle": {
"description": "Title for mastodon section in the about dialog"
},
"settingsCacheTitle": "Кеш",
"@settingsCacheTitle": {},
"settingsCacheDeletedSnackbar": "Кеш успішно очищено",
"@settingsCacheDeletedSnackbar": {}
}

View File

@@ -324,7 +324,7 @@
"@date": {
"description": "The date of a workout log or body weight entry"
},
"weight": "重",
"weight": "重",
"@weight": {
"description": "The weight of a workout log or body weight entry, changed from \"重量\" to \"体重\""
},
@@ -519,9 +519,9 @@
"@close": {
"description": "Translation for close"
},
"logIngredient": "保存至营养日志",
"logIngredient": "记录食材至营养日志",
"@logIngredient": {},
"searchIngredient": "搜索营养成分",
"searchIngredient": "搜索营养成分",
"@searchIngredient": {
"description": "Label on ingredient search form"
},
@@ -555,15 +555,15 @@
"@exerciseName": {
"description": "Label for the name of a workout exercise"
},
"previous": "前一个",
"previous": "前",
"@previous": {},
"kg": "公斤",
"kg": "千克",
"@kg": {
"description": "Generated entry for translation for server strings"
},
"verify": "确认",
"@verify": {},
"next": "下一个",
"next": "",
"@next": {},
"success": "成功",
"@success": {
@@ -585,7 +585,7 @@
"@minutes": {
"description": "Generated entry for translation for server strings"
},
"pull_up_bar": "上杆",
"pull_up_bar": "引体向上杆",
"@pull_up_bar": {
"description": "Generated entry for translation for server strings"
},
@@ -668,8 +668,11 @@
"description": "Overall change in weight"
},
"goalTypeMeals": "从饮食出发",
"@goalTypeMeals": {},
"goalTypeBasic": "基础",
"@goalTypeBasic": {},
"goalTypeAdvanced": "进阶",
"@goalTypeAdvanced": {},
"chartAllTimeTitle": "{name} 历史记录曲线",
"@chartAllTimeTitle": {
"description": "All-time chart of 'name' (e.g. 'weight', 'body fat' etc.)",
@@ -688,7 +691,9 @@
}
},
"indicatorRaw": "原始值",
"@indicatorRaw": {},
"indicatorAvg": "平均值",
"@indicatorAvg": {},
"textPromptTitle": "准备就绪?",
"@textPromptTitle": {
"description": "Title for the text prompt"
@@ -696,5 +701,244 @@
"textPromptSubheading": "点击右下角按钮开始",
"@textPromptSubheading": {
"description": "Subheading for the text prompt"
},
"enterMinCharacters": "请输入最少{min}个字符",
"@enterMinCharacters": {
"description": "Error message when the user hasn't entered the minimum amount characters in a form",
"type": "text",
"placeholders": {
"min": {}
}
},
"baseNameEnglish": "所有运动需要一个英文代号",
"@baseNameEnglish": {},
"lower_back": "下背",
"@lower_back": {
"description": "Generated entry for translation for server strings"
},
"images": "图像",
"@images": {},
"biceps": "肱二头肌",
"@biceps": {
"description": "Generated entry for translation for server strings"
},
"aboutPageTitle": "关于 Wger",
"@aboutPageTitle": {},
"selectEntry": "请选择一项",
"@selectEntry": {},
"aboutMastodonText": "在长毛象上关注我们以获得此项目的新闻",
"@aboutMastodonText": {
"description": "Text for the mastodon section in the about dialog"
},
"cardio": "有氧",
"@cardio": {
"description": "Generated entry for translation for server strings"
},
"abs": "腹肌",
"@abs": {
"description": "Generated entry for translation for server strings"
},
"plates": "盘",
"@plates": {
"description": "Generated entry for translation for server strings"
},
"quads": "大腿前侧",
"@quads": {
"description": "Generated entry for translation for server strings"
},
"bench": "凳",
"@bench": {
"description": "Generated entry for translation for server strings"
},
"sz_bar": "W型曲杆",
"@sz_bar": {
"description": "Generated entry for translation for server strings"
},
"aboutDonateTitle": "捐赠",
"@aboutDonateTitle": {},
"aboutDonateText": "向我们打赏来支持此项目,给服务器买单,及激励我们",
"@aboutDonateText": {},
"none__bodyweight_exercise_": "无(自重动作)",
"@none__bodyweight_exercise_": {
"description": "Generated entry for translation for server strings"
},
"chart30DaysTitle": "{name} 过去三十天",
"@chart30DaysTitle": {
"description": "last 30 days chart of 'name' (e.g. 'weight', 'body fat' etc.)",
"type": "text",
"placeholders": {
"name": {}
}
},
"oneNamePerLine": "每行一个名字",
"@oneNamePerLine": {},
"settingsExerciseCacheDescription": "动作缓存",
"@settingsExerciseCacheDescription": {},
"settingsIngredientCacheDescription": "营养成分缓存",
"@settingsIngredientCacheDescription": {},
"contributeExerciseWarning": "账号注册{days}天且邮箱验证通过后,你方可贡献动作",
"@contributeExerciseWarning": {
"description": "Number of days before which a person can add exercise",
"placeholders": {
"days": {
"type": "String",
"example": "14"
}
}
},
"body_weight": "体重",
"@body_weight": {
"description": "Generated entry for translation for server strings"
},
"chest": "胸",
"@chest": {
"description": "Generated entry for translation for server strings"
},
"dumbbell": "哑铃",
"@dumbbell": {
"description": "Generated entry for translation for server strings"
},
"hamstrings": "大腿后侧",
"@hamstrings": {
"description": "Generated entry for translation for server strings"
},
"legs": "腿",
"@legs": {
"description": "Generated entry for translation for server strings"
},
"max_reps": "最大次数",
"@max_reps": {
"description": "Generated entry for translation for server strings"
},
"miles": "英里",
"@miles": {
"description": "Generated entry for translation for server strings"
},
"miles_per_hour": "迈",
"@miles_per_hour": {
"description": "Generated entry for translation for server strings"
},
"seconds": "秒",
"@seconds": {
"description": "Generated entry for translation for server strings"
},
"shoulders": "肩",
"@shoulders": {
"description": "Generated entry for translation for server strings"
},
"swiss_ball": "瑜伽球",
"@swiss_ball": {
"description": "Generated entry for translation for server strings"
},
"triceps": "肱三头肌",
"@triceps": {
"description": "Generated entry for translation for server strings"
},
"until_failure": "直至力竭",
"@until_failure": {
"description": "Generated entry for translation for server strings"
},
"variations": "变式",
"@variations": {
"description": "Variations of one exercise (e.g. benchpress and benchpress narrow)"
},
"verifiedEmail": "已验证的邮箱",
"@verifiedEmail": {},
"unVerifiedEmail": "未验证的邮箱",
"@unVerifiedEmail": {},
"verifiedEmailInfo": "验证邮件已经发往{email}",
"@verifiedEmailInfo": {
"placeholders": {
"email": {}
}
},
"whatVariationsExist": "这个动作有什么变体吗?",
"@whatVariationsExist": {},
"language": "语言",
"@language": {},
"addExercise": "添加动作",
"@addExercise": {},
"contributeExercise": "贡献一个动作",
"@contributeExercise": {},
"translateExercise": "翻译该动作",
"@translateExercise": {},
"baseData": "英文基础动作",
"@baseData": {
"description": "The base data for an exercise such as category, trained muscles, etc."
},
"settingsTitle": "设置",
"@settingsTitle": {},
"settingsCacheTitle": "缓存",
"@settingsCacheTitle": {},
"settingsCacheDeletedSnackbar": "成功清除缓存",
"@settingsCacheDeletedSnackbar": {},
"barbell": "杠铃",
"@barbell": {
"description": "Generated entry for translation for server strings"
},
"gym_mat": "健身垫",
"@gym_mat": {
"description": "Generated entry for translation for server strings"
},
"incline_bench": "上斜凳",
"@incline_bench": {
"description": "Generated entry for translation for server strings"
},
"kettlebell": "壶铃",
"@kettlebell": {
"description": "Generated entry for translation for server strings"
},
"kilometers_per_hour": "千米每小时",
"@kilometers_per_hour": {
"description": "Generated entry for translation for server strings"
},
"lats": "背阔肌",
"@lats": {
"description": "Generated entry for translation for server strings"
},
"log": "记录",
"@log": {
"description": "Log a specific meal (imperative form)"
},
"done": "完成",
"@done": {},
"moreMeasurementEntries": "添加新围度",
"@moreMeasurementEntries": {
"description": "Message shown when the user wants to add new measurement"
},
"add_exercise_image_license": "图像必须符合 CC BY-SA 知识共享许可。如果你不太确定,那请仅上传你自己拍摄的照片。",
"@add_exercise_image_license": {},
"cacheWarning": "由于缓存,申请中的变动或需一段时间方可呈现。",
"@cacheWarning": {},
"alsoKnownAs": "又名:{aliases}",
"@alsoKnownAs": {
"placeholders": {
"aliases": {}
},
"description": "List of alternative names for an exercise"
},
"verifiedEmailReason": "你需要验证邮箱来参与贡献",
"@verifiedEmailReason": {},
"arms": "手臂",
"@arms": {
"description": "Generated entry for translation for server strings"
},
"translation": "翻译",
"@translation": {},
"back": "背",
"@back": {
"description": "Generated entry for translation for server strings"
},
"calves": "小腿",
"@calves": {
"description": "Generated entry for translation for server strings"
},
"glutes": "臀",
"@glutes": {
"description": "Generated entry for translation for server strings"
},
"aboutMastodonTitle": "长毛象",
"@aboutMastodonTitle": {
"description": "Title for mastodon section in the about dialog"
}
}
}

View File

@@ -21,9 +21,7 @@ import 'dart:convert';
import 'dart:developer';
import 'dart:io';
import 'package:android_metadata/android_metadata.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/services.dart';
import 'package:flutter/widgets.dart';
import 'package:http/http.dart' as http;
import 'package:package_info_plus/package_info_plus.dart';
@@ -55,23 +53,6 @@ class AuthProvider with ChangeNotifier {
AuthProvider([http.Client? client, bool? checkMetadata]) {
this.client = client ?? http.Client();
// TODO: this is a workaround since AndroidMetadata doesn't work while running tests
if (checkMetadata ?? true) {
try {
if (Platform.isAndroid) {
AndroidMetadata.metaDataAsMap.then((value) => metadata = value!);
} else if (Platform.isLinux || Platform.isMacOS) {
metadata = {
MANIFEST_KEY_CHECK_UPDATE: Platform.environment[MANIFEST_KEY_CHECK_UPDATE] ?? '',
};
}
} on PlatformException {
throw Exception(
'An error occurred reading the metadata from AndroidManifest',
);
} catch (error) {}
}
}
/// flag to indicate that the application has successfully loaded all initial data

View File

@@ -51,7 +51,7 @@ class WeightScreen extends StatelessWidget {
),
body: SingleChildScrollView(
child: Consumer<BodyWeightProvider>(
builder: (context, workoutProvider, child) => const WeightOverview(),
builder: (context, provider, child) => WeightOverview(provider),
),
),
);

View File

@@ -2,8 +2,8 @@ import 'dart:io';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:wger/providers/add_exercise.dart';
import 'mixins/image_picker_mixin.dart';
class PreviewExerciseImages extends StatelessWidget with ExerciseImagePickerMixin {
@@ -30,7 +30,7 @@ class PreviewExerciseImages extends StatelessWidget with ExerciseImagePickerMixi
padding: const EdgeInsets.all(3.0),
child: Container(
decoration: BoxDecoration(
color: Colors.grey.withOpacity(0.5),
color: Colors.grey.withValues(alpha: 0.5),
borderRadius: const BorderRadius.all(Radius.circular(20)),
),
child: IconButton(

View File

@@ -26,20 +26,22 @@ class MeasurementOverallChangeWidget extends StatelessWidget {
final MeasurementChartEntry _first;
final MeasurementChartEntry _last;
final String _unit;
const MeasurementOverallChangeWidget(this._first, this._last, this._unit);
@override
Widget build(BuildContext context) {
final delta = _last.value - _first.value;
final prefix = delta > 0
? '+'
: delta < 0
? '-'
: '';
String prefix = '';
if (delta > 0) {
prefix = '+';
} else if (delta < 0) {
prefix = '-';
}
// ignore: prefer_interpolation_to_compose_strings
return Text(AppLocalizations.of(context).overallChangeWeight +
'$prefix ${delta.abs().toStringAsFixed(1)} $_unit');
' $prefix${delta.abs().toStringAsFixed(1)} $_unit');
}
}
@@ -82,10 +84,7 @@ class _MeasurementChartWidgetFlState extends State<MeasurementChartWidgetFl> {
return LineTooltipItem(
'$dateStr: ${touchedSpot.y.toStringAsFixed(1)} ${widget._unit}',
TextStyle(
color: touchedSpot.bar.color,
fontWeight: FontWeight.bold,
),
TextStyle(color: touchedSpot.bar.color),
);
}).toList();
},
@@ -158,7 +157,7 @@ class _MeasurementChartWidgetFlState extends State<MeasurementChartWidgetFl> {
return const Text('');
}
return Text('$value ${widget._unit}');
return Text('${value.toStringAsFixed(1)} ${widget._unit}');
},
),
),
@@ -206,7 +205,7 @@ class MeasurementChartEntry {
MeasurementChartEntry(this.value, this.date);
}
// for each point, return the average of all the points in the 7 days preceeding it
// for each point, return the average of all the points in the 7 days preceding it
List<MeasurementChartEntry> moving7dAverage(List<MeasurementChartEntry> vals) {
var start = 0;
var end = 0;

View File

@@ -30,16 +30,16 @@ import 'package:wger/widgets/measurements/helpers.dart';
import 'package:wger/widgets/weight/forms.dart';
class WeightOverview extends StatelessWidget {
const WeightOverview();
final BodyWeightProvider _provider;
const WeightOverview(this._provider);
@override
Widget build(BuildContext context) {
final profile = context.read<UserProvider>().profile;
final weightProvider = Provider.of<BodyWeightProvider>(context, listen: false);
final plan = Provider.of<NutritionPlansProvider>(context, listen: false).currentPlan;
final entriesAll =
weightProvider.items.map((e) => MeasurementChartEntry(e.weight, e.date)).toList();
final entriesAll = _provider.items.map((e) => MeasurementChartEntry(e.weight, e.date)).toList();
final entries7dAvg = moving7dAverage(entriesAll);
final unit = weightUnit(profile!.isMetric, context);
@@ -70,12 +70,12 @@ class WeightOverview extends StatelessWidget {
SizedBox(
height: 300,
child: RefreshIndicator(
onRefresh: () => weightProvider.fetchAndSetEntries(),
onRefresh: () => _provider.fetchAndSetEntries(),
child: ListView.builder(
padding: const EdgeInsets.all(10.0),
itemCount: weightProvider.items.length,
itemCount: _provider.items.length,
itemBuilder: (context, index) {
final currentEntry = weightProvider.items[index];
final currentEntry = _provider.items[index];
return Card(
child: ListTile(
title: Text('${currentEntry.weight} ${weightUnit(profile.isMetric, context)}'),
@@ -102,7 +102,7 @@ class WeightOverview extends StatelessWidget {
child: Text(AppLocalizations.of(context).delete),
onTap: () async {
// Delete entry from DB
await weightProvider.deleteEntry(currentEntry.id!);
await _provider.deleteEntry(currentEntry.id!);
// and inform the user
if (context.mounted) {

View File

@@ -41,7 +41,11 @@ endif()
# of modifying this function.
function(APPLY_STANDARD_SETTINGS TARGET)
target_compile_features(${TARGET} PUBLIC cxx_std_14)
target_compile_options(${TARGET} PRIVATE -Wall -Werror)
# Workaround for https://github.com/wger-project/flutter/issues/577 / https://github.com/rive-app/rive-flutter/issues/390
#target_compile_options(${TARGET} PRIVATE -Wall -Werror) -- original options
target_compile_options(${TARGET} PRIVATE -Wall -Werror -Wno-unused-variable -Wno-unused-function)
target_compile_options(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:-O3>")
target_compile_definitions(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:NDEBUG>")
endfunction()

View File

@@ -7,6 +7,7 @@
#include "generated_plugin_registrant.h"
#include <file_selector_linux/file_selector_plugin.h>
#include <rive_common/rive_plugin.h>
#include <sqlite3_flutter_libs/sqlite3_flutter_libs_plugin.h>
#include <url_launcher_linux/url_launcher_plugin.h>
@@ -14,6 +15,9 @@ void fl_register_plugins(FlPluginRegistry* registry) {
g_autoptr(FlPluginRegistrar) file_selector_linux_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "FileSelectorPlugin");
file_selector_plugin_register_with_registrar(file_selector_linux_registrar);
g_autoptr(FlPluginRegistrar) rive_common_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "RivePlugin");
rive_plugin_register_with_registrar(rive_common_registrar);
g_autoptr(FlPluginRegistrar) sqlite3_flutter_libs_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "Sqlite3FlutterLibsPlugin");
sqlite3_flutter_libs_plugin_register_with_registrar(sqlite3_flutter_libs_registrar);

View File

@@ -4,6 +4,7 @@
list(APPEND FLUTTER_PLUGIN_LIST
file_selector_linux
rive_common
sqlite3_flutter_libs
url_launcher_linux
)

View File

@@ -32,44 +32,42 @@ dependencies:
flutter_localizations:
sdk: flutter
android_metadata: ^0.2.1
collection: ^1.17.0
carousel_slider: ^5.0.0
clock: ^1.1.1
collection: ^1.18.0
cupertino_icons: ^1.0.8
equatable: ^2.0.5
drift: ^2.16.0
equatable: ^2.0.7
fl_chart: ^0.69.2
flex_color_scheme: ^8.0.2
flex_seed_scheme: ^3.4.1
flutter_barcode_scanner: ^2.0.0
flutter_calendar_carousel: ^2.4.4
flutter_html: ^3.0.0-beta.2
flutter_staggered_grid_view: ^0.7.0
flutter_svg: ^2.0.16
flutter_svg_icons: ^0.0.1
flutter_typeahead: ^5.2.0
font_awesome_flutter: ^10.7.0
flutter_zxing: ^1.8.2
font_awesome_flutter: ^10.8.0
freezed_annotation: ^2.4.4
get_it: ^8.0.2
http: ^1.2.2
image_picker: ^1.1.0
intl: ^0.19.0
json_annotation: ^4.9.0
version: ^3.0.2
package_info_plus: ^8.0.3
json_annotation: ^4.8.1
multi_select_flutter: ^4.1.3
package_info_plus: ^8.1.1
path: ^1.9.0
path_provider: ^2.1.5
provider: ^6.1.2
# Note, do not update rive! https://github.com/wger-project/flutter/issues/577
rive: ^0.12.4
shared_preferences: ^2.3.2
rive: ^0.13.20
shared_preferences: ^2.3.3
sqlite3_flutter_libs: ^0.5.27
table_calendar: ^3.0.8
url_launcher: ^6.3.1
flutter_barcode_scanner: ^2.0.0
version: ^3.0.2
video_player: ^2.9.2
flutter_staggered_grid_view: ^0.7.0
carousel_slider: ^5.0.0
multi_select_flutter: ^4.1.3
flutter_svg: ^2.0.11
fl_chart: ^0.69.0
flutter_zxing: ^1.5.2
drift: ^2.16.0
path: ^1.8.3
path_provider: ^2.1.4
sqlite3_flutter_libs: ^0.5.20
get_it: ^7.6.8
flex_seed_scheme: ^3.4.1
flex_color_scheme: ^8.0.0
freezed_annotation: ^2.4.4
clock: ^1.1.1
flutter_svg_icons: ^0.0.1
dependency_overrides:
intl: ^0.19.0
@@ -80,14 +78,14 @@ dev_dependencies:
integration_test:
sdk: flutter
build_runner: ^2.4.13
json_serializable: ^6.8.0
cider: ^0.2.7
drift_dev: ^2.22.0
flutter_lints: ^5.0.0
freezed: ^2.5.7
golden_toolkit: ^0.15.0
json_serializable: ^6.9.0
mockito: ^5.4.4
network_image_mock: ^2.1.1
flutter_lints: ^5.0.0
cider: ^0.2.7
drift_dev: ^2.20.3
freezed: ^2.5.2
golden_toolkit: ^0.15.0
# Script to read out unused translations
#translations_cleaner: ^0.0.5