Compare commits

..

No commits in common. "master" and "5.1.0" have entirely different histories.

212 changed files with 2667 additions and 8274 deletions

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "naplo-plus"]
path = refilc_plus
url = git@github.com:refilc/naplo-plus.git

1286
.idea/libraries/Dart_Packages.xml generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,28 +1,25 @@
<component name="libraryTable"> <component name="libraryTable">
<library name="Dart SDK"> <library name="Dart SDK">
<CLASSES> <CLASSES>
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/async" /> <root url="file:///opt/flutter/bin/cache/dart-sdk/lib/async" />
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/cli" /> <root url="file:///opt/flutter/bin/cache/dart-sdk/lib/cli" />
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/collection" /> <root url="file:///opt/flutter/bin/cache/dart-sdk/lib/collection" />
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/concurrent" /> <root url="file:///opt/flutter/bin/cache/dart-sdk/lib/convert" />
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/convert" /> <root url="file:///opt/flutter/bin/cache/dart-sdk/lib/core" />
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/core" /> <root url="file:///opt/flutter/bin/cache/dart-sdk/lib/developer" />
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/developer" /> <root url="file:///opt/flutter/bin/cache/dart-sdk/lib/ffi" />
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/ffi" /> <root url="file:///opt/flutter/bin/cache/dart-sdk/lib/html" />
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/html" /> <root url="file:///opt/flutter/bin/cache/dart-sdk/lib/indexed_db" />
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/indexed_db" /> <root url="file:///opt/flutter/bin/cache/dart-sdk/lib/io" />
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/io" /> <root url="file:///opt/flutter/bin/cache/dart-sdk/lib/isolate" />
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/isolate" /> <root url="file:///opt/flutter/bin/cache/dart-sdk/lib/js" />
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/js" /> <root url="file:///opt/flutter/bin/cache/dart-sdk/lib/js_util" />
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/js_interop" /> <root url="file:///opt/flutter/bin/cache/dart-sdk/lib/math" />
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/js_interop_unsafe" /> <root url="file:///opt/flutter/bin/cache/dart-sdk/lib/mirrors" />
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/js_util" /> <root url="file:///opt/flutter/bin/cache/dart-sdk/lib/svg" />
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/math" /> <root url="file:///opt/flutter/bin/cache/dart-sdk/lib/typed_data" />
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/mirrors" /> <root url="file:///opt/flutter/bin/cache/dart-sdk/lib/web_audio" />
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/svg" /> <root url="file:///opt/flutter/bin/cache/dart-sdk/lib/web_gl" />
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/typed_data" />
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/web_audio" />
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/web_gl" />
</CLASSES> </CLASSES>
<JAVADOC /> <JAVADOC />
<SOURCES /> <SOURCES />

1
.idea/misc.xml generated
View File

@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Android API 33, extension level 3 Platform" project-jdk-type="Android SDK" /> <component name="ProjectRootManager" version="2" project-jdk-name="Android API 33, extension level 3 Platform" project-jdk-type="Android SDK" />
</project> </project>

13
.idea/naplo.iml generated
View File

@ -60,21 +60,8 @@
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/flutter_acrylic/build" /> <excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/flutter_acrylic/build" />
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/flutter_acrylic/.pub" /> <excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/flutter_acrylic/.pub" />
<excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/flutter_acrylic/.dart_tool" /> <excludeFolder url="file://$MODULE_DIR$/filcnaplo/linux/flutter/ephemeral/.plugin_symlinks/flutter_acrylic/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/refilc/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/refilc/.pub" />
<excludeFolder url="file://$MODULE_DIR$/refilc/build" />
<excludeFolder url="file://$MODULE_DIR$/refilc_kreta_api/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/refilc_kreta_api/.pub" />
<excludeFolder url="file://$MODULE_DIR$/refilc_kreta_api/build" />
<excludeFolder url="file://$MODULE_DIR$/refilc_mobile_ui/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/refilc_mobile_ui/.pub" />
<excludeFolder url="file://$MODULE_DIR$/refilc_mobile_ui/build" />
<excludeFolder url="file://$MODULE_DIR$/refilc_plus/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/refilc_plus/.pub" />
<excludeFolder url="file://$MODULE_DIR$/refilc_plus/build" />
</content> </content>
<orderEntry type="inheritedJdk" /> <orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Dart SDK" level="project" />
</component> </component>
</module> </module>

5
.idea/vcs.xml generated
View File

@ -2,6 +2,9 @@
<project version="4"> <project version="4">
<component name="VcsDirectoryMappings"> <component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" /> <mapping directory="" vcs="Git" />
<mapping directory="$PROJECT_DIR$/refilc_plus" vcs="Git" /> <mapping directory="$PROJECT_DIR$/filcnaplo_desktop_ui" vcs="Git" />
<mapping directory="$PROJECT_DIR$/filcnaplo_kreta_api" vcs="Git" />
<mapping directory="$PROJECT_DIR$/filcnaplo_mobile_ui" vcs="Git" />
<mapping directory="$PROJECT_DIR$/filcnaplo_premium" vcs="Git" />
</component> </component>
</project> </project>

56
Jenkinsfile vendored Normal file
View File

@ -0,0 +1,56 @@
pipeline {
agent any
environment {
ANDROID_SDK = '/home/jenkins/flutter_things/android-sdk'
ANDROID_PATH="$ANDROID_SDK/tools:$ANDROID_SDK/platform-tools"
FLUTTER = '/home/jenkins/flutter_things/flutter/bin'
PATH = "$PATH:$ANDROID_PATH:$FLUTTER"
//TODO: need to fix flutter
}
stages {
stage('Copy Key Properties') {
steps {
// Copy the key.properties file
sh 'cp /home/jenkins/key.properties refilc/android/key.properties'
}
}
stage('Flutter Doctor') {
steps {
// Ensure Flutter is set up correctly
sh 'flutter doctor'
}
}
stage('Dependencies') {
steps {
// Get Flutter dependencies
sh 'cd refilc && flutter pub get'
}
}
stage('Build') {
steps {
// Build the Flutter project
sh 'cd refilc && flutter build apk --release'
}
}
stage('Archive') {
steps {
// Archive the APK
archiveArtifacts artifacts: 'build/app/outputs/flutter-apk/app-release.apk', fingerprint: true
}
}
}
post {
always {
// Clean up workspace after build
cleanWs()
}
}
}

119
README.md
View File

@ -1,67 +1,52 @@
<p align=center> <p align=center>
<img src="https://raw.githubusercontent.com/Laky2k8/Refilc-2-Episode-1/refs/heads/master/refilc-2-real.png" width=150> <img src="https://refilc.hu/image/brand/logo.png" width=150>
<h1 align=center><b>reFilc</b></h1> <h1 align=center><b>reFilc</b></h1>
</p> </p>
#### Nem hivatalos e-napló alkalmazás az e-KRÉTA rendszerhez - tanulóktól, tanulóknak. #### Nem hivatalos e-napló alkalmazás az e-KRÉTA rendszerhez - tanulóktól, tanulóknak.
[![Downloads](https://img.shields.io/github/downloads-pre/refilc/naplo/total?&logo=github&label=Downloads)](https://github.com/refilc/naplo/releases) &nbsp; [![Discord](https://img.shields.io/discord/1111649116020285532?logo=discord&label=Discord)](https://discord.gg/refilc-1111649116020285532) [![Downloads](https://img.shields.io/github/downloads-pre/refilc/naplo/total?&logo=github&label=Downloads)](https://github.com/refilc/naplo/releases) &nbsp; [![Discord](https://img.shields.io/discord/1111649116020285532?logo=discord&label=Discord)](https://dc.refilc.hu)
## Környezet felállítása ## Setup
### Source code letöltése ### Clone the project
*Az építhéshez szükséged lesz a refilc_plus repora is, amit itt találsz: [student-plus](https://git.qwit.cloud/refilc/student-plus)* <em>A teljes source eléréséhez szükséged lesz a naplo-plus repo-ra is, mely biztonsági okokból privát. Írj Discord szerverünkön, hogy kaphass hozzáférést.</em>
```sh ```sh
git clone https://git.qwit.cloud/refilc/student-legacy.git --recursive git clone --branch dev https://github.com/refilc/naplo --recursive
cd naplo cd naplo
# ha ez nem töltött le refilc plus repoba értelmes dolgokat futtasd a többi parancsot is ```
rm -rf refilc_plus
git clone https://git.qwit.cloud/refilc/student-plus.git refilc_plus ### Install packages
```
Run `fix-pub.sh`
### Csomagok telepítése
### Run the app
Menj be minden mappába és futtasd a következő parancsokat:
```sh ```sh
flutter clean cd refilc
flutter pub get flutter run (--release)
``` ```
### Alkalmazás építése ### Contribution
```sh **Nézd meg a [Contribution guide](CONTRIBUTING.md)-ot!**
cd refilc
flutter build apk --release Az összes (ugyan azon verzióhoz tartozó) contribution meg fog jelenni a release-nél. Kérjük, írd le a Discord nevedet a Description-be, hogy adhassunk rangot.
```
-------
*Ez egy apk fájlt fog építeni*
# Team
### Contribution
**kima:** head developer / project manager
**Nézd meg a [Contribution guide](CONTRIBUTING.md)-ot!**
**Reiner, pdf, Pearoo, Zizi:** community- and project manager / developer
Az összes (ugyan azon verzióhoz tartozó) contribution meg fog jelenni a release-nél. Kérjük, írd le a Discord nevedet a Description-be, hogy adhassunk rangot.
**vrolandd, TMarccci:** head developer
-------
**dwe., xou:** designer
# Csapatunk
**Péter:** video editor
**Management**
- Zypherift <em>**annon:** a régi Filc Napló fejlesztője (ez az app, ha bár sokban változott, alapjaiban a Filc-re épül)</em>
- hayn
- Pearoo
- Zizi
- mnus
- xou
**Designerek**
- dwe
- xou
**vrolandd, TMarccci:** head developer
**Péter:** video editor
***annon:** a régi Filc Napló fejlesztője (ez az app, ha bár sokban változott, alapjaiban a Filc-re épül)*

View File

@ -1 +0,0 @@
*.jks

View File

@ -39,19 +39,6 @@ def debugKeystoreProperties = new Properties()
def debugKeystorePropertiesFile = rootProject.file("debugkey.properties") def debugKeystorePropertiesFile = rootProject.file("debugkey.properties")
debugKeystoreProperties.load(new FileInputStream(debugKeystorePropertiesFile)) debugKeystoreProperties.load(new FileInputStream(debugKeystorePropertiesFile))
subprojects {
afterEvaluate { project ->
if (project.hasProperty('android')) {
project.android {
if (!hasProperty('namespace') || namespace == null || namespace.isEmpty()) {
// Assign a default namespace based on the project name or group
namespace = project.group.toString() ?: "com.example.${project.name}"
}
}
}
}
}
android { android {
namespace = "hu.refilc.naplo" namespace = "hu.refilc.naplo"
@ -120,13 +107,7 @@ android {
release { release {
signingConfig signingConfigs.release signingConfig signingConfigs.release
shrinkResources true shrinkResources false
minifyEnabled true
debuggable false
jniDebuggable false
renderscriptDebuggable false
pseudoLocalesEnabled false
zipAlignEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
} }
} }

View File

@ -11,6 +11,4 @@
-dontwarn com.stripe.android.pushProvisioning.PushProvisioningEphemeralKeyProvider -dontwarn com.stripe.android.pushProvisioning.PushProvisioningEphemeralKeyProvider
-dontwarn org.joda.convert.FromString -dontwarn org.joda.convert.FromString
-dontwarn org.joda.convert.ToString -dontwarn org.joda.convert.ToString
#-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 KiB

After

Width:  |  Height:  |  Size: 190 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 B

After

Width:  |  Height:  |  Size: 69 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 KiB

After

Width:  |  Height:  |  Size: 190 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 KiB

After

Width:  |  Height:  |  Size: 190 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 B

After

Width:  |  Height:  |  Size: 69 B

View File

@ -1,9 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/> <background android:drawable="@color/ic_launcher_background"/>
<foreground> <foreground android:drawable="@drawable/ic_launcher_foreground"/>
<inset
android:drawable="@drawable/ic_launcher_foreground"
android:inset="16%" />
</foreground>
</adaptive-icon> </adaptive-icon>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 642 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

@ -6,7 +6,7 @@
<item name="android:windowFullscreen">false</item> <item name="android:windowFullscreen">false</item>
<item name="android:windowDrawsSystemBarBackgrounds">false</item> <item name="android:windowDrawsSystemBarBackgrounds">false</item>
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item> <item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
<item name="android:windowSplashScreenBackground">#7CA021</item> <item name="android:windowSplashScreenBackground">#03112D</item>
<item name="android:windowSplashScreenAnimatedIcon">@drawable/android12splash</item> <item name="android:windowSplashScreenAnimatedIcon">@drawable/android12splash</item>
</style> </style>
<!-- Theme applied to the Android Window as soon as the process has started. <!-- Theme applied to the Android Window as soon as the process has started.

View File

@ -6,7 +6,7 @@
<item name="android:windowFullscreen">false</item> <item name="android:windowFullscreen">false</item>
<item name="android:windowDrawsSystemBarBackgrounds">false</item> <item name="android:windowDrawsSystemBarBackgrounds">false</item>
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item> <item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
<item name="android:windowSplashScreenBackground">#7CA021</item> <item name="android:windowSplashScreenBackground">#03112D</item>
<item name="android:windowSplashScreenAnimatedIcon">@drawable/android12splash</item> <item name="android:windowSplashScreenAnimatedIcon">@drawable/android12splash</item>
</style> </style>
<!-- Theme applied to the Android Window as soon as the process has started. <!-- Theme applied to the Android Window as soon as the process has started.

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<color name="ic_launcher_background">#7CA021</color> <color name="ic_launcher_background">#03112D</color>
<color name="purple_200">#FFBB86FC</color> <color name="purple_200">#FFBB86FC</color>
<color name="purple_500">#FF6200EE</color> <color name="purple_500">#FF6200EE</color>
@ -66,4 +66,4 @@
<color name="pink_shade300">#FFF06292</color> <color name="pink_shade300">#FFF06292</color>
<color name="purple_shade300">#FFBA68C8</color> <color name="purple_shade300">#FFBA68C8</color>
<color name="teal_shade300">#FF22AC9B</color> <color name="teal_shade300">#FF22AC9B</color>
</resources> </resources>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 87 KiB

After

Width:  |  Height:  |  Size: 72 KiB

View File

@ -1,3 +1,3 @@
#!/bin/sh #!/bin/sh
flutter build apk --release --tree-shake-icons --split-debug-info=debug-info --split-per-abi --target-platform android-arm,android-arm64 --obfuscate flutter build apk --release --dart-define=APPVER=$(cat pubspec.yaml | grep version: | cut -d' ' -f2 | cut -d+ -f1) --no-tree-shake-icons

View File

@ -517,11 +517,11 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 283; CURRENT_PROJECT_VERSION = 282;
DEVELOPMENT_TEAM = 4J97JVC2FG; DEVELOPMENT_TEAM = 4J97JVC2FG;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
FLUTTER_BUILD_NAME = 5.1.1; FLUTTER_BUILD_NAME = 5.1.0;
FLUTTER_BUILD_NUMBER = 283; FLUTTER_BUILD_NUMBER = 282;
INFOPLIST_FILE = Runner/Info.plist; INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = reFilc; INFOPLIST_KEY_CFBundleDisplayName = reFilc;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.education"; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.education";
@ -529,7 +529,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 5.1.1; MARKETING_VERSION = 5.1.0;
PRODUCT_BUNDLE_IDENTIFIER = hu.qwit.refilc; PRODUCT_BUNDLE_IDENTIFIER = hu.qwit.refilc;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
@ -551,7 +551,7 @@
CODE_SIGN_ENTITLEMENTS = livecard/livecard.entitlements; CODE_SIGN_ENTITLEMENTS = livecard/livecard.entitlements;
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 283; CURRENT_PROJECT_VERSION = 282;
DEVELOPMENT_TEAM = 4J97JVC2FG; DEVELOPMENT_TEAM = 4J97JVC2FG;
GCC_C_LANGUAGE_STANDARD = gnu11; GCC_C_LANGUAGE_STANDARD = gnu11;
GENERATE_INFOPLIST_FILE = YES; GENERATE_INFOPLIST_FILE = YES;
@ -565,7 +565,7 @@
"@executable_path/Frameworks", "@executable_path/Frameworks",
"@executable_path/../../Frameworks", "@executable_path/../../Frameworks",
); );
MARKETING_VERSION = 5.1.1; MARKETING_VERSION = 5.1.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES; MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = hu.qwit.refilc.livecard; PRODUCT_BUNDLE_IDENTIFIER = hu.qwit.refilc.livecard;
@ -593,7 +593,7 @@
CODE_SIGN_ENTITLEMENTS = livecard/livecard.entitlements; CODE_SIGN_ENTITLEMENTS = livecard/livecard.entitlements;
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 283; CURRENT_PROJECT_VERSION = 282;
DEVELOPMENT_TEAM = 4J97JVC2FG; DEVELOPMENT_TEAM = 4J97JVC2FG;
GCC_C_LANGUAGE_STANDARD = gnu11; GCC_C_LANGUAGE_STANDARD = gnu11;
GENERATE_INFOPLIST_FILE = YES; GENERATE_INFOPLIST_FILE = YES;
@ -607,7 +607,7 @@
"@executable_path/Frameworks", "@executable_path/Frameworks",
"@executable_path/../../Frameworks", "@executable_path/../../Frameworks",
); );
MARKETING_VERSION = 5.1.1; MARKETING_VERSION = 5.1.0;
MTL_FAST_MATH = YES; MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = hu.qwit.refilc.livecard; PRODUCT_BUNDLE_IDENTIFIER = hu.qwit.refilc.livecard;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
@ -633,7 +633,7 @@
CODE_SIGN_ENTITLEMENTS = livecard/livecard.entitlements; CODE_SIGN_ENTITLEMENTS = livecard/livecard.entitlements;
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 283; CURRENT_PROJECT_VERSION = 282;
DEVELOPMENT_TEAM = 4J97JVC2FG; DEVELOPMENT_TEAM = 4J97JVC2FG;
GCC_C_LANGUAGE_STANDARD = gnu11; GCC_C_LANGUAGE_STANDARD = gnu11;
GENERATE_INFOPLIST_FILE = YES; GENERATE_INFOPLIST_FILE = YES;
@ -647,7 +647,7 @@
"@executable_path/Frameworks", "@executable_path/Frameworks",
"@executable_path/../../Frameworks", "@executable_path/../../Frameworks",
); );
MARKETING_VERSION = 5.1.1; MARKETING_VERSION = 5.1.0;
MTL_FAST_MATH = YES; MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = hu.qwit.refilc.livecard; PRODUCT_BUNDLE_IDENTIFIER = hu.qwit.refilc.livecard;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
@ -777,11 +777,11 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 283; CURRENT_PROJECT_VERSION = 282;
DEVELOPMENT_TEAM = 4J97JVC2FG; DEVELOPMENT_TEAM = 4J97JVC2FG;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
FLUTTER_BUILD_NAME = 5.1.1; FLUTTER_BUILD_NAME = 5.1.0;
FLUTTER_BUILD_NUMBER = 283; FLUTTER_BUILD_NUMBER = 282;
INFOPLIST_FILE = Runner/Info.plist; INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = reFilc; INFOPLIST_KEY_CFBundleDisplayName = reFilc;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.education"; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.education";
@ -789,7 +789,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 5.1.1; MARKETING_VERSION = 5.1.0;
PRODUCT_BUNDLE_IDENTIFIER = hu.qwit.refilc; PRODUCT_BUNDLE_IDENTIFIER = hu.qwit.refilc;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
@ -807,11 +807,11 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 283; CURRENT_PROJECT_VERSION = 282;
DEVELOPMENT_TEAM = 4J97JVC2FG; DEVELOPMENT_TEAM = 4J97JVC2FG;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
FLUTTER_BUILD_NAME = 5.1.1; FLUTTER_BUILD_NAME = 5.1.0;
FLUTTER_BUILD_NUMBER = 283; FLUTTER_BUILD_NUMBER = 282;
INFOPLIST_FILE = Runner/Info.plist; INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = reFilc; INFOPLIST_KEY_CFBundleDisplayName = reFilc;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.education"; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.education";
@ -819,7 +819,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 5.1.1; MARKETING_VERSION = 5.1.0;
PRODUCT_BUNDLE_IDENTIFIER = hu.qwit.refilc; PRODUCT_BUNDLE_IDENTIFIER = hu.qwit.refilc;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 B

After

Width:  |  Height:  |  Size: 69 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

After

Width:  |  Height:  |  Size: 114 KiB

View File

@ -38,7 +38,7 @@
</scene> </scene>
</scenes> </scenes>
<resources> <resources>
<image name="LaunchImage" width="2700" height="2700"/> <image name="LaunchImage" width="1700" height="1700"/>
<image name="LaunchBackground" width="1" height="1"/> <image name="LaunchBackground" width="1" height="1"/>
</resources> </resources>
</document> </document>

View File

@ -1,138 +1,138 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"> <plist version="1.0">
<dict>
<key>BGTaskSchedulerPermittedIdentifiers</key>
<array>
<string>com.transistorsoft.refilcnotification</string>
<string>com.transistorsoft.refilcliveactivity</string>
</array>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>CFBundleAlternateIcons</key>
<dict> <dict>
<key>BGTaskSchedulerPermittedIdentifiers</key> <key>refilc_concept</key>
<array>
<string>com.transistorsoft.refilcnotification</string>
<string>com.transistorsoft.refilcliveactivity</string>
</array>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>CFBundleAlternateIcons</key>
<dict> <dict>
<key>refilc_concept</key> <key>CFBundleIconFiles</key>
<dict> <array>
<key>CFBundleIconFiles</key> <string>refilc_concept</string>
<array> </array>
<string>refilc_concept</string> <key>UIPrerenderedIcon</key>
</array> <false/>
<key>UIPrerenderedIcon</key>
<false/>
</dict>
<key>refilc_default</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>refilc_default</string>
</array>
<key>UIPrerenderedIcon</key>
<false/>
</dict>
<key>refilc_overcomplicated</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>refilc_overcomplicated</string>
</array>
<key>UIPrerenderedIcon</key>
<false/>
</dict>
<key>refilc_pride</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>refilc_pride</string>
</array>
<key>UIPrerenderedIcon</key>
<false/>
</dict>
</dict> </dict>
<key>CFBundleDevelopmentRegion</key> <key>refilc_default</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIcons</key>
<dict> <dict>
<key>CFBundlePrimaryIcon</key> <key>CFBundleIconFiles</key>
<dict> <array>
<key>CFBundleIconFiles</key> <string>refilc_default</string>
<array> </array>
<string></string> <key>UIPrerenderedIcon</key>
</array> <false/>
<key>CFBundleIconName</key> </dict>
<string></string> <key>refilc_overcomplicated</key>
<key>UIPrerenderedIcon</key> <dict>
<false/> <key>CFBundleIconFiles</key>
</dict> <array>
<string>refilc_overcomplicated</string>
</array>
<key>UIPrerenderedIcon</key>
<false/>
</dict>
<key>refilc_pride</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>refilc_pride</string>
</array>
<key>UIPrerenderedIcon</key>
<false/>
</dict> </dict>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>reFilc</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(FLUTTER_BUILD_NAME)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>refilcapp</string>
</array>
</dict>
</array>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>https</string>
<string>http</string>
</array>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSCameraUsageDescription</key>
<string>The app requires the camera access to set a custom profile picture.</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>The app requires the photo library to set a custom profile picture.</string>
<key>NSSupportsLiveActivities</key>
<true/>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<key>UIBackgroundModes</key>
<array>
<string>fetch</string>
<string>processing</string>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIStatusBarHidden</key>
<false/>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict> </dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIcons</key>
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string></string>
</array>
<key>CFBundleIconName</key>
<string></string>
<key>UIPrerenderedIcon</key>
<false/>
</dict>
</dict>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>reFilc</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(FLUTTER_BUILD_NAME)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>refilcapp</string>
</array>
</dict>
</array>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>https</string>
<string>http</string>
</array>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSCameraUsageDescription</key>
<string>The app requires the camera access to set a custom profile picture.</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>The app requires the photo library to set a custom profile picture.</string>
<key>NSSupportsLiveActivities</key>
<true/>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<key>UIBackgroundModes</key>
<array>
<string>fetch</string>
<string>processing</string>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIStatusBarHidden</key>
<false/>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict>
</plist> </plist>

View File

@ -11,17 +11,6 @@ struct Widgets: WidgetBundle {
} }
} }
// text contrast background
extension Text {
func getContrastText(backgroundColor: Color) -> some View {
var r, g, b, a: CGFloat
(r, g, b, a) = (0, 0, 0, 0)
UIColor(backgroundColor).getRed(&r, green: &g, blue: &b, alpha: &a)
let luminance = 0.2126 * r + 0.7152 * g + 0.0722 * b
return luminance < 0.6 ? self.foregroundColor(.white) : self.foregroundColor(.black)
}
}
// Color Converter // Color Converter
extension Color { extension Color {
init(hex: String, alpha: Double = 1.0) { init(hex: String, alpha: Double = 1.0) {
@ -73,6 +62,7 @@ struct LockScreenLiveActivityView: View {
.font(.body) .font(.body)
.bold() .bold()
.padding(.trailing, 90) .padding(.trailing, 90)
} else { } else {
MultilineTextView(text: "\(context.state.index) \(context.state.title) - \(context.state.subtitle)", limit: 25) MultilineTextView(text: "\(context.state.index) \(context.state.title) - \(context.state.subtitle)", limit: 25)
.font(.body) .font(.body)
@ -94,7 +84,6 @@ struct LockScreenLiveActivityView: View {
.resizable() .resizable()
.aspectRatio(contentMode: .fit) .aspectRatio(contentMode: .fit)
.frame(width: CGFloat(8), height: CGFloat(8)) .frame(width: CGFloat(8), height: CGFloat(8))
.foregroundStyle(.secondary)
Text("\(context.state.nextSubject) - \(context.state.nextRoom)") Text("\(context.state.nextSubject) - \(context.state.nextRoom)")
.font(.caption) .font(.caption)
} }
@ -118,15 +107,11 @@ struct LockScreenLiveActivityView: View {
.monospacedDigit() .monospacedDigit()
.padding(.trailing) .padding(.trailing)
} }
// .activityBackgroundTint(
// context.state.color != "#676767"
// ? Color(hex: context.state.color)
// : Color.clear
// )
.activityBackgroundTint( .activityBackgroundTint(
Color.clear context.state.color != "#676767"
? Color(hex: context.state.color)
: Color.clear
) )
.foregroundStyle(Color(hex: context.state.color))
} }
} }

View File

@ -21,48 +21,45 @@ class FilcAPI {
static const baseUrl = "https://api.refilcapp.hu"; static const baseUrl = "https://api.refilcapp.hu";
// Public API // Public API
static const schoolList = "https://api.refilcapp.hu/v3/public/school-list"; static const schoolList = "$baseUrl/v3/public/school-list";
static const news = "https://staticrf-api.pages.dev/news/index.json"; static const news = "$baseUrl/v4/public/news";
static const supporters = "0.0.0.0"; static const supporters = "$baseUrl/v3/public/supporters";
// Private API // Private API
static const ads = "0.0.0.0"; static const ads = "$baseUrl/v3/private/ads";
static const config = "$baseUrl/v3/private/config"; static const config = "$baseUrl/v3/private/config";
static const reportApi = "$baseUrl/v3/private/crash-report"; static const reportApi = "$baseUrl/v3/private/crash-report";
static const rfPlus = "0.0.0.0"; static const rfPlus = "$baseUrl/v3/rf-plus";
static const plusAuthLogin = "0.0.0.0"; static const plusAuthLogin = "$rfPlus/auth/login";
static const plusAuthCallback = "0.0.0.0"; static const plusAuthCallback = "$rfPlus/auth/callback";
static const plusActivation = "0.0.0.0"; static const plusActivation = "$rfPlus/activate";
static const plusScopes = "0.0.0.0/"; static const plusScopes = "$rfPlus/scopes";
// Updates // Updates
static const repo = "refilc/naplo"; static const repo = "refilc/naplo";
static const releases = "https://api.github.com/repos/$repo/releases"; static const releases = "https://api.github.com/repos/$repo/releases";
// Share API // Share API
static const themeShare = "https://api.refilcapp.hu/v3/shared/theme/add"; static const themeShare = "$baseUrl/v3/shared/theme/add";
static const themeGet = "https://api.refilcapp.hu/v3/shared/theme/get"; static const themeGet = "$baseUrl/v3/shared/theme/get";
static const allThemes = "$themeGet/all"; static const allThemes = "$themeGet/all";
static const themeByID = "$themeGet/"; static const themeByID = "$themeGet/";
static const gradeColorsShare = "https://api.refilcapp.hu/v3/shared/grade-colors/add"; static const gradeColorsShare = "$baseUrl/v3/shared/grade-colors/add";
static const gradeColorsGet = "https://api.refilcapp.hu/v3/shared/grade-colors/get"; static const gradeColorsGet = "$baseUrl/v3/shared/grade-colors/get";
static const allGradeColors = "$gradeColorsGet/all"; static const allGradeColors = "$gradeColorsGet/all";
static const gradeColorsByID = "$gradeColorsGet/"; static const gradeColorsByID = "$gradeColorsGet/";
// Payment API // Payment API
static const payment = "0.0.0.0"; static const payment = "$baseUrl/v4/payment";
static const stripeSheet = "0.0.0.0"; static const stripeSheet = "$payment/stripe-sheet";
// Cloud Sync // Cloud Sync
// cloud sync? for what reason static const cloudSyncApi = "$baseUrl/v4/me/cloud-sync";
static const cloudSyncApi = "0.0.0.0";
static Future<bool> checkConnectivity() async => static Future<bool> checkConnectivity() async =>
(await Connectivity().checkConnectivity())[0] != ConnectivityResult.none; (await Connectivity().checkConnectivity())[0] != ConnectivityResult.none;
// nem tudom nem vazar-e senkit se, de mar ertelmetlen ez
static Future<List<School>?> getSchools() async { static Future<List<School>?> getSchools() async {
try { try {
http.Response res = await http.get(Uri.parse(schoolList)); http.Response res = await http.get(Uri.parse(schoolList));
@ -72,6 +69,16 @@ class FilcAPI {
.cast<Map>() .cast<Map>()
.map((json) => School.fromJson(json)) .map((json) => School.fromJson(json))
.toList(); .toList();
schools.add(School(
city: "Stockholm",
instituteCode: "refilc-test-sweden",
name: "reFilc Test SE - Leo Ekström High School",
));
schools.add(School(
city: "Madrid",
instituteCode: "refilc-test-spain",
name: "reFilc Test ES - Emilio Obrero University",
));
return schools; return schools;
} else { } else {
throw "HTTP ${res.statusCode}: ${res.body}"; throw "HTTP ${res.statusCode}: ${res.body}";
@ -94,7 +101,9 @@ class FilcAPI {
"rf-platform-version": settings.analyticsEnabled "rf-platform-version": settings.analyticsEnabled
? Platform.operatingSystemVersion ? Platform.operatingSystemVersion
: "unknown", : "unknown",
"rf-app-version": const String.fromEnvironment("APPVER", defaultValue: "?"), "rf-app-version": settings.analyticsEnabled
? const String.fromEnvironment("APPVER", defaultValue: "?")
: "unknown",
"rf-uinid": settings.xFilcId, "rf-uinid": settings.xFilcId,
}; };
@ -125,8 +134,7 @@ class FilcAPI {
http.Response res = await http.get(Uri.parse(news)); http.Response res = await http.get(Uri.parse(news));
if (res.statusCode == 200) { if (res.statusCode == 200) {
String utf8Body = utf8.decode(res.bodyBytes); return (jsonDecode(res.body) as List)
return (jsonDecode(utf8Body) as List)
.cast<Map>() .cast<Map>()
.map((e) => News.fromJson(e)) .map((e) => News.fromJson(e))
.toList(); .toList();
@ -388,6 +396,27 @@ class FilcAPI {
// cloud sync // cloud sync
static Future<Map?> cloudSync(Map<String, String> data, String token) async { static Future<Map?> cloudSync(Map<String, String> data, String token) async {
try {
var client = http.Client();
http.Response res = await client.post(
Uri.parse(cloudSyncApi),
body: data,
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'Authorization': 'Bearer $token',
},
);
if (res.statusCode != 200) {
throw "HTTP ${res.statusCode}: ${res.body}";
}
return jsonDecode(res.body);
} on Exception catch (error, stacktrace) {
log("ERROR: FilcAPI.cloudSync: $error $stacktrace");
}
return null; return null;
} }
} }

View File

@ -18,7 +18,7 @@ class AdProvider extends ChangeNotifier {
} }
Future<void> fetch() async { Future<void> fetch() async {
_ads = []; _ads = await FilcAPI.getAds() ?? [];
_ads.sort((a, b) => -a.date.compareTo(b.date)); _ads.sort((a, b) => -a.date.compareTo(b.date));
// check for new ads // check for new ads

View File

@ -1,3 +1,5 @@
import 'dart:io';
import 'package:refilc/database/query.dart'; import 'package:refilc/database/query.dart';
import 'package:refilc/database/store.dart'; import 'package:refilc/database/store.dart';
// ignore: depend_on_referenced_packages // ignore: depend_on_referenced_packages

View File

@ -5,7 +5,6 @@ import 'dart:async';
import 'package:refilc/api/providers/liveactivity/platform_channel.dart'; import 'package:refilc/api/providers/liveactivity/platform_channel.dart';
import 'package:refilc/helpers/subject.dart'; import 'package:refilc/helpers/subject.dart';
import 'package:refilc/models/settings.dart'; import 'package:refilc/models/settings.dart';
import 'package:refilc/ui/flutter_colorpicker/utils.dart';
import 'package:refilc_kreta_api/models/lesson.dart'; import 'package:refilc_kreta_api/models/lesson.dart';
import 'package:refilc_kreta_api/models/week.dart'; import 'package:refilc_kreta_api/models/week.dart';
import 'package:refilc/utils/format.dart'; import 'package:refilc/utils/format.dart';
@ -85,14 +84,11 @@ class LiveCardProvider extends ChangeNotifier {
} }
Map<String, String> toMap() { Map<String, String> toMap() {
// print("LIVE ACTIVITY COLOR BELOW:");
// print(_settings.liveActivityColor.toHexString().substring(2));
String color = '#${_settings.liveActivityColor.toHexString().substring(2)}';
switch (currentState) { switch (currentState) {
case LiveCardState.morning: case LiveCardState.morning:
return { return {
"color": color, "color":
'#${_settings.liveActivityColor.toString().substring(10, 16)}',
"icon": nextLesson != null "icon": nextLesson != null
? SubjectIcon.resolveName(subject: nextLesson?.subject) ? SubjectIcon.resolveName(subject: nextLesson?.subject)
: "book", : "book",
@ -101,22 +97,23 @@ class LiveCardProvider extends ChangeNotifier {
"description": "", "description": "",
"startDate": storeFirstRunDate != null "startDate": storeFirstRunDate != null
? ((storeFirstRunDate?.millisecondsSinceEpoch ?? 0) - ? ((storeFirstRunDate?.millisecondsSinceEpoch ?? 0) -
(_delay.inMilliseconds)) (_delay.inMilliseconds))
.toString() .toString()
: "", : "",
"endDate": ((nextLesson?.start.millisecondsSinceEpoch ?? 0) - "endDate": ((nextLesson?.start.millisecondsSinceEpoch ?? 0) -
_delay.inMilliseconds) _delay.inMilliseconds)
.toString(), .toString(),
"nextSubject": nextLesson != null "nextSubject": nextLesson != null
? nextLesson?.subject.renamedTo ?? ? nextLesson?.subject.renamedTo ??
ShortSubject.resolve(subject: nextLesson?.subject).capital() ShortSubject.resolve(subject: nextLesson?.subject).capital()
: "", : "",
"nextRoom": nextLesson?.room.replaceAll("_", " ") ?? "", "nextRoom": nextLesson?.room.replaceAll("_", " ") ?? "",
}; };
case LiveCardState.afternoon: case LiveCardState.afternoon:
return { return {
"color": color, "color":
'#${_settings.liveActivityColor.toString().substring(10, 16)}',
"icon": nextLesson != null "icon": nextLesson != null
? SubjectIcon.resolveName(subject: nextLesson?.subject) ? SubjectIcon.resolveName(subject: nextLesson?.subject)
: "book", : "book",
@ -125,22 +122,23 @@ class LiveCardProvider extends ChangeNotifier {
"description": "", "description": "",
"startDate": storeFirstRunDate != null "startDate": storeFirstRunDate != null
? ((storeFirstRunDate?.millisecondsSinceEpoch ?? 0) - ? ((storeFirstRunDate?.millisecondsSinceEpoch ?? 0) -
(_delay.inMilliseconds)) (_delay.inMilliseconds))
.toString() .toString()
: "", : "",
"endDate": ((nextLesson?.start.millisecondsSinceEpoch ?? 0) - "endDate": ((nextLesson?.start.millisecondsSinceEpoch ?? 0) -
_delay.inMilliseconds) _delay.inMilliseconds)
.toString(), .toString(),
"nextSubject": nextLesson != null "nextSubject": nextLesson != null
? nextLesson?.subject.renamedTo ?? ? nextLesson?.subject.renamedTo ??
ShortSubject.resolve(subject: nextLesson?.subject).capital() ShortSubject.resolve(subject: nextLesson?.subject).capital()
: "", : "",
"nextRoom": nextLesson?.room.replaceAll("_", " ") ?? "", "nextRoom": nextLesson?.room.replaceAll("_", " ") ?? "",
}; };
case LiveCardState.night: case LiveCardState.night:
return { return {
"color": color, "color":
'#${_settings.liveActivityColor.toString().substring(10, 16)}',
"icon": nextLesson != null "icon": nextLesson != null
? SubjectIcon.resolveName(subject: nextLesson?.subject) ? SubjectIcon.resolveName(subject: nextLesson?.subject)
: "book", : "book",
@ -149,44 +147,44 @@ class LiveCardProvider extends ChangeNotifier {
"description": "", "description": "",
"startDate": storeFirstRunDate != null "startDate": storeFirstRunDate != null
? ((storeFirstRunDate?.millisecondsSinceEpoch ?? 0) - ? ((storeFirstRunDate?.millisecondsSinceEpoch ?? 0) -
(_delay.inMilliseconds)) (_delay.inMilliseconds))
.toString() .toString()
: "", : "",
"endDate": ((nextLesson?.start.millisecondsSinceEpoch ?? 0) - "endDate": ((nextLesson?.start.millisecondsSinceEpoch ?? 0) -
_delay.inMilliseconds) _delay.inMilliseconds)
.toString(), .toString(),
"nextSubject": nextLesson != null "nextSubject": nextLesson != null
? nextLesson?.subject.renamedTo ?? ? nextLesson?.subject.renamedTo ??
ShortSubject.resolve(subject: nextLesson?.subject).capital() ShortSubject.resolve(subject: nextLesson?.subject).capital()
: "", : "",
"nextRoom": nextLesson?.room.replaceAll("_", " ") ?? "", "nextRoom": nextLesson?.room.replaceAll("_", " ") ?? "",
}; };
case LiveCardState.duringLesson: case LiveCardState.duringLesson:
return { return {
"color": color, "color":
'#${_settings.liveActivityColor.toString().substring(10, 16)}',
"icon": currentLesson != null "icon": currentLesson != null
? SubjectIcon.resolveName(subject: currentLesson?.subject) ? SubjectIcon.resolveName(subject: currentLesson?.subject)
: "book", : "book",
"index": "index":
currentLesson != null ? '${currentLesson!.lessonIndex}. ' : "", currentLesson != null ? '${currentLesson!.lessonIndex}. ' : "",
"title": currentLesson != null "title": currentLesson != null
? currentLesson?.subject.renamedTo ?? ? currentLesson?.subject.renamedTo ??
ShortSubject.resolve(subject: currentLesson?.subject) ShortSubject.resolve(subject: currentLesson?.subject)
.capital() .capital()
: "", : "",
"subtitle": "subtitle": "Terem: ${currentLesson?.room.replaceAll("_", " ") ?? ""}",
"Terem: ${currentLesson?.room.replaceAll("_", " ") ?? ""}",
"description": currentLesson?.description ?? "", "description": currentLesson?.description ?? "",
"startDate": ((currentLesson?.start.millisecondsSinceEpoch ?? 0) - "startDate": ((currentLesson?.start.millisecondsSinceEpoch ?? 0) -
_delay.inMilliseconds) _delay.inMilliseconds)
.toString(), .toString(),
"endDate": ((currentLesson?.end.millisecondsSinceEpoch ?? 0) - "endDate": ((currentLesson?.end.millisecondsSinceEpoch ?? 0) -
_delay.inMilliseconds) _delay.inMilliseconds)
.toString(), .toString(),
"nextSubject": nextLesson != null "nextSubject": nextLesson != null
? nextLesson?.subject.renamedTo ?? ? nextLesson?.subject.renamedTo ??
ShortSubject.resolve(subject: nextLesson?.subject).capital() ShortSubject.resolve(subject: nextLesson?.subject).capital()
: "", : "",
"nextRoom": nextLesson?.room.replaceAll("_", " ") ?? "", "nextRoom": nextLesson?.room.replaceAll("_", " ") ?? "",
}; };
@ -201,23 +199,24 @@ class LiveCardProvider extends ChangeNotifier {
final diff = getFloorDifference(); final diff = getFloorDifference();
return { return {
"color": color, "color":
'#${_settings.liveActivityColor.toString().substring(10, 16)}',
"icon": iconFloorMap[diff] ?? "cup.and.saucer", "icon": iconFloorMap[diff] ?? "cup.and.saucer",
"title": "Szünet", "title": "Szünet",
"description": "go $diff".i18n.fill([ "description": "go $diff".i18n.fill([
diff != "to room" ? (nextLesson!.getFloor() ?? 0) : nextLesson!.room diff != "to room" ? (nextLesson!.getFloor() ?? 0) : nextLesson!.room
]), ]),
"startDate": ((prevLesson?.end.millisecondsSinceEpoch ?? 0) - "startDate": ((prevLesson?.end.millisecondsSinceEpoch ?? 0) -
_delay.inMilliseconds) _delay.inMilliseconds)
.toString(), .toString(),
"endDate": ((nextLesson?.start.millisecondsSinceEpoch ?? 0) - "endDate": ((nextLesson?.start.millisecondsSinceEpoch ?? 0) -
_delay.inMilliseconds) _delay.inMilliseconds)
.toString(), .toString(),
"nextSubject": (nextLesson != null "nextSubject": (nextLesson != null
? nextLesson?.subject.renamedTo ?? ? nextLesson?.subject.renamedTo ??
ShortSubject.resolve(subject: nextLesson?.subject) ShortSubject.resolve(subject: nextLesson?.subject)
.capital() .capital()
: "") : "")
.capital(), .capital(),
"nextRoom": nextLesson?.room.replaceAll("_", " ") ?? "", "nextRoom": nextLesson?.room.replaceAll("_", " ") ?? "",
"index": "", "index": "",
@ -244,8 +243,8 @@ class LiveCardProvider extends ChangeNotifier {
DateTime now = _now().add(_delay); DateTime now = _now().add(_delay);
if ((currentState == LiveCardState.morning || if ((currentState == LiveCardState.morning ||
currentState == LiveCardState.afternoon || currentState == LiveCardState.afternoon ||
currentState == LiveCardState.night) && currentState == LiveCardState.night) &&
storeFirstRunDate == null) { storeFirstRunDate == null) {
storeFirstRunDate = now; storeFirstRunDate = now;
} }
@ -254,9 +253,9 @@ class LiveCardProvider extends ChangeNotifier {
// Filter label lessons #128 // Filter label lessons #128
today = today today = today
.where((lesson) => .where((lesson) =>
lesson.status?.name != "Elmaradt" && lesson.status?.name != "Elmaradt" &&
lesson.subject.id != '' && lesson.subject.id != '' &&
!lesson.isEmpty) !lesson.isEmpty)
.toList(); .toList();
if (today.isNotEmpty) { if (today.isNotEmpty) {
@ -264,7 +263,7 @@ class LiveCardProvider extends ChangeNotifier {
today.sort((a, b) => a.start.compareTo(b.start)); today.sort((a, b) => a.start.compareTo(b.start));
final _lesson = today.firstWhere( final _lesson = today.firstWhere(
(l) => l.start.isBefore(now) && l.end.isAfter(now), (l) => l.start.isBefore(now) && l.end.isAfter(now),
orElse: () => Lesson.fromJson({})); orElse: () => Lesson.fromJson({}));
if (_lesson.start.year != 0) { if (_lesson.start.year != 0) {
@ -329,7 +328,7 @@ class LiveCardProvider extends ChangeNotifier {
hasActivityStarted = true; hasActivityStarted = true;
} else if (!hasActivityStarted && } else if (!hasActivityStarted &&
((currentState == LiveCardState.duringLesson && ((currentState == LiveCardState.duringLesson &&
currentLesson != null) || currentLesson != null) ||
currentState == LiveCardState.duringBreak)) { currentState == LiveCardState.duringBreak)) {
debugPrint("Óra van, vagy szünet, de nincs LiveActivity. létrehozás..."); debugPrint("Óra van, vagy szünet, de nincs LiveActivity. létrehozás...");
PlatformChannel.createLiveActivity(toMap()); PlatformChannel.createLiveActivity(toMap());
@ -363,11 +362,7 @@ class LiveCardProvider extends ChangeNotifier {
} }
//END //END
if ((currentState == LiveCardState.afternoon || if ((currentState == LiveCardState.afternoon || currentState == LiveCardState.morning || currentState == LiveCardState.night) && hasActivityStarted && nextLesson != null &&
currentState == LiveCardState.morning ||
currentState == LiveCardState.night) &&
hasActivityStarted &&
nextLesson != null &&
nextLesson!.start.difference(now).inMinutes > 60) { nextLesson!.start.difference(now).inMinutes > 60) {
debugPrint("Több, mint 1 óra van az első óráig. Befejezés..."); debugPrint("Több, mint 1 óra van az első óráig. Befejezés...");
PlatformChannel.endLiveActivity(); PlatformChannel.endLiveActivity();
@ -394,4 +389,4 @@ class LiveCardProvider extends ChangeNotifier {
List<Lesson> _today(TimetableProvider p) => (p.getWeek(Week.current()) ?? []) List<Lesson> _today(TimetableProvider p) => (p.getWeek(Week.current()) ?? [])
.where((l) => _sameDate(l.date, _now())) .where((l) => _sameDate(l.date, _now()))
.toList(); .toList();
} }

View File

@ -90,11 +90,11 @@ Future<void> syncAll(BuildContext context) async {
''; '';
if (authRes != 'success') { if (authRes != 'success') {
if (kDebugMode) print('ERROR: failed to refresh login'); if (kDebugMode) print('ERROR: failed to refresh login');
lock = false; lock = false;
return Future.value(); return Future.value();
} else { } else {
if (kDebugMode) print('INFO: access token refreshed'); if (kDebugMode) print('INFO: access token refreshed');
} }
} else { } else {
if (kDebugMode) print('INFO: access token is not expired'); if (kDebugMode) print('INFO: access token is not expired');
} }

View File

@ -214,7 +214,7 @@ Widget errorBuilder(FlutterErrorDetails details) {
} }
}); });
return Container(); return Container();
}); });
} }

View File

@ -470,7 +470,7 @@ class SettingsProvider extends ChangeNotifier {
notificationsMessagesEnabled: true, notificationsMessagesEnabled: true,
notificationsLessonsEnabled: true, notificationsLessonsEnabled: true,
notificationsBitfield: 255, notificationsBitfield: 255,
developerMode: true, developerMode: false,
notificationPollInterval: 1, notificationPollInterval: 1,
vibrate: VibrationStrength.medium, vibrate: VibrationStrength.medium,
abWeeks: false, abWeeks: false,
@ -478,7 +478,7 @@ class SettingsProvider extends ChangeNotifier {
updateChannel: UpdateChannel.stable, updateChannel: UpdateChannel.stable,
config: Config.fromJson({}), config: Config.fromJson({}),
xFilcId: const Uuid().v4(), xFilcId: const Uuid().v4(),
analyticsEnabled: false, analyticsEnabled: true,
graphClassAvg: false, graphClassAvg: false,
goodStudent: false, goodStudent: false,
presentationMode: false, presentationMode: false,
@ -500,13 +500,13 @@ class SettingsProvider extends ChangeNotifier {
renameSubjectsItalics: false, renameSubjectsItalics: false,
renameTeachersEnabled: false, renameTeachersEnabled: false,
renameTeachersItalics: false, renameTeachersItalics: false,
liveActivityColor: const Color(0x00000000), liveActivityColor: const Color(0xFF676767),
welcomeMessage: '', welcomeMessage: '',
appIcon: 'refilc_default', appIcon: 'refilc_default',
currentThemeId: '', currentThemeId: '',
currentThemeDisplayName: '', currentThemeDisplayName: '',
currentThemeCreator: 'reFilc', currentThemeCreator: 'reFilc',
showBreaks: false, showBreaks: true,
pinSetGeneral: '', pinSetGeneral: '',
pinSetPersonalize: '', pinSetPersonalize: '',
pinSetNotify: '', pinSetNotify: '',

View File

@ -115,42 +115,42 @@ class AppTheme {
primary: accent, primary: accent,
onPrimary: onPrimary:
(accent.computeLuminance() > 0.5 ? Colors.black : Colors.white) (accent.computeLuminance() > 0.5 ? Colors.black : Colors.white)
.withValues(alpha: .9), .withOpacity(.9),
secondary: newSecondary, secondary: newSecondary,
onSecondary: (newSecondary.computeLuminance() > 0.5 onSecondary: (newSecondary.computeLuminance() > 0.5
? Colors.black ? Colors.black
: Colors.white) : Colors.white)
.withValues(alpha: .9), .withOpacity(.9),
tertiary: newTertiary, tertiary: newTertiary,
onTertiary: onTertiary:
(newTertiary.computeLuminance() > 0.5 ? Colors.black : Colors.white) (newTertiary.computeLuminance() > 0.5 ? Colors.black : Colors.white)
.withValues(alpha: .9), .withOpacity(.9),
brightness: Brightness.light, brightness: Brightness.light,
error: lightColors.red, error: lightColors.red,
onError: Colors.white.withValues(alpha: .9), onError: Colors.white.withOpacity(.9),
surface: highlightColor, surface: highlightColor,
onSurface: Colors.black.withValues(alpha: .9), onSurface: Colors.black.withOpacity(.9),
), ),
shadowColor: lightColors.shadow.withValues(alpha: .5), shadowColor: lightColors.shadow.withOpacity(.5),
appBarTheme: AppBarTheme(backgroundColor: backgroundColor), appBarTheme: AppBarTheme(backgroundColor: backgroundColor),
indicatorColor: accent, indicatorColor: accent,
iconTheme: IconThemeData(color: lightColors.text.withValues(alpha: .75)), iconTheme: IconThemeData(color: lightColors.text.withOpacity(.75)),
navigationBarTheme: NavigationBarThemeData( navigationBarTheme: NavigationBarThemeData(
indicatorColor: accent.withValues( indicatorColor:
alpha: accentColor == AccentColor.adaptive ? 0.4 : 0.8), accent.withOpacity(accentColor == AccentColor.adaptive ? 0.4 : 0.8),
iconTheme: iconTheme:
WidgetStateProperty.all(IconThemeData(color: lightColors.text)), WidgetStateProperty.all(IconThemeData(color: lightColors.text)),
backgroundColor: highlightColor, backgroundColor: highlightColor,
labelTextStyle: WidgetStateProperty.all(TextStyle( labelTextStyle: WidgetStateProperty.all(TextStyle(
fontSize: 13.0, fontSize: 13.0,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: lightColors.text.withValues(alpha: 0.8), color: lightColors.text.withOpacity(0.8),
)), )),
labelBehavior: NavigationDestinationLabelBehavior.alwaysShow, labelBehavior: NavigationDestinationLabelBehavior.alwaysShow,
height: 76.0, height: 76.0,
), ),
sliderTheme: SliderThemeData( sliderTheme: SliderThemeData(
inactiveTrackColor: accent.withValues(alpha: .3), inactiveTrackColor: accent.withOpacity(.3),
), ),
progressIndicatorTheme: ProgressIndicatorThemeData(color: accent), progressIndicatorTheme: ProgressIndicatorThemeData(color: accent),
expansionTileTheme: ExpansionTileThemeData(iconColor: accent), expansionTileTheme: ExpansionTileThemeData(iconColor: accent),
@ -238,48 +238,48 @@ class AppTheme {
primary: accent, primary: accent,
onPrimary: onPrimary:
(accent.computeLuminance() > 0.5 ? Colors.black : Colors.white) (accent.computeLuminance() > 0.5 ? Colors.black : Colors.white)
.withValues(alpha: .9), .withOpacity(.9),
secondary: newSecondary, secondary: newSecondary,
onSecondary: (newSecondary.computeLuminance() > 0.5 onSecondary: (newSecondary.computeLuminance() > 0.5
? Colors.black ? Colors.black
: Colors.white) : Colors.white)
.withValues(alpha: .9), .withOpacity(.9),
tertiary: newTertiary, tertiary: newTertiary,
onTertiary: onTertiary:
(newTertiary.computeLuminance() > 0.5 ? Colors.black : Colors.white) (newTertiary.computeLuminance() > 0.5 ? Colors.black : Colors.white)
.withValues(alpha: .9), .withOpacity(.9),
brightness: Brightness.dark, brightness: Brightness.dark,
error: darkColors.red, error: darkColors.red,
onError: Colors.black.withValues(alpha: .9), onError: Colors.black.withOpacity(.9),
surface: highlightColor, surface: highlightColor,
onSurface: Colors.white.withValues(alpha: .9), onSurface: Colors.white.withOpacity(.9),
), ),
shadowColor: highlightColor.withValues(alpha: .5), //darkColors.shadow, shadowColor: highlightColor.withOpacity(.5), //darkColors.shadow,
appBarTheme: AppBarTheme(backgroundColor: backgroundColor), appBarTheme: AppBarTheme(backgroundColor: backgroundColor),
indicatorColor: accent, indicatorColor: accent,
iconTheme: IconThemeData(color: darkColors.text.withValues(alpha: .75)), iconTheme: IconThemeData(color: darkColors.text.withOpacity(.75)),
navigationBarTheme: NavigationBarThemeData( navigationBarTheme: NavigationBarThemeData(
indicatorColor: accent.withValues( indicatorColor:
alpha: accentColor == AccentColor.adaptive ? 0.4 : 0.8), accent.withOpacity(accentColor == AccentColor.adaptive ? 0.4 : 0.8),
iconTheme: iconTheme:
WidgetStateProperty.all(IconThemeData(color: darkColors.text)), WidgetStateProperty.all(IconThemeData(color: darkColors.text)),
backgroundColor: highlightColor, backgroundColor: highlightColor,
labelTextStyle: WidgetStateProperty.all(TextStyle( labelTextStyle: WidgetStateProperty.all(TextStyle(
fontSize: 13.0, fontSize: 13.0,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: darkColors.text.withValues(alpha: 0.8), color: darkColors.text.withOpacity(0.8),
)), )),
labelBehavior: NavigationDestinationLabelBehavior.alwaysShow, labelBehavior: NavigationDestinationLabelBehavior.alwaysShow,
height: 76.0, height: 76.0,
), ),
sliderTheme: SliderThemeData( sliderTheme: SliderThemeData(
inactiveTrackColor: accent.withValues(alpha: .3), inactiveTrackColor: accent.withOpacity(.3),
), ),
progressIndicatorTheme: ProgressIndicatorThemeData(color: accent), progressIndicatorTheme: ProgressIndicatorThemeData(color: accent),
expansionTileTheme: ExpansionTileThemeData(iconColor: accent), expansionTileTheme: ExpansionTileThemeData(iconColor: accent),
cardColor: highlightColor, cardColor: highlightColor,
chipTheme: ChipThemeData( chipTheme: ChipThemeData(
backgroundColor: accent.withValues(alpha: .2), backgroundColor: accent.withOpacity(.2),
elevation: 1, elevation: 1,
), ),
bottomNavigationBarTheme: BottomNavigationBarThemeData( bottomNavigationBarTheme: BottomNavigationBarThemeData(

View File

@ -191,7 +191,7 @@ List<Widget> sortDateWidgets(
width: 150.0, width: 150.0,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12.0), borderRadius: BorderRadius.circular(12.0),
color: AppColors.of(context).text.withValues(alpha: .25), color: AppColors.of(context).text.withOpacity(.25),
), ),
), ),
), ),

View File

@ -178,7 +178,8 @@ Future<List<DateWidget>> getFilterWidgets(FilterType activeData,
// Ads // Ads
case FilterType.ads: case FilterType.ads:
if (adProvider.available) { if (adProvider.available) {
items = ad_filter.getWidgets(adProvider.ads, context); items = ad_filter.getWidgets(
adProvider.ads, context);
} }
break; break;
} }
@ -232,8 +233,8 @@ Widget filterItemBuilder(
BoxShadow( BoxShadow(
offset: const Offset(0, 21), offset: const Offset(0, 21),
blurRadius: 23.0, blurRadius: 23.0,
color: Theme.of(context).shadowColor.withValues( color: Theme.of(context).shadowColor.withOpacity(
alpha: Theme.of(context).shadowColor.opacity * Theme.of(context).shadowColor.opacity *
CurvedAnimation( CurvedAnimation(
parent: CurvedAnimation( parent: CurvedAnimation(
parent: animation, parent: animation,

View File

@ -73,7 +73,7 @@ Widget _defaultItemBuilder(
color: color, color: color,
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: color.withValues(alpha: 0.8), color: color.withOpacity(0.8),
offset: const Offset(1, 2), offset: const Offset(1, 2),
blurRadius: 5) blurRadius: 5)
], ],

View File

@ -380,7 +380,7 @@ class FilcColorPickerState extends State<FilcColorPicker> {
fontSize: 16.0, fontSize: 16.0,
color: AppColors.of(context) color: AppColors.of(context)
.text .text
.withValues(alpha: isAdvancedView ? 1.0 : .5), .withOpacity(isAdvancedView ? 1.0 : .5),
), ),
), ),
], ],

View File

@ -210,32 +210,32 @@ class TrackPainter extends CustomPainter {
break; break;
case TrackType.red: case TrackType.red:
final List<Color> colors = [ final List<Color> colors = [
hsvColor.toColor().withRed(0).withValues(alpha: 1.0), hsvColor.toColor().withRed(0).withOpacity(1.0),
hsvColor.toColor().withRed(255).withValues(alpha: 1.0), hsvColor.toColor().withRed(255).withOpacity(1.0),
]; ];
Gradient gradient = LinearGradient(colors: colors); Gradient gradient = LinearGradient(colors: colors);
canvas.drawRect(rect, Paint()..shader = gradient.createShader(rect)); canvas.drawRect(rect, Paint()..shader = gradient.createShader(rect));
break; break;
case TrackType.green: case TrackType.green:
final List<Color> colors = [ final List<Color> colors = [
hsvColor.toColor().withGreen(0).withValues(alpha: 1.0), hsvColor.toColor().withGreen(0).withOpacity(1.0),
hsvColor.toColor().withGreen(255).withValues(alpha: 1.0), hsvColor.toColor().withGreen(255).withOpacity(1.0),
]; ];
Gradient gradient = LinearGradient(colors: colors); Gradient gradient = LinearGradient(colors: colors);
canvas.drawRect(rect, Paint()..shader = gradient.createShader(rect)); canvas.drawRect(rect, Paint()..shader = gradient.createShader(rect));
break; break;
case TrackType.blue: case TrackType.blue:
final List<Color> colors = [ final List<Color> colors = [
hsvColor.toColor().withBlue(0).withValues(alpha: 1.0), hsvColor.toColor().withBlue(0).withOpacity(1.0),
hsvColor.toColor().withBlue(255).withValues(alpha: 1.0), hsvColor.toColor().withBlue(255).withOpacity(1.0),
]; ];
Gradient gradient = LinearGradient(colors: colors); Gradient gradient = LinearGradient(colors: colors);
canvas.drawRect(rect, Paint()..shader = gradient.createShader(rect)); canvas.drawRect(rect, Paint()..shader = gradient.createShader(rect));
break; break;
case TrackType.alpha: case TrackType.alpha:
final List<Color> colors = [ final List<Color> colors = [
hsvColor.toColor().withValues(alpha: 0.0), hsvColor.toColor().withOpacity(0.0),
hsvColor.toColor().withValues(alpha: 1.0), hsvColor.toColor().withOpacity(1.0),
]; ];
Gradient gradient = LinearGradient(colors: colors); Gradient gradient = LinearGradient(colors: colors);
canvas.drawRect(rect, Paint()..shader = gradient.createShader(rect)); canvas.drawRect(rect, Paint()..shader = gradient.createShader(rect));
@ -390,7 +390,7 @@ class ColorPickerInputState extends State<ColorPickerInput> {
), ),
contentPadding: contentPadding:
const EdgeInsets.symmetric(vertical: 8.0, horizontal: 8.0), const EdgeInsets.symmetric(vertical: 8.0, horizontal: 8.0),
fillColor: AppColors.of(context).text.withValues(alpha: .1), fillColor: AppColors.of(context).text.withOpacity(.1),
), ),
onChanged: (String value) { onChanged: (String value) {
String input = value; String input = value;
@ -603,20 +603,20 @@ class ColorPickerSlider extends StatelessWidget {
break; break;
case TrackType.red: case TrackType.red:
thumbOffset += (box.maxWidth - 30.0) * hsvColor.toColor().red / 0xff; thumbOffset += (box.maxWidth - 30.0) * hsvColor.toColor().red / 0xff;
thumbColor = hsvColor.toColor().withValues(alpha: 1.0); thumbColor = hsvColor.toColor().withOpacity(1.0);
break; break;
case TrackType.green: case TrackType.green:
thumbOffset += thumbOffset +=
(box.maxWidth - 30.0) * hsvColor.toColor().green / 0xff; (box.maxWidth - 30.0) * hsvColor.toColor().green / 0xff;
thumbColor = hsvColor.toColor().withValues(alpha: 1.0); thumbColor = hsvColor.toColor().withOpacity(1.0);
break; break;
case TrackType.blue: case TrackType.blue:
thumbOffset += (box.maxWidth - 30.0) * hsvColor.toColor().blue / 0xff; thumbOffset += (box.maxWidth - 30.0) * hsvColor.toColor().blue / 0xff;
thumbColor = hsvColor.toColor().withValues(alpha: 1.0); thumbColor = hsvColor.toColor().withOpacity(1.0);
break; break;
case TrackType.alpha: case TrackType.alpha:
thumbOffset += (box.maxWidth - 30.0) * hsvColor.toColor().opacity; thumbOffset += (box.maxWidth - 30.0) * hsvColor.toColor().opacity;
thumbColor = hsvColor.toColor().withValues(alpha: hsvColor.alpha); thumbColor = hsvColor.toColor().withOpacity(hsvColor.alpha);
break; break;
} }
@ -709,8 +709,8 @@ class ColorIndicator extends StatelessWidget {
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: useWhiteForeground(color) color: useWhiteForeground(color)
? Colors.white.withValues(alpha: .5) ? Colors.white.withOpacity(.5)
: Colors.black.withValues(alpha: .5), : Colors.black.withOpacity(.5),
offset: const Offset(0, 0), offset: const Offset(0, 0),
blurRadius: 5) blurRadius: 5)
], ],

View File

@ -199,7 +199,7 @@ class GradeTile extends StatelessWidget {
: Icon( : Icon(
SubjectIcon.resolveVariant( SubjectIcon.resolveVariant(
context: context, subject: grade.subject), context: context, subject: grade.subject),
color: AppColors.of(context).text.withValues(alpha: .5), color: AppColors.of(context).text.withOpacity(.5),
), ),
minLeadingWidth: isSubjectView ? 32.0 : 0, minLeadingWidth: isSubjectView ? 32.0 : 0,
), ),
@ -288,8 +288,7 @@ class GradeValueWidget extends StatelessWidget {
shadows: [ shadows: [
if (value.weight >= 200) if (value.weight >= 200)
Shadow( Shadow(
color: color: (contrast ? Colors.white : color).withOpacity(.4),
(contrast ? Colors.white : color).withValues(alpha: .4),
offset: const Offset(-4, -3), offset: const Offset(-4, -3),
) )
], ],
@ -313,7 +312,7 @@ class GradeValueWidget extends StatelessWidget {
width: size * 1.4, width: size * 1.4,
height: size * 1.4, height: size * 1.4,
decoration: BoxDecoration( decoration: BoxDecoration(
color: color.withValues(alpha: contrast ? 1.0 : .25), color: color.withOpacity(contrast ? 1.0 : .25),
shape: BoxShape.circle, shape: BoxShape.circle,
boxShadow: [ boxShadow: [
if (shadow && if (shadow &&

View File

@ -75,7 +75,7 @@ class LessonTile extends StatelessWidget {
} }
if (lesson.isEmpty) { if (lesson.isEmpty) {
accent = AppColors.of(context).text.withValues(alpha: 0.6); accent = AppColors.of(context).text.withOpacity(0.6);
} }
if (!lesson.studentPresence) { if (!lesson.studentPresence) {
@ -182,8 +182,9 @@ class LessonTile extends StatelessWidget {
fontSize: 16.5, fontSize: 16.5,
color: fill color: fill
? accent ? accent
: AppColors.of(context).text.withValues( : AppColors.of(context)
alpha: !lesson.isEmpty ? 1.0 : 0.5), .text
.withOpacity(!lesson.isEmpty ? 1.0 : 0.5),
fontStyle: lesson.subject.isRenamed && fontStyle: lesson.subject.isRenamed &&
settingsProvider.renamedSubjectsItalics settingsProvider.renamedSubjectsItalics
? FontStyle.italic ? FontStyle.italic
@ -198,10 +199,8 @@ class LessonTile extends StatelessWidget {
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 14.0, fontSize: 14.0,
color: fill color: fill
? accent.withValues(alpha: .9) ? accent.withOpacity(.9)
: AppColors.of(context) : AppColors.of(context).text.withOpacity(.9),
.text
.withValues(alpha: .9),
), ),
), ),
), ),
@ -218,7 +217,7 @@ class LessonTile extends StatelessWidget {
// color: Theme.of(context) // color: Theme.of(context)
// .colorScheme // .colorScheme
// .secondary // .secondary
// .withValues(alpha: .15), // .withOpacity(.15),
// borderRadius: BorderRadius.circular(10.0), // borderRadius: BorderRadius.circular(10.0),
// ), // ),
// child: Text( // child: Text(
@ -230,7 +229,7 @@ class LessonTile extends StatelessWidget {
// color: Theme.of(context) // color: Theme.of(context)
// .colorScheme // .colorScheme
// .secondary // .secondary
// .withValues(alpha: .9), // .withOpacity(.9),
// ), // ),
// ), // ),
// ) // )
@ -247,11 +246,11 @@ class LessonTile extends StatelessWidget {
horizontal: 5.5, vertical: 3.0), horizontal: 5.5, vertical: 3.0),
decoration: BoxDecoration( decoration: BoxDecoration(
color: fill color: fill
? accent.withValues(alpha: .15) ? accent.withOpacity(.15)
: Theme.of(context) : Theme.of(context)
.colorScheme .colorScheme
.tertiary .tertiary
.withValues(alpha: .15), .withOpacity(.15),
borderRadius: BorderRadius.circular(10.0), borderRadius: BorderRadius.circular(10.0),
), ),
child: Text( child: Text(
@ -262,11 +261,11 @@ class LessonTile extends StatelessWidget {
fontSize: 12.0, fontSize: 12.0,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: fill color: fill
? accent.withValues(alpha: 0.9) ? accent.withOpacity(0.9)
: Theme.of(context) : Theme.of(context)
.colorScheme .colorScheme
.secondary .secondary
.withValues(alpha: .9), .withOpacity(.9),
), ),
), ),
), ),
@ -278,9 +277,7 @@ class LessonTile extends StatelessWidget {
textAlign: TextAlign.start, textAlign: TextAlign.start,
style: TextStyle( style: TextStyle(
fontSize: 14.0, fontSize: 14.0,
color: fill color: fill ? accent.withOpacity(0.5) : null,
? accent.withValues(alpha: 0.5)
: null,
), ),
), ),
], ],
@ -347,7 +344,7 @@ class LessonTile extends StatelessWidget {
? Theme.of(context) ? Theme.of(context)
.colorScheme .colorScheme
.secondary .secondary
.withValues(alpha: .3) .withOpacity(.3)
: const Color(0x00000000), : const Color(0x00000000),
borderRadius: BorderRadius.circular(12.0), borderRadius: BorderRadius.circular(12.0),
boxShadow: [ boxShadow: [
@ -356,7 +353,7 @@ class LessonTile extends StatelessWidget {
color: Theme.of(context) color: Theme.of(context)
.colorScheme .colorScheme
.secondary .secondary
.withValues(alpha: .25), .withOpacity(.25),
blurRadius: 6.0, blurRadius: 6.0,
) )
], ],
@ -389,7 +386,7 @@ class LessonTile extends StatelessWidget {
// fontWeight: FontWeight.w500, // fontWeight: FontWeight.w500,
// color: AppColors.of(context) // color: AppColors.of(context)
// .text // .text
// .withValues(alpha: .75), // .withOpacity(.75),
// ), // ),
// ), // ),
// ), // ),
@ -401,11 +398,11 @@ class LessonTile extends StatelessWidget {
horizontal: 6.0, vertical: 3.5), horizontal: 6.0, vertical: 3.5),
decoration: BoxDecoration( decoration: BoxDecoration(
color: fill color: fill
? accent.withValues(alpha: .15) ? accent.withOpacity(.15)
: Theme.of(context) : Theme.of(context)
.colorScheme .colorScheme
.tertiary .tertiary
.withValues(alpha: .15), .withOpacity(.15),
borderRadius: BorderRadius.circular(10.0), borderRadius: BorderRadius.circular(10.0),
), ),
child: Text( child: Text(
@ -416,11 +413,11 @@ class LessonTile extends StatelessWidget {
fontSize: 12.5, fontSize: 12.5,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: fill color: fill
? accent.withValues(alpha: 0.9) ? accent.withOpacity(0.9)
: Theme.of(context) : Theme.of(context)
.colorScheme .colorScheme
.secondary .secondary
.withValues(alpha: .9), .withOpacity(.9),
), ),
), ),
), ),
@ -441,10 +438,10 @@ class LessonTile extends StatelessWidget {
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: fill color: fill
? accent.withValues(alpha: .9) ? accent.withOpacity(.9)
: AppColors.of(context) : AppColors.of(context)
.text .text
.withValues(alpha: .9), .withOpacity(.9),
), ),
), ),
], ],
@ -505,8 +502,8 @@ class LessonSubtile extends StatelessWidget {
Center( Center(
child: SizedBox( child: SizedBox(
width: 30.0, width: 30.0,
child: Icon(icon, child:
color: iconColor.withValues(alpha: .75), size: 20.0), Icon(icon, color: iconColor.withOpacity(.75), size: 20.0),
), ),
), ),
Expanded( Expanded(
@ -518,8 +515,7 @@ class LessonSubtile extends StatelessWidget {
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: color: AppColors.of(context).text.withOpacity(.65)),
AppColors.of(context).text.withValues(alpha: .65)),
), ),
), ),
), ),

View File

@ -58,8 +58,7 @@ class MessageTile extends StatelessWidget {
width: 105, width: 105,
height: 15, height: 15,
decoration: BoxDecoration( decoration: BoxDecoration(
color: color: AppColors.of(context).text.withOpacity(.85),
AppColors.of(context).text.withValues(alpha: .85),
borderRadius: BorderRadius.circular(8.0), borderRadius: BorderRadius.circular(8.0),
), ),
), ),
@ -90,8 +89,7 @@ class MessageTile extends StatelessWidget {
width: 150, width: 150,
height: 10, height: 10,
decoration: BoxDecoration( decoration: BoxDecoration(
color: color: AppColors.of(context).text.withOpacity(.45),
AppColors.of(context).text.withValues(alpha: .45),
borderRadius: BorderRadius.circular(8.0), borderRadius: BorderRadius.circular(8.0),
), ),
), ),
@ -111,8 +109,7 @@ class MessageTile extends StatelessWidget {
width: 35, width: 35,
height: 15, height: 15,
decoration: BoxDecoration( decoration: BoxDecoration(
color: color: AppColors.of(context).text.withOpacity(.45),
AppColors.of(context).text.withValues(alpha: .45),
borderRadius: BorderRadius.circular(8.0), borderRadius: BorderRadius.circular(8.0),
), ),
), ),
@ -123,7 +120,7 @@ class MessageTile extends StatelessWidget {
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
fontSize: 14.0, fontSize: 14.0,
color: AppColors.of(context).text.withValues(alpha: .75), color: AppColors.of(context).text.withOpacity(.75),
), ),
), ),
), ),

View File

@ -3,7 +3,7 @@ description: "Egy nem hivatalos e-KRÉTA kliens, diákoktól diákoknak."
homepage: https://refilc.hu homepage: https://refilc.hu
publish_to: "none" publish_to: "none"
version: 5.1.3+287 version: 5.1.0+282
environment: environment:
sdk: ^3.6.0 sdk: ^3.6.0
@ -11,7 +11,7 @@ environment:
dependencies: dependencies:
flutter: flutter:
sdk: flutter sdk: flutter
cupertino_icons: ^1.0.8 cupertino_icons: ^1.0.2
# reFilc packages # reFilc packages
refilc_mobile_ui: refilc_mobile_ui:
@ -26,59 +26,72 @@ dependencies:
flutter_localizations: flutter_localizations:
sdk: flutter sdk: flutter
i18n_extension: ^12.0.1 i18n_extension: ^12.0.1
sqflite: ^2.4.1 sqflite: ^2.2.0+2
intl: ^0.19.0 intl: ^0.19.0
provider: ^6.1.2 provider: ^6.1.1
http: ^1.3.0 http: ^1.1.2
uuid: ^4.5.1 uuid: ^4.2.1
html: ^0.15.5 html: ^0.15.0
open_filex: ^4.6.0 open_filex: ^4.3.4
path_provider: ^2.1.5 # open_file:
permission_handler: ^11.3.1 # git:
share_plus: ^10.1.4 # url: https://github.com/crazecoder/open_file
connectivity_plus: ^6.1.3 # ref: master
path_provider: ^2.0.2
permission_handler: ^11.0.1
share_plus: ^10.0.3
connectivity_plus: ^6.0.3
flutter_displaymode: ^0.6.0 flutter_displaymode: ^0.6.0
quick_actions: ^1.1.0 quick_actions: ^1.0.1
animated_list_plus: ^0.5.2 animated_list_plus: ^0.5.0
dynamic_color: ^1.7.0 dynamic_color: ^1.2.2
material_color_utilities: ^0.11.1 material_color_utilities: ^0.11.1
crypto: ^3.0.6 crypto: ^3.0.2
elegant_notification: ^2.4.1 elegant_notification: ^2.2.0
flutter_feather_icons: ^2.0.0+1 flutter_feather_icons: ^2.0.0+1
# live_activities: ^1.7.4
animated_flip_counter: ^0.3.4 animated_flip_counter: ^0.3.4
lottie: ^3.3.1 lottie: ^3.1.0
rive: ^0.12.4 rive: ^0.12.4
animated_background: ^2.0.0 animated_background: ^2.0.0
dropdown_button2: ^2.3.9 dropdown_button2: ^2.3.9
home_widget: ^0.7.0+1 home_widget:
flutter_expandable_fab: ^2.3.0 git:
url_launcher: ^6.3.1 url: https://github.com/refilc/home_widget.git
flutter_svg: ^2.0.17 ref: flutter-beta
image_picker: ^1.1.2 flutter_expandable_fab: ^2.0.0
animations: ^2.0.11 url_launcher: ^6.1.6
background_fetch: ^1.3.7 # workmanager:
# git:
# url: https://github.com/refilc/flutter_workmanager.git
# ref: v0.5.1
flutter_svg: ^2.0.10+1
image_picker: ^1.0.7
animations: ^2.0.1
background_fetch: ^1.1.5
flutter_local_notifications: ^18.0.1 flutter_local_notifications: ^18.0.1
package_info_plus: ^8.2.1 package_info_plus: ^8.0.0
screenshot: ^3.0.0 screenshot: ^3.0.0
flutter_staggered_grid_view: ^0.7.0 flutter_staggered_grid_view: ^0.7.0
# sqflite_common_ffi_web: ^0.4.0
image_crop_plus: ^1.0.0 image_crop_plus: ^1.0.0
googleapis: ^13.2.0 googleapis: ^13.2.0
google_sign_in: ^6.2.2 google_sign_in: ^6.2.1
extension_google_sign_in_as_googleapis_auth: ^2.0.12 extension_google_sign_in_as_googleapis_auth: ^2.0.12
maps_launcher: ^3.0.0+1 maps_launcher: ^3.0.0+1
google_fonts: ^6.2.1 google_fonts: ^6.1.0
get_it: ^7.7.0 # flutter_stripe: ^11.3.0
get_it: ^7.6.7
xml: ^6.5.0 xml: ^6.5.0
carousel_slider: ^5.0.0 carousel_slider: ^5.0.0
flutter_portal: ^1.1.4 flutter_portal: ^1.1.4
shake_flutter: ^17.1.0 shake_flutter: ^17.0.0
dev_dependencies: dev_dependencies:
flutter_lints: ^5.0.0 flutter_lints: ^5.0.0
flutter_launcher_icons: ^0.14.3 flutter_launcher_icons: ^0.14.2
flutter_native_splash: ^2.4.4 flutter_native_splash: "^2.3.10"
sqflite_common_ffi: ^2.3.4+4 sqflite_common_ffi: ^2.0.0+3
dependency_validator: ^5.0.2
flutter: flutter:
uses-material-design: true uses-material-design: true
@ -172,13 +185,13 @@ flutter:
flutter_launcher_icons: flutter_launcher_icons:
image_path: assets/icons/ic_android.png image_path: assets/icons/ic_android.png
android: true android: true
adaptive_icon_background: "#7CA021" adaptive_icon_background: "#03112D"
adaptive_icon_foreground: assets/icons/ic_launcher_foreground.png adaptive_icon_foreground: assets/icons/ic_android.png
ios: false ios: false
remove_alpha_ios: false remove_alpha_ios: false
flutter_native_splash: flutter_native_splash:
color: "#7CA021" color: "#03112D"
image: assets/icons/ic_splash.png image: assets/icons/ic_splash.png
android_12: android_12:
image: assets/icons/ic_splash.png image: assets/icons/ic_splash.png

View File

@ -91,7 +91,7 @@ class KretaClient {
headerMap.remove("authorization"); headerMap.remove("authorization");
print("DEBUG: 401 error, refreshing login"); print("DEBUG: 401 error, refreshing login");
print("DEBUG: 401 error, URL: $url"); print("DEBUG: 401 error, URL: $url");
//await refreshLogin(); // await refreshLogin();
} else { } else {
break; break;
} }
@ -160,7 +160,7 @@ class KretaClient {
res = await client.post(Uri.parse(url), headers: headerMap, body: body); res = await client.post(Uri.parse(url), headers: headerMap, body: body);
if (res.statusCode == 401) { if (res.statusCode == 401) {
//await refreshLogin(); // await refreshLogin();
headerMap.remove("authorization"); headerMap.remove("authorization");
} else { } else {
break; break;
@ -234,7 +234,7 @@ class KretaClient {
if (res.statusCode == 401) { if (res.statusCode == 401) {
headerMap.remove("authorization"); headerMap.remove("authorization");
//await refreshLogin(); // await refreshLogin();
} else { } else {
break; break;
} }
@ -277,13 +277,6 @@ class KretaClient {
print("REFRESH TOKEN BELOW"); print("REFRESH TOKEN BELOW");
print(refreshToken); print(refreshToken);
print(loginUser.accessTokenExpire);
print(DateTime.now().toIso8601String());
if (!DateTime.now().isAfter(loginUser.accessTokenExpire)) {
return 'success';
}
if (refreshToken != null) { if (refreshToken != null) {
// print("REFRESHING LOGIN"); // print("REFRESHING LOGIN");
Map? res = await postAPI(KretaAPI.login, Map? res = await postAPI(KretaAPI.login,

View File

@ -9,12 +9,12 @@ dependencies:
sdk: flutter sdk: flutter
refilc: refilc:
path: ../refilc/ path: ../refilc/
http: ^1.3.0 http: ^1.1.2
provider: ^6.1.2 provider: ^6.1.1
file_picker: ^8.3.7 file_picker: ^8.0.5
intl: ^0.19.0 intl: ^0.19.0
i18n_extension: ^12.0.1 i18n_extension: ^12.0.1
uuid: ^4.5.1 uuid: ^4.3.3
dev_dependencies: dev_dependencies:
flutter_lints: ^5.0.0 flutter_lints: ^5.0.0

View File

@ -1,8 +1,7 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class ActionButton extends StatelessWidget { class ActionButton extends StatelessWidget {
const ActionButton( const ActionButton({super.key, required this.label, this.activeColor, this.onTap});
{super.key, required this.label, this.activeColor, this.onTap});
final Color? activeColor; final Color? activeColor;
final void Function()? onTap; final void Function()? onTap;
@ -20,8 +19,7 @@ class ActionButton extends StatelessWidget {
curve: Curves.easeInOut, curve: Curves.easeInOut,
height: 32.0, height: 32.0,
decoration: BoxDecoration( decoration: BoxDecoration(
color: (activeColor ?? Theme.of(context).colorScheme.secondary) color: (activeColor ?? Theme.of(context).colorScheme.secondary).withOpacity(0.25),
.withValues(alpha: 0.25),
borderRadius: BorderRadius.circular(6.0), borderRadius: BorderRadius.circular(6.0),
), ),
padding: const EdgeInsets.symmetric(vertical: 6.0, horizontal: 12.0), padding: const EdgeInsets.symmetric(vertical: 6.0, horizontal: 12.0),
@ -30,11 +28,7 @@ class ActionButton extends StatelessWidget {
maxLines: 1, maxLines: 1,
softWrap: false, softWrap: false,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
style: TextStyle( style: TextStyle(fontSize: 15.0, fontWeight: FontWeight.w600, color: activeColor ?? Theme.of(context).colorScheme.secondary))),
fontSize: 15.0,
fontWeight: FontWeight.w600,
color: activeColor ??
Theme.of(context).colorScheme.secondary))),
), ),
), ),
); );

View File

@ -21,7 +21,7 @@ class AverageDisplay extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
Color color = average == 0.0 Color color = average == 0.0
? AppColors.of(context).text.withValues(alpha: .8) ? AppColors.of(context).text.withOpacity(.8)
: gradeColor(context: context, value: average); : gradeColor(context: context, value: average);
String averageText = average.toStringAsFixed(2); String averageText = average.toStringAsFixed(2);
@ -49,18 +49,16 @@ class AverageDisplay extends StatelessWidget {
borderRadius: borderRadius:
(border && dashed) ? null : BorderRadius.circular(45.0 * scale), (border && dashed) ? null : BorderRadius.circular(45.0 * scale),
border: border && !dashed border: border && !dashed
? Border.fromBorderSide(BorderSide( ? Border.fromBorderSide(
color: color.withValues(alpha: .5), width: 1.0 * scale)) BorderSide(color: color.withOpacity(.5), width: 1.0 * scale))
: null,
color: !border
? color.withValues(alpha: average == 0.0 ? .15 : .25)
: null, : null,
color: !border ? color.withOpacity(average == 0.0 ? .15 : .25) : null,
), ),
child: (border && dashed) child: (border && dashed)
? DottedBorder( ? DottedBorder(
strokeWidth: 1.0 * scale, strokeWidth: 1.0 * scale,
padding: EdgeInsets.all(4.0 * scale), padding: EdgeInsets.all(4.0 * scale),
color: color.withValues(alpha: .5), color: color.withOpacity(.5),
dashPattern: const [6, 6], dashPattern: const [6, 6],
radius: Radius.circular(45.0 * scale), radius: Radius.circular(45.0 * scale),
borderType: BorderType.RRect, borderType: BorderType.RRect,

View File

@ -25,7 +25,7 @@ class BottomCard extends StatelessWidget {
margin: const EdgeInsets.only(top: 12.0, bottom: 4.0), margin: const EdgeInsets.only(top: 12.0, bottom: 4.0),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(45.0), borderRadius: BorderRadius.circular(45.0),
color: AppColors.of(context).text.withValues(alpha: 0.10), color: AppColors.of(context).text.withOpacity(0.10),
), ),
), ),
if (child != null) child!, if (child != null) child!,

View File

@ -38,7 +38,7 @@ class RoundedBottomSheet extends StatelessWidget {
margin: const EdgeInsets.only(top: 12.0, bottom: 4.0), margin: const EdgeInsets.only(top: 12.0, bottom: 4.0),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(45.0), borderRadius: BorderRadius.circular(45.0),
color: AppColors.of(context).text.withValues(alpha: 0.10), color: AppColors.of(context).text.withOpacity(0.10),
), ),
), ),
if (child != null) child!, if (child != null) child!,

View File

@ -16,7 +16,7 @@ class BetaChip extends StatelessWidget {
decoration: BoxDecoration( decoration: BoxDecoration(
color: !disabled color: !disabled
? Theme.of(context).colorScheme.secondary ? Theme.of(context).colorScheme.secondary
: AppColors.of(context).text.withValues(alpha: .25), : AppColors.of(context).text.withOpacity(.25),
borderRadius: BorderRadius.circular(40), borderRadius: BorderRadius.circular(40),
), ),
child: Padding( child: Padding(
@ -28,7 +28,7 @@ class BetaChip extends StatelessWidget {
style: TextStyle( style: TextStyle(
fontSize: 10, fontSize: 10,
color: disabled color: disabled
? AppColors.of(context).text.withValues(alpha: .5) ? AppColors.of(context).text.withOpacity(.5)
: Colors.white, : Colors.white,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,

View File

@ -11,9 +11,8 @@ class NewChip extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: disabled color:
? AppColors.of(context).text.withValues(alpha: .25) disabled ? AppColors.of(context).text.withOpacity(.25) : Colors.red,
: Colors.red,
borderRadius: BorderRadius.circular(12.0), borderRadius: BorderRadius.circular(12.0),
), ),
padding: padding:
@ -24,7 +23,7 @@ class NewChip extends StatelessWidget {
Icon( Icon(
Icons.hotel_class_rounded, Icons.hotel_class_rounded,
color: disabled color: disabled
? AppColors.of(context).text.withValues(alpha: .5) ? AppColors.of(context).text.withOpacity(.5)
: Colors.white, : Colors.white,
size: 14.0, size: 14.0,
), ),
@ -33,7 +32,7 @@ class NewChip extends StatelessWidget {
'new'.i18n, 'new'.i18n,
style: TextStyle( style: TextStyle(
color: disabled color: disabled
? AppColors.of(context).text.withValues(alpha: .5) ? AppColors.of(context).text.withOpacity(.5)
: Colors.white, : Colors.white,
fontSize: 12.0, fontSize: 12.0,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,

View File

@ -24,7 +24,7 @@ SnackBar CustomSnackBar({
color: _backgroundColor, color: _backgroundColor,
borderRadius: BorderRadius.circular(6.0), borderRadius: BorderRadius.circular(6.0),
boxShadow: [ boxShadow: [
BoxShadow(color: Colors.black.withValues(alpha: .15), blurRadius: 4.0) BoxShadow(color: Colors.black.withOpacity(.15), blurRadius: 4.0)
], ],
), ),
padding: const EdgeInsets.all(12.0), padding: const EdgeInsets.all(12.0),

View File

@ -26,7 +26,7 @@ class Detail extends StatelessWidget {
text: description, text: description,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: AppColors.of(context).text.withValues(alpha: 0.85)), color: AppColors.of(context).text.withOpacity(0.85)),
), ),
], ],
), ),

View File

@ -34,7 +34,7 @@ class Empty extends StatelessWidget {
style: TextStyle( style: TextStyle(
fontSize: 32.0, fontSize: 32.0,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: AppColors.of(context).text.withValues(alpha: .75)), color: AppColors.of(context).text.withOpacity(.75)),
children: subtitle != null children: subtitle != null
? [ ? [
TextSpan( TextSpan(
@ -42,9 +42,7 @@ class Empty extends StatelessWidget {
style: TextStyle( style: TextStyle(
fontSize: 18.0, fontSize: 18.0,
height: 2.0, height: 2.0,
color: AppColors.of(context) color: AppColors.of(context).text.withOpacity(.5)))
.text
.withValues(alpha: .5)))
] ]
: [], : [],
), ),

View File

@ -56,12 +56,12 @@ class _FilterBarState extends State<FilterBar> {
), ),
labelPadding: const EdgeInsets.symmetric(horizontal: 12, vertical: 3), labelPadding: const EdgeInsets.symmetric(horizontal: 12, vertical: 3),
labelColor: Theme.of(context).colorScheme.secondary, labelColor: Theme.of(context).colorScheme.secondary,
unselectedLabelColor: AppColors.of(context).text.withValues(alpha: 0.65), unselectedLabelColor: AppColors.of(context).text.withOpacity(0.65),
// indicator // indicator
indicatorSize: TabBarIndicatorSize.tab, indicatorSize: TabBarIndicatorSize.tab,
indicatorPadding: const EdgeInsets.symmetric(vertical: 8.0), indicatorPadding: const EdgeInsets.symmetric(vertical: 8.0),
indicator: BoxDecoration( indicator: BoxDecoration(
color: Theme.of(context).colorScheme.tertiary.withValues(alpha: .2), color: Theme.of(context).colorScheme.tertiary.withOpacity(.2),
borderRadius: BorderRadius.circular(45.0), borderRadius: BorderRadius.circular(45.0),
), ),
overlayColor: WidgetStateProperty.all(const Color(0x00000000)), overlayColor: WidgetStateProperty.all(const Color(0x00000000)),
@ -77,7 +77,7 @@ class _FilterBarState extends State<FilterBar> {
width: e, width: e,
height: 15, height: 15,
decoration: BoxDecoration( decoration: BoxDecoration(
color: AppColors.of(context).text.withValues(alpha: .45), color: AppColors.of(context).text.withOpacity(.45),
borderRadius: BorderRadius.circular(8.0), borderRadius: BorderRadius.circular(8.0),
), ),
), ),

View File

@ -79,7 +79,7 @@ class HeroScrollViewState extends State<HeroScrollView> {
child: Row( child: Row(
children: [ children: [
Icon(widget.icon, Icon(widget.icon,
color: AppColors.of(context).text.withValues(alpha: .8)), color: AppColors.of(context).text.withOpacity(.8)),
const SizedBox(width: 8.0), const SizedBox(width: 8.0),
Expanded( Expanded(
child: Text( child: Text(
@ -123,7 +123,7 @@ class HeroScrollViewState extends State<HeroScrollView> {
Theme.of(context).colorScheme.secondary, Theme.of(context).colorScheme.secondary,
amount: 0.1, amount: 0.1,
) )
.withValues(alpha: 0.4), .withOpacity(0.4),
width: MediaQuery.of(context).size.width, width: MediaQuery.of(context).size.width,
fit: BoxFit.cover, fit: BoxFit.cover,
), ),
@ -135,10 +135,10 @@ class HeroScrollViewState extends State<HeroScrollView> {
Theme.of(context).scaffoldBackgroundColor, Theme.of(context).scaffoldBackgroundColor,
Theme.of(context) Theme.of(context)
.scaffoldBackgroundColor .scaffoldBackgroundColor
.withValues(alpha: 0.1), .withOpacity(0.1),
Theme.of(context) Theme.of(context)
.scaffoldBackgroundColor .scaffoldBackgroundColor
.withValues(alpha: 0.1), .withOpacity(0.1),
Theme.of(context).scaffoldBackgroundColor, Theme.of(context).scaffoldBackgroundColor,
], ],
stops: const [0.1, 0.5, 0.7, 0.98], stops: const [0.1, 0.5, 0.7, 0.98],
@ -164,7 +164,7 @@ class HeroScrollViewState extends State<HeroScrollView> {
Theme.of(context).colorScheme.secondary, Theme.of(context).colorScheme.secondary,
amount: 0.1, amount: 0.1,
) )
.withValues(alpha: 0.9), .withOpacity(0.9),
width: 1.5, width: 1.5,
padding: 12.0, padding: 12.0,
icon: Icon( icon: Icon(
@ -175,7 +175,7 @@ class HeroScrollViewState extends State<HeroScrollView> {
Theme.of(context).colorScheme.secondary, Theme.of(context).colorScheme.secondary,
amount: 0.1, amount: 0.1,
) )
.withValues(alpha: 0.8), .withOpacity(0.8),
), ),
), ),
), ),
@ -192,7 +192,7 @@ class HeroScrollViewState extends State<HeroScrollView> {
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
fontSize: 26.0, fontSize: 26.0,
color: AppColors.of(context).text.withValues(alpha: .8), color: AppColors.of(context).text.withOpacity(.8),
fontStyle: widget.italic ? FontStyle.italic : null, fontStyle: widget.italic ? FontStyle.italic : null,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),

View File

@ -19,8 +19,7 @@ class MaterialActionButton extends StatelessWidget {
return RawMaterialButton( return RawMaterialButton(
padding: const EdgeInsets.symmetric(horizontal: 16.0), padding: const EdgeInsets.symmetric(horizontal: 16.0),
shape: const StadiumBorder(), shape: const StadiumBorder(),
fillColor: fillColor: backgroundColor ?? AppColors.of(context).text.withOpacity(.15),
backgroundColor ?? AppColors.of(context).text.withValues(alpha: .15),
elevation: 0, elevation: 0,
highlightElevation: 0, highlightElevation: 0,
onPressed: onPressed, onPressed: onPressed,

View File

@ -24,8 +24,7 @@ class OutlinedRoundButton extends StatelessWidget {
decoration: BoxDecoration( decoration: BoxDecoration(
color: Theme.of(context).colorScheme.surface, color: Theme.of(context).colorScheme.surface,
border: Border.all( border: Border.all(
color: color: Theme.of(context).colorScheme.secondary.withOpacity(0.1),
Theme.of(context).colorScheme.secondary.withValues(alpha: 0.1),
width: 1.1, width: 1.1,
), ),
borderRadius: BorderRadius.circular(8.0), borderRadius: BorderRadius.circular(8.0),

View File

@ -67,7 +67,7 @@ class PanelTitle extends StatelessWidget {
child: DefaultTextStyle( child: DefaultTextStyle(
style: Theme.of(context).textTheme.titleMedium!.copyWith( style: Theme.of(context).textTheme.titleMedium!.copyWith(
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: AppColors.of(context).text.withValues(alpha: 0.65)), color: AppColors.of(context).text.withOpacity(0.65)),
child: title, child: title,
), ),
); );

View File

@ -23,28 +23,18 @@ class PanelActionButton extends StatelessWidget {
padding: padding, padding: padding,
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8.0), borderRadius: BorderRadius.circular(8.0),
side: BorderSide( side: BorderSide(color: Theme.of(context).colorScheme.secondary.withOpacity(.6), width: 2),
color:
Theme.of(context).colorScheme.secondary.withValues(alpha: .6),
width: 2),
), ),
child: ListTile( child: ListTile(
leading: leading != null leading: leading != null
? Theme( ? Theme(
data: Theme.of(context).copyWith( data: Theme.of(context).copyWith(iconTheme: IconThemeData(color: Theme.of(context).colorScheme.secondary)),
iconTheme: IconThemeData(
color: Theme.of(context).colorScheme.secondary)),
child: leading!, child: leading!,
) )
: null, : null,
trailing: trailing, trailing: trailing,
title: title != null title: title != null
? DefaultTextStyle( ? DefaultTextStyle(style: Theme.of(context).textTheme.titleMedium!.copyWith(fontWeight: FontWeight.w500, fontSize: 15.0), child: title!)
style: Theme.of(context)
.textTheme
.titleMedium!
.copyWith(fontWeight: FontWeight.w500, fontSize: 15.0),
child: title!)
: null, : null,
contentPadding: EdgeInsets.zero, contentPadding: EdgeInsets.zero,
visualDensity: VisualDensity.compact, visualDensity: VisualDensity.compact,

View File

@ -36,9 +36,8 @@ class PanelButton extends StatelessWidget {
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: borderRadius ?? BorderRadius.circular(12.0)), borderRadius: borderRadius ?? BorderRadius.circular(12.0)),
fillColor: background fillColor: background
? Colors.white.withValues( ? Colors.white.withOpacity(
alpha: Theme.of(context).brightness == Brightness.light ? .35 : .2)
Theme.of(context).brightness == Brightness.light ? .35 : .2)
: null, : null,
child: ListTile( child: ListTile(
leading: leading != null leading: leading != null
@ -58,7 +57,7 @@ class PanelButton extends StatelessWidget {
width: 2.0, width: 2.0,
height: 32.0, height: 32.0,
decoration: BoxDecoration( decoration: BoxDecoration(
color: AppColors.of(context).text.withValues(alpha: .15), color: AppColors.of(context).text.withOpacity(.15),
borderRadius: BorderRadius.circular(45.0), borderRadius: BorderRadius.circular(45.0),
), ),
), ),

View File

@ -44,7 +44,7 @@ class _EmptyCardState extends State<EmptyCard> {
if (Provider.of<SettingsProvider>(context, listen: false) if (Provider.of<SettingsProvider>(context, listen: false)
.shadowEffect) .shadowEffect)
BoxShadow( BoxShadow(
color: Colors.black.withValues(alpha: 0.08), color: Colors.black.withOpacity(0.08),
offset: const Offset(0, 5), offset: const Offset(0, 5),
blurRadius: 20, blurRadius: 20,
spreadRadius: 10, spreadRadius: 10,
@ -52,7 +52,7 @@ class _EmptyCardState extends State<EmptyCard> {
], ],
), ),
child: DottedBorder( child: DottedBorder(
color: Colors.black.withValues(alpha: 0.9), color: Colors.black.withOpacity(0.9),
dashPattern: const [12, 12], dashPattern: const [12, 12],
padding: padding:
const EdgeInsets.only(top: 20, bottom: 20, left: 20, right: 20), const EdgeInsets.only(top: 20, bottom: 20, left: 20, right: 20),
@ -60,7 +60,7 @@ class _EmptyCardState extends State<EmptyCard> {
child: Text( child: Text(
widget.text, widget.text,
style: TextStyle( style: TextStyle(
color: Colors.white.withValues(alpha: 0.9), color: Colors.white.withOpacity(0.9),
), ),
), ),
), ),

View File

@ -301,7 +301,7 @@ class _PersonalityCardState extends State<PersonalityCard> {
style: TextStyle( style: TextStyle(
fontSize: 16, fontSize: 16,
height: 1.2, height: 1.2,
color: Colors.white.withValues(alpha: 0.8), color: Colors.white.withOpacity(0.8),
), ),
), ),
const SizedBox(height: 25), const SizedBox(height: 25),
@ -354,7 +354,7 @@ class _PersonalityCardState extends State<PersonalityCard> {
borderRadius: const BorderRadius.all(Radius.circular(5)), borderRadius: const BorderRadius.all(Radius.circular(5)),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colors.black.withValues(alpha: 0.08), color: Colors.black.withOpacity(0.08),
offset: const Offset(0, 5), offset: const Offset(0, 5),
blurRadius: 20, blurRadius: 20,
spreadRadius: 10, spreadRadius: 10,
@ -362,7 +362,7 @@ class _PersonalityCardState extends State<PersonalityCard> {
], ],
), ),
child: DottedBorder( child: DottedBorder(
color: Colors.black.withValues(alpha: 0.9), color: Colors.black.withOpacity(0.9),
dashPattern: const [12, 12], dashPattern: const [12, 12],
padding: padding:
const EdgeInsets.only(top: 20, bottom: 20, left: 20, right: 20), const EdgeInsets.only(top: 20, bottom: 20, left: 20, right: 20),

View File

@ -91,10 +91,10 @@ class _ProfileImageState extends State<ProfileImage> {
clipBehavior: Clip.hardEdge, clipBehavior: Clip.hardEdge,
shape: const CircleBorder(), shape: const CircleBorder(),
color: widget.name != null && widget.name! == 'Rendszerüzenet' color: widget.name != null && widget.name! == 'Rendszerüzenet'
? widget.backgroundColor?.withValues(alpha: 0.8) ?? ? widget.backgroundColor?.withOpacity(0.8) ??
AppColors.of(context).text.withValues(alpha: 0.5) AppColors.of(context).text.withOpacity(0.5)
: widget.backgroundColor ?? : widget.backgroundColor ??
AppColors.of(context).text.withValues(alpha: .15), AppColors.of(context).text.withOpacity(.15),
child: InkWell( child: InkWell(
onTap: widget.onTap, onTap: widget.onTap,
onDoubleTap: widget.onDoubleTap, onDoubleTap: widget.onDoubleTap,
@ -114,7 +114,7 @@ class _ProfileImageState extends State<ProfileImage> {
width: 15, width: 15,
height: 15, height: 15,
decoration: BoxDecoration( decoration: BoxDecoration(
color: color.withValues(alpha: .5), color: color.withOpacity(.5),
borderRadius: BorderRadius.circular(8.0), borderRadius: BorderRadius.circular(8.0),
), ),
) )
@ -206,7 +206,7 @@ class _ProfileImageState extends State<ProfileImage> {
color: profilePicture != null color: profilePicture != null
? Colors.transparent ? Colors.transparent
: widget.backgroundColor ?? : widget.backgroundColor ??
AppColors.of(context).text.withValues(alpha: .15), AppColors.of(context).text.withOpacity(.15),
child: AnimatedContainer( child: AnimatedContainer(
duration: const Duration(milliseconds: 200), duration: const Duration(milliseconds: 200),
height: widget.radius * 2, height: widget.radius * 2,

View File

@ -2,10 +2,7 @@ import 'package:flutter/material.dart';
class ProgressBar extends StatelessWidget { class ProgressBar extends StatelessWidget {
const ProgressBar( const ProgressBar(
{super.key, {super.key, required this.value, this.backgroundColor, this.height = 8.0});
required this.value,
this.backgroundColor,
this.height = 8.0});
final double value; final double value;
final Color? backgroundColor; final Color? backgroundColor;
@ -19,8 +16,8 @@ class ProgressBar extends StatelessWidget {
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Theme.of(context).brightness == Brightness.light color: Theme.of(context).brightness == Brightness.light
? Colors.black.withValues(alpha: 0.1) ? Colors.black.withOpacity(0.1)
: Colors.white.withValues(alpha: 0.1), : Colors.white.withOpacity(0.1),
borderRadius: BorderRadius.circular(45.0), borderRadius: BorderRadius.circular(45.0),
), ),
width: double.infinity, width: double.infinity,

View File

@ -19,7 +19,7 @@ class RoundBorderIcon extends StatelessWidget {
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border.all( border: Border.all(
color: color ?? color: color ??
Theme.of(context).colorScheme.secondary.withValues(alpha: 0.25), Theme.of(context).colorScheme.secondary.withOpacity(0.25),
width: width), width: width),
borderRadius: BorderRadius.circular(50.0), borderRadius: BorderRadius.circular(50.0),
), ),

View File

@ -56,7 +56,7 @@ class SplittedPanel extends StatelessWidget {
color: Theme.of(context) color: Theme.of(context)
.colorScheme .colorScheme
.secondary .secondary
.withValues(alpha: .25), .withOpacity(.25),
width: 1.0) width: 1.0)
: null, : null,
), ),
@ -121,7 +121,7 @@ class SplittedPanelTitle extends StatelessWidget {
child: DefaultTextStyle( child: DefaultTextStyle(
style: Theme.of(context).textTheme.titleMedium!.copyWith( style: Theme.of(context).textTheme.titleMedium!.copyWith(
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: AppColors.of(context).text.withValues(alpha: 0.65)), color: AppColors.of(context).text.withOpacity(0.65)),
child: title, child: title,
), ),
); );

View File

@ -15,7 +15,7 @@ class AbsenceDisplay extends StatelessWidget {
padding: const EdgeInsets.only(top: 5.0), padding: const EdgeInsets.only(top: 5.0),
// padding: const EdgeInsets.symmetric(vertical: 4.0, horizontal: 6.0), // padding: const EdgeInsets.symmetric(vertical: 4.0, horizontal: 6.0),
// decoration: BoxDecoration( // decoration: BoxDecoration(
// color: Theme.of(context).scaffoldBackgroundColor.withValues(alpha: .2), // color: Theme.of(context).scaffoldBackgroundColor.withOpacity(.2),
// borderRadius: BorderRadius.circular(12.0), // borderRadius: BorderRadius.circular(12.0),
// ), // ),
child: Row(children: [ child: Row(children: [

View File

@ -81,7 +81,7 @@ class AbsenceSubjectTile extends StatelessWidget {
// fontFamily: "monospace", // fontFamily: "monospace",
color: color:
getColorByPercentage(percentage, context: context) getColorByPercentage(percentage, context: context)
.withValues(alpha: 0.8), .withOpacity(0.8),
fontSize: 16.0, fontSize: 16.0,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
), ),
@ -109,5 +109,5 @@ Color getColorByPercentage(double percentage, {required BuildContext context}) {
color = AppColors.of(context).yellow; color = AppColors.of(context).yellow;
} }
return color.withValues(alpha: .8); return color.withOpacity(.8);
} }

View File

@ -57,7 +57,7 @@ class AbsenceTile extends StatelessWidget {
width: 39, width: 39,
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.circle, shape: BoxShape.circle,
color: !group ? color.withValues(alpha: .25) : null, color: !group ? color.withOpacity(.25) : null,
), ),
child: Center( child: Center(
child: Icon(justificationIcon(absence.state), color: color)), child: Icon(justificationIcon(absence.state), color: color)),

Some files were not shown because too many files have changed in this diff Show More