Compare commits
125 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| dd787effbc | |||
|
|
7eac57b94d | ||
|
|
ee0ba71c8f | ||
|
|
ab64faeadb | ||
|
|
1460f2aa4e | ||
|
|
8925b3a5f8 | ||
|
|
eb0308cbed | ||
|
|
c90e01737c | ||
|
|
05c406657a | ||
|
|
fc402eef16 | ||
|
|
e9cfc7bbfc | ||
|
|
7e711d64e8 | ||
|
|
80008d8f00 | ||
|
|
81267d54e3 | ||
|
|
0dc921c603 | ||
|
|
4e23b745f3 | ||
|
|
ce91b47ad1 | ||
|
|
250ed2f105 | ||
|
|
4cde28cd72 | ||
|
|
df63c258b3 | ||
|
|
1b6992132e | ||
|
|
55350b0e5d | ||
|
|
8d532a442d | ||
|
|
cc4091e165 | ||
|
|
1f05f1d091 | ||
|
|
cc04293ead | ||
|
|
e1cae2f698 | ||
|
|
84a3e46ff7 | ||
|
|
a9360c6dc8 | ||
|
|
5d9c975b98 | ||
|
|
0b47155862 | ||
|
|
8662775e21 | ||
|
|
2ac948539c | ||
|
|
b93ea7193d | ||
|
|
b6b5c71cef | ||
|
|
0cf62aea86 | ||
|
|
f2f3366e2c | ||
|
|
4b7845c31e | ||
|
|
08519ebf27 | ||
|
|
894b3ac5b5 | ||
|
|
4135503a30 | ||
|
|
7f9bd34a82 | ||
|
|
64dfe4a814 | ||
|
|
6568e3c588 | ||
|
|
1109c08cf5 | ||
|
|
9cfbcc932b | ||
|
|
843224f348 | ||
|
|
b5ee1afe05 | ||
|
|
67649cc5fd | ||
|
|
ee0e724b8a | ||
|
|
d6e783f375 | ||
|
|
1e89359333 | ||
|
|
24f8804f60 | ||
|
|
300b951014 | ||
|
|
8b49007cca | ||
|
|
4101dc7c17 | ||
|
|
939cc6bbe2 | ||
|
|
13e00f8462 | ||
|
|
7d89ea0f5d | ||
|
|
fe4d7b318e | ||
|
|
0464624648 | ||
|
|
d09f3772a3 | ||
|
|
a7ff9e7825 | ||
|
|
bc3f8cfff9 | ||
|
|
063cc99d1a | ||
|
|
739e75160d | ||
|
|
889d0d6057 | ||
|
|
f5a7820991 | ||
|
|
580f93fa6f | ||
|
|
654c12e9fb | ||
|
|
7ab14756a6 | ||
|
|
0a02d4e831 | ||
|
|
ac3429f30f | ||
|
|
6388650c77 | ||
|
|
728534170c | ||
|
|
f4d840462e | ||
|
|
b08b127895 | ||
|
|
d41872e6e2 | ||
|
|
0602c2ea3f | ||
|
|
afcff10862 | ||
|
|
9e187fc04c | ||
|
|
7d5b97fe00 | ||
|
|
fd3b21b8e6 | ||
|
|
071f682f77 | ||
|
|
8723f75889 | ||
|
|
c9666f5333 | ||
|
|
a218b62742 | ||
|
|
41b1d899d0 | ||
|
|
ad18efd340 | ||
|
|
cf0dc50df5 | ||
|
|
994d3085bb | ||
|
|
6292708ba0 | ||
|
|
a26ca67892 | ||
|
|
f2d6b6079e | ||
|
|
4faee05823 | ||
|
|
864701fd1e | ||
|
|
80d50cd82b | ||
|
|
521f609707 | ||
|
|
96ff70d7d5 | ||
|
|
658bfe38a3 | ||
|
|
a74b2cd3d7 | ||
|
|
414755c777 | ||
|
|
3708b917c4 | ||
|
|
986b13de68 | ||
|
|
d391448870 | ||
|
|
38d9b5f3b2 | ||
|
|
2dafe5ed02 | ||
|
|
939761695f | ||
|
|
f1ba5230fc | ||
|
|
a50f449f7c | ||
|
|
fe3ed31830 | ||
|
|
0ec33f8631 | ||
|
|
6634010b97 | ||
|
|
816ddf58a2 | ||
|
|
d7741ca1c4 | ||
|
|
a2cbe5d90b | ||
|
|
7919d0e284 | ||
|
|
92fe3b7dcd | ||
|
|
63fd37c31f | ||
|
|
aa10f0672e | ||
|
|
a3694b59ec | ||
|
|
9ecee0bb01 | ||
|
|
b9e9bef182 | ||
|
|
51297ddc09 | ||
|
|
4d64705e59 |
9
.gitignore
vendored
@@ -12,10 +12,10 @@ refilc/build/
|
|||||||
refilc/android/key.properties
|
refilc/android/key.properties
|
||||||
refilc/android/debug.keystore
|
refilc/android/debug.keystore
|
||||||
|
|
||||||
refilc_desktop_ui/.flutter-plugins
|
# refilc_desktop_ui/.flutter-plugins
|
||||||
refilc_desktop_ui/.flutter-plugins-dependencies
|
# refilc_desktop_ui/.flutter-plugins-dependencies
|
||||||
refilc_desktop_ui/pubspec.lock
|
# refilc_desktop_ui/pubspec.lock
|
||||||
refilc_desktop_ui/.dart_tool/
|
# refilc_desktop_ui/.dart_tool/
|
||||||
|
|
||||||
refilc_kreta_api/.flutter-plugins
|
refilc_kreta_api/.flutter-plugins
|
||||||
refilc_kreta_api/.flutter-plugins-dependencies
|
refilc_kreta_api/.flutter-plugins-dependencies
|
||||||
@@ -37,6 +37,7 @@ refilc_mobile_ui/.dart_tool/
|
|||||||
.idea
|
.idea
|
||||||
.gitmodules
|
.gitmodules
|
||||||
.gradle
|
.gradle
|
||||||
|
.kotlin
|
||||||
|
|
||||||
refilc/.DS_Store
|
refilc/.DS_Store
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|||||||
2
.gitmodules
vendored
@@ -1,3 +1,3 @@
|
|||||||
[submodule "naplo-plus"]
|
[submodule "naplo-plus"]
|
||||||
path = refilc_plus
|
path = refilc_plus
|
||||||
url = git@github.com:refilc/naplo-plus.git
|
url = https://git.qwit.cloud/refilc/student-plus.git
|
||||||
|
|||||||
1286
.idea/libraries/Dart_Packages.xml
generated
41
.idea/libraries/Dart_SDK.xml
generated
@@ -1,25 +1,28 @@
|
|||||||
<component name="libraryTable">
|
<component name="libraryTable">
|
||||||
<library name="Dart SDK">
|
<library name="Dart SDK">
|
||||||
<CLASSES>
|
<CLASSES>
|
||||||
<root url="file:///opt/flutter/bin/cache/dart-sdk/lib/async" />
|
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/async" />
|
||||||
<root url="file:///opt/flutter/bin/cache/dart-sdk/lib/cli" />
|
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/cli" />
|
||||||
<root url="file:///opt/flutter/bin/cache/dart-sdk/lib/collection" />
|
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/collection" />
|
||||||
<root url="file:///opt/flutter/bin/cache/dart-sdk/lib/convert" />
|
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/concurrent" />
|
||||||
<root url="file:///opt/flutter/bin/cache/dart-sdk/lib/core" />
|
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/convert" />
|
||||||
<root url="file:///opt/flutter/bin/cache/dart-sdk/lib/developer" />
|
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/core" />
|
||||||
<root url="file:///opt/flutter/bin/cache/dart-sdk/lib/ffi" />
|
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/developer" />
|
||||||
<root url="file:///opt/flutter/bin/cache/dart-sdk/lib/html" />
|
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/ffi" />
|
||||||
<root url="file:///opt/flutter/bin/cache/dart-sdk/lib/indexed_db" />
|
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/html" />
|
||||||
<root url="file:///opt/flutter/bin/cache/dart-sdk/lib/io" />
|
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/indexed_db" />
|
||||||
<root url="file:///opt/flutter/bin/cache/dart-sdk/lib/isolate" />
|
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/io" />
|
||||||
<root url="file:///opt/flutter/bin/cache/dart-sdk/lib/js" />
|
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/isolate" />
|
||||||
<root url="file:///opt/flutter/bin/cache/dart-sdk/lib/js_util" />
|
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/js" />
|
||||||
<root url="file:///opt/flutter/bin/cache/dart-sdk/lib/math" />
|
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/js_interop" />
|
||||||
<root url="file:///opt/flutter/bin/cache/dart-sdk/lib/mirrors" />
|
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/js_interop_unsafe" />
|
||||||
<root url="file:///opt/flutter/bin/cache/dart-sdk/lib/svg" />
|
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/js_util" />
|
||||||
<root url="file:///opt/flutter/bin/cache/dart-sdk/lib/typed_data" />
|
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/math" />
|
||||||
<root url="file:///opt/flutter/bin/cache/dart-sdk/lib/web_audio" />
|
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/mirrors" />
|
||||||
<root url="file:///opt/flutter/bin/cache/dart-sdk/lib/web_gl" />
|
<root url="file://P:/flutter/bin/cache/dart-sdk/lib/svg" />
|
||||||
|
<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
@@ -1,4 +1,3 @@
|
|||||||
<?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
@@ -60,8 +60,21 @@
|
|||||||
<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
@@ -2,9 +2,6 @@
|
|||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="VcsDirectoryMappings">
|
<component name="VcsDirectoryMappings">
|
||||||
<mapping directory="" vcs="Git" />
|
<mapping directory="" vcs="Git" />
|
||||||
<mapping directory="$PROJECT_DIR$/filcnaplo_desktop_ui" vcs="Git" />
|
<mapping directory="$PROJECT_DIR$/refilc_plus" 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>
|
||||||
47
README.md
@@ -1,34 +1,43 @@
|
|||||||
<p align=center>
|
<p align=center>
|
||||||
<img src="https://refilc.hu/image/brand/logo.png" width=150>
|
<img src="https://raw.githubusercontent.com/Laky2k8/Refilc-2-Episode-1/refs/heads/master/refilc-2-real.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.
|
||||||
|
|
||||||
[](https://github.com/refilc/naplo/releases) [](https://dc.refilc.hu)
|
[](https://github.com/refilc/naplo/releases) [](https://discord.gg/refilc-1111649116020285532)
|
||||||
|
|
||||||
## Setup
|
## Környezet felállítása
|
||||||
|
|
||||||
### Clone the project
|
### Source code letöltése
|
||||||
|
|
||||||
<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>
|
*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)*
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
git clone --branch dev https://github.com/refilc/naplo --recursive
|
git clone https://git.qwit.cloud/refilc/student-legacy.git --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
|
### Csomagok telepítése
|
||||||
|
|
||||||
Run `fix-pub.sh`
|
Menj be minden mappába és futtasd a következő parancsokat:
|
||||||
|
```sh
|
||||||
|
flutter clean
|
||||||
|
flutter pub get
|
||||||
|
```
|
||||||
|
|
||||||
### Run the app
|
### Alkalmazás építése
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
cd refilc
|
cd refilc
|
||||||
flutter run (--release)
|
flutter build apk --release
|
||||||
```
|
```
|
||||||
|
|
||||||
|
*Ez egy apk fájlt fog építeni*
|
||||||
|
|
||||||
### Contribution
|
### Contribution
|
||||||
|
|
||||||
**Nézd meg a [Contribution guide](CONTRIBUTING.md)-ot!**
|
**Nézd meg a [Contribution guide](CONTRIBUTING.md)-ot!**
|
||||||
@@ -37,16 +46,22 @@ Az összes (ugyan azon verzióhoz tartozó) contribution meg fog jelenni a relea
|
|||||||
|
|
||||||
-------
|
-------
|
||||||
|
|
||||||
# Team
|
# Csapatunk
|
||||||
|
|
||||||
**kima:** head developer / project manager
|
**Management**
|
||||||
|
- Zypherift
|
||||||
|
- hayn
|
||||||
|
- Pearoo
|
||||||
|
- Zizi
|
||||||
|
- mnus
|
||||||
|
- xou
|
||||||
|
|
||||||
**Reiner, pdf, Pearoo, Zizi:** community- and project manager / developer
|
**Designerek**
|
||||||
|
- dwe
|
||||||
|
- xou
|
||||||
|
|
||||||
**vrolandd, TMarccci:** head developer
|
**vrolandd, TMarccci:** head developer
|
||||||
|
|
||||||
**dwe., xou:** designer
|
|
||||||
|
|
||||||
**Péter:** video editor
|
**Péter:** video editor
|
||||||
|
|
||||||
<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>
|
***annon:** a régi Filc Napló fejlesztője (ez az app, ha bár sokban változott, alapjaiban a Filc-re épül)*
|
||||||
|
|||||||
7
check-outdated.sh
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
cd refilc && flutter pub outdated && cd ..
|
||||||
|
cd refilc_kreta_api && flutter pub outdated && cd ..
|
||||||
|
cd refilc_mobile_ui && flutter pub outdated && cd ..
|
||||||
|
# cd refilc_desktop_ui && flutter pub upgrade && cd ..
|
||||||
|
cd refilc_plus && flutter pub outdated && cd ..
|
||||||
|
|
||||||
|
echo Outdated version list above.
|
||||||
7
major-upgrade-pub.sh
Executable file
@@ -0,0 +1,7 @@
|
|||||||
|
cd refilc && flutter pub upgrade --major-versions && cd ..
|
||||||
|
cd refilc_kreta_api && flutter pub upgrade --major-versions && cd ..
|
||||||
|
cd refilc_mobile_ui && flutter pub upgrade --major-versions && cd ..
|
||||||
|
# cd refilc_desktop_ui && flutter pub upgrade && cd ..
|
||||||
|
cd refilc_plus && flutter pub upgrade --major-versions && cd ..
|
||||||
|
|
||||||
|
echo "Upgraded pub (major)."
|
||||||
2
refilc/.gitignore
vendored
@@ -5,9 +5,11 @@
|
|||||||
*.swp
|
*.swp
|
||||||
.DS_Store
|
.DS_Store
|
||||||
.atom/
|
.atom/
|
||||||
|
.build/
|
||||||
.buildlog/
|
.buildlog/
|
||||||
.history
|
.history
|
||||||
.svn/
|
.svn/
|
||||||
|
.swiftpm/
|
||||||
migrate_working_dir/
|
migrate_working_dir/
|
||||||
|
|
||||||
# IntelliJ related
|
# IntelliJ related
|
||||||
|
|||||||
1
refilc/android/app/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
*.jks
|
||||||
@@ -39,8 +39,23 @@ 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 {
|
||||||
ndkVersion "25.1.8937393"
|
namespace = "hu.refilc.naplo"
|
||||||
|
|
||||||
|
ndkVersion "27.2.12479018"
|
||||||
|
|
||||||
// compileSdkVersion rootProject.ext.compileSdkVersion
|
// compileSdkVersion rootProject.ext.compileSdkVersion
|
||||||
compileSdkVersion 34
|
compileSdkVersion 34
|
||||||
@@ -67,11 +82,19 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
// Flag to enable support for the new language APIs
|
// Flag to enable support for the new language APIs
|
||||||
coreLibraryDesugaringEnabled true
|
coreLibraryDesugaringEnabled true
|
||||||
// Sets Java compatibility to Java 8
|
// Sets Java compatibility to Java 8
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
// sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
targetCompatibility JavaVersion.VERSION_1_8
|
// targetCompatibility JavaVersion.VERSION_1_8
|
||||||
|
// sourceCompatibility JavaVersion.VERSION_21
|
||||||
|
// targetCompatibility JavaVersion.VERSION_21
|
||||||
|
sourceCompatibility JavaVersion.VERSION_17
|
||||||
|
targetCompatibility JavaVersion.VERSION_17
|
||||||
|
}
|
||||||
|
|
||||||
|
kotlinOptions {
|
||||||
|
jvmTarget = JavaVersion.VERSION_17
|
||||||
}
|
}
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
@@ -97,7 +120,13 @@ android {
|
|||||||
|
|
||||||
release {
|
release {
|
||||||
signingConfig signingConfigs.release
|
signingConfig signingConfigs.release
|
||||||
shrinkResources false
|
shrinkResources true
|
||||||
|
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'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -117,7 +146,7 @@ dependencies {
|
|||||||
implementation 'joda-time:joda-time:2.9.4'
|
implementation 'joda-time:joda-time:2.9.4'
|
||||||
androidTestImplementation 'androidx.test:runner:1.1.1'
|
androidTestImplementation 'androidx.test:runner:1.1.1'
|
||||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
|
||||||
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
|
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.3'
|
||||||
implementation 'androidx.window:window:1.0.0'
|
implementation 'androidx.window:window:1.0.0'
|
||||||
implementation 'androidx.window:window-java:1.0.0'
|
implementation 'androidx.window:window-java:1.0.0'
|
||||||
}
|
}
|
||||||
|
|||||||
5
refilc/android/app/proguard-rules.pro
vendored
@@ -9,3 +9,8 @@
|
|||||||
-dontwarn com.stripe.android.pushProvisioning.PushProvisioningActivityStarter$Error
|
-dontwarn com.stripe.android.pushProvisioning.PushProvisioningActivityStarter$Error
|
||||||
-dontwarn com.stripe.android.pushProvisioning.PushProvisioningActivityStarter
|
-dontwarn com.stripe.android.pushProvisioning.PushProvisioningActivityStarter
|
||||||
-dontwarn com.stripe.android.pushProvisioning.PushProvisioningEphemeralKeyProvider
|
-dontwarn com.stripe.android.pushProvisioning.PushProvisioningEphemeralKeyProvider
|
||||||
|
|
||||||
|
-dontwarn org.joda.convert.FromString
|
||||||
|
-dontwarn org.joda.convert.ToString
|
||||||
|
|
||||||
|
#-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
|
||||||
@@ -2,9 +2,6 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools" package="hu.refilc.naplo">
|
xmlns:tools="http://schemas.android.com/tools" package="hu.refilc.naplo">
|
||||||
<application android:name="${applicationName}" android:label="reFilc" tools:replace="android:label" android:icon="@mipmap/ic_launcher"
|
<application android:name="${applicationName}" android:label="reFilc" tools:replace="android:label" android:icon="@mipmap/ic_launcher"
|
||||||
android:requestLegacyExternalStorage="true" android:enableOnBackInvokedCallback="false">
|
android:requestLegacyExternalStorage="true" android:enableOnBackInvokedCallback="false">
|
||||||
<service
|
|
||||||
android:name="com.solusibejo.flutter_dynamic_icon_plus.FlutterDynamicIconPlusService"
|
|
||||||
android:stopWithTask="false"/>
|
|
||||||
|
|
||||||
<activity android:exported="true" android:name="hu.refilc.naplo.MainActivity"
|
<activity android:exported="true" android:name="hu.refilc.naplo.MainActivity"
|
||||||
android:launchMode="singleTop" android:theme="@style/LaunchTheme"
|
android:launchMode="singleTop" android:theme="@style/LaunchTheme"
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 7.6 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 54 KiB |
|
Before Width: | Height: | Size: 114 KiB After Width: | Height: | Size: 84 KiB |
|
Before Width: | Height: | Size: 190 KiB After Width: | Height: | Size: 100 KiB |
|
Before Width: | Height: | Size: 69 B After Width: | Height: | Size: 69 B |
|
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 54 KiB |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 54 KiB |
|
Before Width: | Height: | Size: 114 KiB After Width: | Height: | Size: 84 KiB |
|
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 114 KiB After Width: | Height: | Size: 84 KiB |
|
Before Width: | Height: | Size: 190 KiB After Width: | Height: | Size: 100 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 190 KiB After Width: | Height: | Size: 100 KiB |
|
Before Width: | Height: | Size: 69 B After Width: | Height: | Size: 69 B |
@@ -1,5 +1,9 @@
|
|||||||
<?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 android:drawable="@drawable/ic_launcher_foreground"/>
|
<foreground>
|
||||||
|
<inset
|
||||||
|
android:drawable="@drawable/ic_launcher_foreground"
|
||||||
|
android:inset="16%" />
|
||||||
|
</foreground>
|
||||||
</adaptive-icon>
|
</adaptive-icon>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 642 B After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 9.1 KiB |
@@ -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">#03112D</item>
|
<item name="android:windowSplashScreenBackground">#7CA021</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.
|
||||||
|
|||||||
@@ -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">#03112D</item>
|
<item name="android:windowSplashScreenBackground">#7CA021</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.
|
||||||
|
|||||||
@@ -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">#03112D</color>
|
<color name="ic_launcher_background">#7CA021</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>
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
org.gradle.jvmargs=-Xmx1536M \
|
org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError
|
||||||
--add-exports=java.base/sun.nio.ch=ALL-UNNAMED \
|
|
||||||
--add-opens=java.base/java.lang=ALL-UNNAMED \
|
|
||||||
--add-opens=java.base/java.lang.reflect=ALL-UNNAMED \
|
|
||||||
--add-opens=java.base/java.io=ALL-UNNAMED \
|
|
||||||
--add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED
|
|
||||||
android.useAndroidX=true
|
android.useAndroidX=true
|
||||||
android.enableJetifier=true
|
android.enableJetifier=true
|
||||||
|
# kotlin.jvm.target.validation.mode=IGNORE
|
||||||
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
|
|||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https://services.gradle.org/distributions/gradle-7.3.3-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
|
||||||
|
|||||||
@@ -24,8 +24,8 @@ pluginManagement {
|
|||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
|
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
|
||||||
id "com.android.application" version "7.1.1" apply false
|
id "com.android.application" version "8.7.3" apply false
|
||||||
id "org.jetbrains.kotlin.android" version "1.8.21" apply false
|
id "org.jetbrains.kotlin.android" version "2.0.21" apply false
|
||||||
}
|
}
|
||||||
|
|
||||||
include ":app"
|
include ":app"
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 69 KiB |
|
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 87 KiB |
BIN
refilc/assets/images/apple_fire_emoji.png
Normal file
|
After Width: | Height: | Size: 21 KiB |
2
refilc/build.sh
Normal file → Executable file
@@ -1,3 +1,3 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
flutter build apk --release --dart-define=APPVER=$(cat pubspec.yaml | grep version: | cut -d' ' -f2 | cut -d+ -f1) --no-tree-shake-icons
|
flutter build apk --release --tree-shake-icons --split-debug-info=debug-info --split-per-abi --target-platform android-arm,android-arm64 --obfuscate
|
||||||
|
|||||||
@@ -43,4 +43,21 @@ post_install do |installer|
|
|||||||
config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
|
config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
bitcode_strip_path = `xcrun --find bitcode_strip`.chop!
|
||||||
|
def strip_bitcode_from_framework(bitcode_strip_path, framework_relative_path)
|
||||||
|
framework_path = File.join(Dir.pwd, framework_relative_path)
|
||||||
|
command = "#{bitcode_strip_path} #{framework_path} -r -o #{framework_path}"
|
||||||
|
puts "Stripping bitcode: #{command}"
|
||||||
|
system(command)
|
||||||
|
end
|
||||||
|
|
||||||
|
framework_paths = [
|
||||||
|
"Pods/Shake/Sources/Shake.xcframework/ios-arm64/Shake.framework/Shake",
|
||||||
|
"Pods/Shake/Sources/Shake.xcframework/ios-arm64_x86_64-simulator/Shake.framework/Shake"
|
||||||
|
]
|
||||||
|
|
||||||
|
framework_paths.each do |framework_relative_path|
|
||||||
|
strip_bitcode_from_framework(bitcode_strip_path, framework_relative_path)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -517,9 +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 = 257;
|
CURRENT_PROJECT_VERSION = 283;
|
||||||
DEVELOPMENT_TEAM = 4DKAF249F3;
|
DEVELOPMENT_TEAM = 4J97JVC2FG;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
|
FLUTTER_BUILD_NAME = 5.1.1;
|
||||||
|
FLUTTER_BUILD_NUMBER = 283;
|
||||||
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";
|
||||||
@@ -527,8 +529,8 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 5.0.0;
|
MARKETING_VERSION = 5.1.1;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.refilc2.naplo;
|
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";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
@@ -549,8 +551,8 @@
|
|||||||
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 = 257;
|
CURRENT_PROJECT_VERSION = 283;
|
||||||
DEVELOPMENT_TEAM = 4DKAF249F3;
|
DEVELOPMENT_TEAM = 4J97JVC2FG;
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
INFOPLIST_FILE = livecard/Info.plist;
|
INFOPLIST_FILE = livecard/Info.plist;
|
||||||
@@ -563,10 +565,10 @@
|
|||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
"@executable_path/../../Frameworks",
|
"@executable_path/../../Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 5.0.0;
|
MARKETING_VERSION = 5.1.1;
|
||||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||||
MTL_FAST_MATH = YES;
|
MTL_FAST_MATH = YES;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.refilc2.naplo.livecardpro;
|
PRODUCT_BUNDLE_IDENTIFIER = hu.qwit.refilc.livecard;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
SKIP_INSTALL = YES;
|
SKIP_INSTALL = YES;
|
||||||
@@ -591,8 +593,8 @@
|
|||||||
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 = 257;
|
CURRENT_PROJECT_VERSION = 283;
|
||||||
DEVELOPMENT_TEAM = 4DKAF249F3;
|
DEVELOPMENT_TEAM = 4J97JVC2FG;
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
INFOPLIST_FILE = livecard/Info.plist;
|
INFOPLIST_FILE = livecard/Info.plist;
|
||||||
@@ -605,9 +607,9 @@
|
|||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
"@executable_path/../../Frameworks",
|
"@executable_path/../../Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 5.0.0;
|
MARKETING_VERSION = 5.1.1;
|
||||||
MTL_FAST_MATH = YES;
|
MTL_FAST_MATH = YES;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.refilc2.naplo.livecardpro;
|
PRODUCT_BUNDLE_IDENTIFIER = hu.qwit.refilc.livecard;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
SKIP_INSTALL = YES;
|
SKIP_INSTALL = YES;
|
||||||
@@ -631,8 +633,8 @@
|
|||||||
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 = 257;
|
CURRENT_PROJECT_VERSION = 283;
|
||||||
DEVELOPMENT_TEAM = 4DKAF249F3;
|
DEVELOPMENT_TEAM = 4J97JVC2FG;
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
INFOPLIST_FILE = livecard/Info.plist;
|
INFOPLIST_FILE = livecard/Info.plist;
|
||||||
@@ -645,9 +647,9 @@
|
|||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
"@executable_path/../../Frameworks",
|
"@executable_path/../../Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 5.0.0;
|
MARKETING_VERSION = 5.1.1;
|
||||||
MTL_FAST_MATH = YES;
|
MTL_FAST_MATH = YES;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.refilc2.naplo.livecardpro;
|
PRODUCT_BUNDLE_IDENTIFIER = hu.qwit.refilc.livecard;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
SKIP_INSTALL = YES;
|
SKIP_INSTALL = YES;
|
||||||
@@ -775,9 +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 = 257;
|
CURRENT_PROJECT_VERSION = 283;
|
||||||
DEVELOPMENT_TEAM = 4DKAF249F3;
|
DEVELOPMENT_TEAM = 4J97JVC2FG;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
|
FLUTTER_BUILD_NAME = 5.1.1;
|
||||||
|
FLUTTER_BUILD_NUMBER = 283;
|
||||||
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";
|
||||||
@@ -785,8 +789,8 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 5.0.0;
|
MARKETING_VERSION = 5.1.1;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.refilc2.naplo;
|
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";
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
@@ -803,9 +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 = 257;
|
CURRENT_PROJECT_VERSION = 283;
|
||||||
DEVELOPMENT_TEAM = 4DKAF249F3;
|
DEVELOPMENT_TEAM = 4J97JVC2FG;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
|
FLUTTER_BUILD_NAME = 5.1.1;
|
||||||
|
FLUTTER_BUILD_NUMBER = 283;
|
||||||
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";
|
||||||
@@ -813,8 +819,8 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 5.0.0;
|
MARKETING_VERSION = 5.1.1;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.refilc2.naplo;
|
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";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
<key>livecard.xcscheme_^#shared#^_</key>
|
<key>livecard.xcscheme_^#shared#^_</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>orderHint</key>
|
<key>orderHint</key>
|
||||||
<integer>83</integer>
|
<integer>86</integer>
|
||||||
</dict>
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import background_fetch
|
|||||||
import ActivityKit
|
import ActivityKit
|
||||||
import Flutter
|
import Flutter
|
||||||
|
|
||||||
@UIApplicationMain
|
@main
|
||||||
@objc class AppDelegate: FlutterAppDelegate {
|
@objc class AppDelegate: FlutterAppDelegate {
|
||||||
private var methodChannel: FlutterMethodChannel?
|
private var methodChannel: FlutterMethodChannel?
|
||||||
|
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 69 B After Width: | Height: | Size: 69 B |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 54 KiB |
|
Before Width: | Height: | Size: 114 KiB After Width: | Height: | Size: 84 KiB |
@@ -38,7 +38,7 @@
|
|||||||
</scene>
|
</scene>
|
||||||
</scenes>
|
</scenes>
|
||||||
<resources>
|
<resources>
|
||||||
<image name="LaunchImage" width="1700" height="1700"/>
|
<image name="LaunchImage" width="2700" height="2700"/>
|
||||||
<image name="LaunchBackground" width="1" height="1"/>
|
<image name="LaunchBackground" width="1" height="1"/>
|
||||||
</resources>
|
</resources>
|
||||||
</document>
|
</document>
|
||||||
|
|||||||
@@ -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>refilc_concept</key>
|
<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>CFBundleIconFiles</key>
|
<key>refilc_concept</key>
|
||||||
<array>
|
<dict>
|
||||||
<string>refilc_concept</string>
|
<key>CFBundleIconFiles</key>
|
||||||
</array>
|
<array>
|
||||||
<key>UIPrerenderedIcon</key>
|
<string>refilc_concept</string>
|
||||||
<false/>
|
</array>
|
||||||
|
<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>refilc_default</key>
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
|
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||||
|
<key>CFBundleExecutable</key>
|
||||||
|
<string>$(EXECUTABLE_NAME)</string>
|
||||||
|
<key>CFBundleIcons</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>CFBundleIconFiles</key>
|
<key>CFBundlePrimaryIcon</key>
|
||||||
<array>
|
<dict>
|
||||||
<string>refilc_default</string>
|
<key>CFBundleIconFiles</key>
|
||||||
</array>
|
<array>
|
||||||
<key>UIPrerenderedIcon</key>
|
<string></string>
|
||||||
<false/>
|
</array>
|
||||||
</dict>
|
<key>CFBundleIconName</key>
|
||||||
<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>
|
|
||||||
<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>
|
<string></string>
|
||||||
</array>
|
<key>UIPrerenderedIcon</key>
|
||||||
<key>CFBundleIconName</key>
|
<false/>
|
||||||
<string></string>
|
</dict>
|
||||||
<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>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>
|
||||||
|
|||||||
@@ -1,40 +1,44 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import ActivityKit
|
|
||||||
|
|
||||||
public struct LessonData {
|
public struct LessonData {
|
||||||
var color: String
|
var color: String
|
||||||
var icon: String
|
var icon: String
|
||||||
var index: String
|
var index: String
|
||||||
var title: String
|
var title: String
|
||||||
var subtitle: String
|
var subtitle: String
|
||||||
var description: String
|
var description: String
|
||||||
var startDate: Date
|
var startDate: Date
|
||||||
var endDate: Date
|
var endDate: Date
|
||||||
var date: ClosedRange<Date>
|
var date: ClosedRange<Date>
|
||||||
var nextSubject: String
|
var nextSubject: String
|
||||||
var nextRoom: String
|
var nextRoom: String
|
||||||
|
|
||||||
init(from dictionary: [String: Any]) {
|
init(from dictionary: [String: Any]) {
|
||||||
self.color = dictionary["color"] as? String ?? ""
|
self.color = dictionary["color"] as? String ?? ""
|
||||||
self.icon = dictionary["icon"] as? String ?? ""
|
self.icon = dictionary["icon"] as? String ?? ""
|
||||||
self.index = dictionary["index"] as? String ?? ""
|
self.index = dictionary["index"] as? String ?? ""
|
||||||
self.title = dictionary["title"] as? String ?? ""
|
self.title = dictionary["title"] as? String ?? ""
|
||||||
self.subtitle = dictionary["subtitle"] as? String ?? ""
|
self.subtitle = dictionary["subtitle"] as? String ?? ""
|
||||||
self.description = dictionary["description"] as? String ?? ""
|
self.description = dictionary["description"] as? String ?? ""
|
||||||
self.nextSubject = dictionary["nextSubject"] as? String ?? ""
|
self.nextSubject = dictionary["nextSubject"] as? String ?? ""
|
||||||
self.nextRoom = dictionary["nextRoom"] as? String ?? ""
|
self.nextRoom = dictionary["nextRoom"] as? String ?? ""
|
||||||
|
|
||||||
if let startDateStr = dictionary["startDate"] as? String, let startDateInt = Int(startDateStr) {
|
if let startDateStr = dictionary["startDate"] as? String, let startDateInt = Int(startDateStr) {
|
||||||
self.startDate = Date(timeIntervalSince1970: TimeInterval(startDateInt) / 1000)
|
self.startDate = Date(timeIntervalSince1970: TimeInterval(startDateInt) / 1000)
|
||||||
} else {
|
} else {
|
||||||
self.startDate = Date()
|
self.startDate = Date()
|
||||||
}
|
|
||||||
|
|
||||||
if let endDateStr = dictionary["endDate"] as? String, let endDateInt = Int(endDateStr) {
|
|
||||||
self.endDate = Date(timeIntervalSince1970: TimeInterval(endDateInt) / 1000)
|
|
||||||
} else {
|
|
||||||
self.endDate = Date()
|
|
||||||
}
|
|
||||||
date = self.startDate...self.endDate
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if let endDateStr = dictionary["endDate"] as? String, let endDateInt = Int(endDateStr) {
|
||||||
|
self.endDate = Date(timeIntervalSince1970: TimeInterval(endDateInt) / 1000)
|
||||||
|
} else {
|
||||||
|
self.endDate = self.startDate
|
||||||
|
}
|
||||||
|
|
||||||
|
if self.startDate <= self.endDate {
|
||||||
|
self.date = self.startDate...self.endDate
|
||||||
|
} else {
|
||||||
|
self.date = self.endDate...self.endDate
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,17 @@ 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) {
|
||||||
@@ -62,21 +73,12 @@ 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)", limit: 25)
|
MultilineTextView(text: "\(context.state.index) \(context.state.title) - \(context.state.subtitle)", limit: 25)
|
||||||
.font(.body)
|
.font(.body)
|
||||||
.bold()
|
.bold()
|
||||||
.multilineTextAlignment(.center)
|
.multilineTextAlignment(.center)
|
||||||
}
|
}
|
||||||
|
|
||||||
//Terem
|
|
||||||
if (!context.state.subtitle.isEmpty) {
|
|
||||||
Text(context.state.subtitle)
|
|
||||||
.italic()
|
|
||||||
.bold()
|
|
||||||
.font(.system(size: 13))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Leírás
|
// Leírás
|
||||||
@@ -92,10 +94,9 @@ 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))
|
||||||
Text(context.state.nextSubject)
|
.foregroundStyle(.secondary)
|
||||||
|
Text("\(context.state.nextSubject) - \(context.state.nextRoom)")
|
||||||
.font(.caption)
|
.font(.caption)
|
||||||
Text(context.state.nextRoom)
|
|
||||||
.font(.caption2)
|
|
||||||
}
|
}
|
||||||
.multilineTextAlignment(.center)
|
.multilineTextAlignment(.center)
|
||||||
} else {
|
} else {
|
||||||
@@ -117,11 +118,15 @@ struct LockScreenLiveActivityView: View {
|
|||||||
.monospacedDigit()
|
.monospacedDigit()
|
||||||
.padding(.trailing)
|
.padding(.trailing)
|
||||||
}
|
}
|
||||||
|
// .activityBackgroundTint(
|
||||||
|
// context.state.color != "#676767"
|
||||||
|
// ? Color(hex: context.state.color)
|
||||||
|
// : Color.clear
|
||||||
|
// )
|
||||||
.activityBackgroundTint(
|
.activityBackgroundTint(
|
||||||
context.state.color != "#676767"
|
Color.clear
|
||||||
? Color(hex: context.state.color)
|
|
||||||
: Color.clear
|
|
||||||
)
|
)
|
||||||
|
.foregroundStyle(Color(hex: context.state.color))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -197,33 +202,23 @@ struct LiveCardWidget: Widget {
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
// Amikor óra van, expanded DynamicIsland
|
// Amikor óra van, expanded DynamicIsland
|
||||||
MultilineTextView(text: "\(context.state.index) \(context.state.title)", limit: 25)
|
MultilineTextView(text: "\(context.state.index) \(context.state.title) - \(context.state.subtitle)", limit: 25)
|
||||||
.lineLimit(1)
|
.lineLimit(1)
|
||||||
.font(.body)
|
.font(.body)
|
||||||
.bold()
|
.bold()
|
||||||
.padding(.trailing, -35)
|
.padding(.trailing, -35)
|
||||||
|
|
||||||
Text(context.state.subtitle)
|
Spacer(minLength: 2)
|
||||||
.lineLimit(1)
|
|
||||||
.italic()
|
|
||||||
.bold()
|
|
||||||
.font(.system(size: 13))
|
|
||||||
.padding(.trailing, -50)
|
|
||||||
|
|
||||||
Spacer(minLength: 5)
|
|
||||||
|
|
||||||
if(context.state.nextRoom != "" && context.state.nextSubject != "") {
|
if(context.state.nextRoom != "" && context.state.nextSubject != "") {
|
||||||
Text("Következő óra és terem:")
|
Text("Következő óra és terem:")
|
||||||
.font(.system(size: 14))
|
.font(.system(size: 14))
|
||||||
.padding(.trailing, -35)
|
.padding(.trailing, -45)
|
||||||
Spacer(minLength: 2)
|
Spacer(minLength: 2)
|
||||||
Text(context.state.nextSubject)
|
|
||||||
.modifier(DynamicFontSizeModifier(text: context.state.nextSubject))
|
Text("\(context.state.nextSubject) - \(context.state.nextRoom)")
|
||||||
.padding(.trailing, -35)
|
.modifier(DynamicFontSizeModifier(text: "\(context.state.nextSubject) - \(context.state.nextRoom)"))
|
||||||
Text(context.state.nextRoom)
|
.padding(.trailing, 35)
|
||||||
// ignore: based on nextSubject characters, I check that the font size of the room is the same as the next subject.
|
|
||||||
.modifier(DynamicFontSizeModifier(text: context.state.nextSubject))
|
|
||||||
.padding(.trailing, -35)
|
|
||||||
} else {
|
} else {
|
||||||
Text("Ez az utolsó óra! Kitartást!")
|
Text("Ez az utolsó óra! Kitartást!")
|
||||||
.font(.system(size: 14))
|
.font(.system(size: 14))
|
||||||
@@ -327,3 +322,66 @@ struct DynamicFontSizeModifier: ViewModifier {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct LiveCardWidget_Previews: PreviewProvider {
|
||||||
|
|
||||||
|
static let attributes = LiveActivitiesAppAttributes()
|
||||||
|
|
||||||
|
static let duringLessonExmaple = LiveActivitiesAppAttributes.ContentState(
|
||||||
|
color: "#FF5733",
|
||||||
|
icon: "bell",
|
||||||
|
index: "1.",
|
||||||
|
title: "Math Class",
|
||||||
|
subtitle: "101",
|
||||||
|
description: "Algebra lesson",
|
||||||
|
startDate: Date(),
|
||||||
|
endDate: Date().addingTimeInterval(3000),
|
||||||
|
date: Date()...Date().addingTimeInterval(3000), // 50 minutes later
|
||||||
|
nextSubject: "Physics",
|
||||||
|
nextRoom: "102"
|
||||||
|
)
|
||||||
|
|
||||||
|
static let inBreak = LiveActivitiesAppAttributes.ContentState(
|
||||||
|
color: "#FF5733",
|
||||||
|
icon: "house",
|
||||||
|
index: "",
|
||||||
|
title: "Szünet",
|
||||||
|
subtitle: "Menj a(z) 122 terembe.",
|
||||||
|
description: "",
|
||||||
|
startDate: Date(),
|
||||||
|
endDate: Date().addingTimeInterval(3000),
|
||||||
|
date: Date()...Date().addingTimeInterval(3000), // 50 minutes later
|
||||||
|
nextSubject: "Physics",
|
||||||
|
nextRoom: "122"
|
||||||
|
)
|
||||||
|
|
||||||
|
static let lastLesson = LiveActivitiesAppAttributes.ContentState(
|
||||||
|
color: "#00ff00",
|
||||||
|
icon: "bell",
|
||||||
|
index: "6.",
|
||||||
|
title: "Math Class",
|
||||||
|
subtitle: "",
|
||||||
|
description: "Lorem Ipsum",
|
||||||
|
startDate: Date(),
|
||||||
|
endDate: Date().addingTimeInterval(3000),
|
||||||
|
date: Date()...Date().addingTimeInterval(3000), // 50 minutes later
|
||||||
|
nextSubject: "",
|
||||||
|
nextRoom: ""
|
||||||
|
)
|
||||||
|
|
||||||
|
static var previews: some View {
|
||||||
|
// Dynamic Island Compact
|
||||||
|
Group {
|
||||||
|
attributes
|
||||||
|
.previewContext(duringLessonExmaple, viewKind: .dynamicIsland(.compact))
|
||||||
|
.previewDisplayName("During Lesson")
|
||||||
|
attributes
|
||||||
|
.previewContext(inBreak, viewKind: .dynamicIsland(.compact))
|
||||||
|
.previewDisplayName("In Break")
|
||||||
|
attributes
|
||||||
|
.previewContext(lastLesson, viewKind: .dynamicIsland(.compact))
|
||||||
|
.previewDisplayName("During Last Lesson")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
@@ -18,45 +18,51 @@ import 'package:connectivity_plus/connectivity_plus.dart';
|
|||||||
|
|
||||||
class FilcAPI {
|
class FilcAPI {
|
||||||
// API base
|
// API base
|
||||||
static const baseUrl = "https://api.refilc.hu";
|
static const baseUrl = "https://api.refilcapp.hu";
|
||||||
|
|
||||||
// Public API
|
// Public API
|
||||||
static const schoolList = "$baseUrl/v3/public/school-list";
|
static const schoolList = "https://api.refilcapp.hu/v3/public/school-list";
|
||||||
static const news = "$baseUrl/v3/public/news";
|
static const news = "https://staticrf-api.pages.dev/news/index.json";
|
||||||
static const supporters = "$baseUrl/v3/public/supporters";
|
static const supporters = "0.0.0.0";
|
||||||
|
|
||||||
// Private API
|
// Private API
|
||||||
static const ads = "$baseUrl/v3/private/ads";
|
static const ads = "0.0.0.0";
|
||||||
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 = "$baseUrl/v3/rf-plus";
|
static const rfPlus = "0.0.0.0";
|
||||||
static const plusAuthLogin = "$rfPlus/auth/login";
|
static const plusAuthLogin = "0.0.0.0";
|
||||||
static const plusAuthCallback = "$rfPlus/auth/callback";
|
static const plusAuthCallback = "0.0.0.0";
|
||||||
static const plusActivation = "$rfPlus/activate";
|
static const plusActivation = "0.0.0.0";
|
||||||
static const plusScopes = "$rfPlus/scopes";
|
static const plusScopes = "0.0.0.0/";
|
||||||
|
|
||||||
// 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 = "$baseUrl/v3/shared/theme/add";
|
static const themeShare = "https://api.refilcapp.hu/v3/shared/theme/add";
|
||||||
static const themeGet = "$baseUrl/v3/shared/theme/get";
|
static const themeGet = "https://api.refilcapp.hu/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 = "$baseUrl/v3/shared/grade-colors/add";
|
static const gradeColorsShare = "https://api.refilcapp.hu/v3/shared/grade-colors/add";
|
||||||
static const gradeColorsGet = "$baseUrl/v3/shared/grade-colors/get";
|
static const gradeColorsGet = "https://api.refilcapp.hu/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 = "$baseUrl/v3/payment";
|
static const payment = "0.0.0.0";
|
||||||
static const stripeSheet = "$payment/stripe-sheet";
|
static const stripeSheet = "0.0.0.0";
|
||||||
|
|
||||||
|
// Cloud Sync
|
||||||
|
// cloud sync? for what reason
|
||||||
|
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));
|
||||||
@@ -66,16 +72,6 @@ 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}";
|
||||||
@@ -93,10 +89,12 @@ class FilcAPI {
|
|||||||
"x-filc-id": settings.xFilcId,
|
"x-filc-id": settings.xFilcId,
|
||||||
"user-agent": userAgent,
|
"user-agent": userAgent,
|
||||||
// platform things
|
// platform things
|
||||||
"rf-platform": Platform.operatingSystem,
|
"rf-platform":
|
||||||
"rf-platform-version": Platform.operatingSystemVersion,
|
settings.analyticsEnabled ? Platform.operatingSystem : "unknown",
|
||||||
"rf-app-version":
|
"rf-platform-version": settings.analyticsEnabled
|
||||||
const String.fromEnvironment("APPVER", defaultValue: "?"),
|
? Platform.operatingSystemVersion
|
||||||
|
: "unknown",
|
||||||
|
"rf-app-version": const String.fromEnvironment("APPVER", defaultValue: "?"),
|
||||||
"rf-uinid": settings.xFilcId,
|
"rf-uinid": settings.xFilcId,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -127,7 +125,8 @@ 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) {
|
||||||
return (jsonDecode(res.body) as List)
|
String utf8Body = utf8.decode(res.bodyBytes);
|
||||||
|
return (jsonDecode(utf8Body) as List)
|
||||||
.cast<Map>()
|
.cast<Map>()
|
||||||
.map((e) => News.fromJson(e))
|
.map((e) => News.fromJson(e))
|
||||||
.toList();
|
.toList();
|
||||||
@@ -231,7 +230,7 @@ class FilcAPI {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// sharing
|
// sharing
|
||||||
static Future<void> addSharedTheme(SharedTheme theme) async {
|
static Future<int> addSharedTheme(SharedTheme theme) async {
|
||||||
try {
|
try {
|
||||||
theme.json.remove('json');
|
theme.json.remove('json');
|
||||||
theme.json['is_public'] = theme.isPublic.toString();
|
theme.json['is_public'] = theme.isPublic.toString();
|
||||||
@@ -263,13 +262,19 @@ class FilcAPI {
|
|||||||
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
|
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
|
||||||
);
|
);
|
||||||
|
|
||||||
if (res.statusCode != 201) {
|
// if (res.statusCode != 201) {
|
||||||
throw "HTTP ${res.statusCode}: ${res.body}";
|
// throw "HTTP ${res.statusCode}: ${res.body}";
|
||||||
|
// }
|
||||||
|
|
||||||
|
if (res.statusCode == 201) {
|
||||||
|
log('Shared theme successfully with ID: ${theme.id}');
|
||||||
}
|
}
|
||||||
|
|
||||||
log('Shared theme successfully with ID: ${theme.id}');
|
return res.statusCode;
|
||||||
} on Exception catch (error, stacktrace) {
|
} on Exception catch (error, stacktrace) {
|
||||||
log("ERROR: FilcAPI.addSharedTheme: $error $stacktrace");
|
log("ERROR: FilcAPI.addSharedTheme: $error $stacktrace");
|
||||||
|
|
||||||
|
return 696;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -303,8 +308,7 @@ class FilcAPI {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Future<void> addSharedGradeColors(
|
static Future<int> addSharedGradeColors(SharedGradeColors gradeColors) async {
|
||||||
SharedGradeColors gradeColors) async {
|
|
||||||
try {
|
try {
|
||||||
gradeColors.json.remove('json');
|
gradeColors.json.remove('json');
|
||||||
gradeColors.json['is_public'] = gradeColors.isPublic.toString();
|
gradeColors.json['is_public'] = gradeColors.isPublic.toString();
|
||||||
@@ -320,13 +324,19 @@ class FilcAPI {
|
|||||||
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
|
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
|
||||||
);
|
);
|
||||||
|
|
||||||
if (res.statusCode != 201) {
|
// if (res.statusCode != 201) {
|
||||||
throw "HTTP ${res.statusCode}: ${res.body}";
|
// throw "HTTP ${res.statusCode}: ${res.body}";
|
||||||
|
// }
|
||||||
|
|
||||||
|
if (res.statusCode == 201) {
|
||||||
|
log('Shared grade colors successfully with ID: ${gradeColors.id}');
|
||||||
}
|
}
|
||||||
|
|
||||||
log('Shared grade colors successfully with ID: ${gradeColors.id}');
|
return res.statusCode;
|
||||||
} on Exception catch (error, stacktrace) {
|
} on Exception catch (error, stacktrace) {
|
||||||
log("ERROR: FilcAPI.addSharedGradeColors: $error $stacktrace");
|
log("ERROR: FilcAPI.addSharedGradeColors: $error $stacktrace");
|
||||||
|
|
||||||
|
return 696;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -375,6 +385,11 @@ class FilcAPI {
|
|||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// cloud sync
|
||||||
|
static Future<Map?> cloudSync(Map<String, String> data, String token) async {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class ErrorReport {
|
class ErrorReport {
|
||||||
|
|||||||
@@ -65,8 +65,11 @@ Future loginAPI({
|
|||||||
parents: ['Teszt András', 'Teszt Linda'],
|
parents: ['Teszt András', 'Teszt Linda'],
|
||||||
json: {"a": "b"},
|
json: {"a": "b"},
|
||||||
address: '1117 Budapest, Gábor Dénes utca 4.',
|
address: '1117 Budapest, Gábor Dénes utca 4.',
|
||||||
|
gradeDelay: 0,
|
||||||
),
|
),
|
||||||
role: Role.parent,
|
role: Role.parent,
|
||||||
|
accessToken: '',
|
||||||
|
accessTokenExpire: DateTime.now(),
|
||||||
refreshToken: '',
|
refreshToken: '',
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -153,6 +156,8 @@ Future loginAPI({
|
|||||||
name: student.name,
|
name: student.name,
|
||||||
student: student,
|
student: student,
|
||||||
role: JwtUtils.getRoleFromJWT(res["access_token"])!,
|
role: JwtUtils.getRoleFromJWT(res["access_token"])!,
|
||||||
|
accessToken: res["access_token"],
|
||||||
|
accessTokenExpire: DateTime.now(),
|
||||||
refreshToken: '',
|
refreshToken: '',
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -234,6 +239,15 @@ Future newLoginAPI({
|
|||||||
if (res != null) {
|
if (res != null) {
|
||||||
if (kDebugMode) {
|
if (kDebugMode) {
|
||||||
print(res);
|
print(res);
|
||||||
|
|
||||||
|
// const splitSize = 1000;
|
||||||
|
// RegExp exp = RegExp(r"\w{" "$splitSize" "}");
|
||||||
|
// // String str = "0102031522";
|
||||||
|
// Iterable<Match> matches = exp.allMatches(res.toString());
|
||||||
|
// var list = matches.map((m) => m.group(0));
|
||||||
|
// list.forEach((e) {
|
||||||
|
// print(e);
|
||||||
|
// });
|
||||||
}
|
}
|
||||||
|
|
||||||
if (res.containsKey("error")) {
|
if (res.containsKey("error")) {
|
||||||
@@ -266,6 +280,9 @@ Future newLoginAPI({
|
|||||||
name: student.name,
|
name: student.name,
|
||||||
student: student,
|
student: student,
|
||||||
role: role,
|
role: role,
|
||||||
|
accessToken: res["access_token"],
|
||||||
|
accessTokenExpire:
|
||||||
|
DateTime.now().add(Duration(seconds: (res["expires_in"] - 30))),
|
||||||
refreshToken: res["refresh_token"],
|
refreshToken: res["refresh_token"],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ class AdProvider extends ChangeNotifier {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future<void> fetch() async {
|
Future<void> fetch() async {
|
||||||
_ads = await FilcAPI.getAds() ?? [];
|
_ads = [];
|
||||||
_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
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
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
|
||||||
@@ -15,11 +13,7 @@ class DatabaseProvider {
|
|||||||
Future<void> init() async {
|
Future<void> init() async {
|
||||||
Database db;
|
Database db;
|
||||||
|
|
||||||
if (Platform.isLinux || Platform.isWindows) {
|
db = await openDatabase("app.db");
|
||||||
db = await databaseFactoryFfi.openDatabase("app.db");
|
|
||||||
} else {
|
|
||||||
db = await openDatabase("app.db");
|
|
||||||
}
|
|
||||||
|
|
||||||
query = DatabaseQuery(db: db);
|
query = DatabaseQuery(db: db);
|
||||||
store = DatabaseStore(db: db);
|
store = DatabaseStore(db: db);
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ 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';
|
||||||
@@ -84,11 +85,14 @@ 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",
|
||||||
@@ -97,23 +101,22 @@ 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",
|
||||||
@@ -122,23 +125,22 @@ 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",
|
||||||
@@ -147,44 +149,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": "Terem: ${currentLesson?.room.replaceAll("_", " ") ?? ""}",
|
"subtitle":
|
||||||
|
"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("_", " ") ?? "",
|
||||||
};
|
};
|
||||||
@@ -199,24 +201,23 @@ 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": "",
|
||||||
@@ -243,8 +244,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;
|
||||||
}
|
}
|
||||||
@@ -253,9 +254,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) {
|
||||||
@@ -263,7 +264,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) {
|
||||||
@@ -328,7 +329,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());
|
||||||
@@ -362,7 +363,11 @@ class LiveCardProvider extends ChangeNotifier {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//END
|
//END
|
||||||
if ((currentState == LiveCardState.afternoon || currentState == LiveCardState.morning || currentState == LiveCardState.night) && hasActivityStarted && nextLesson != null &&
|
if ((currentState == LiveCardState.afternoon ||
|
||||||
|
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();
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:refilc/api/providers/database_provider.dart';
|
import 'package:refilc/api/providers/database_provider.dart';
|
||||||
import 'package:refilc/api/providers/status_provider.dart';
|
import 'package:refilc/api/providers/status_provider.dart';
|
||||||
import 'package:refilc/api/providers/user_provider.dart';
|
import 'package:refilc/api/providers/user_provider.dart';
|
||||||
@@ -28,7 +29,7 @@ import 'liveactivity/platform_channel.dart';
|
|||||||
// Mutex
|
// Mutex
|
||||||
bool lock = false;
|
bool lock = false;
|
||||||
|
|
||||||
Future<void> syncAll(BuildContext context) {
|
Future<void> syncAll(BuildContext context) async {
|
||||||
if (lock) return Future.value();
|
if (lock) return Future.value();
|
||||||
// Lock
|
// Lock
|
||||||
lock = true;
|
lock = true;
|
||||||
@@ -40,6 +41,12 @@ Future<void> syncAll(BuildContext context) {
|
|||||||
StatusProvider statusProvider =
|
StatusProvider statusProvider =
|
||||||
Provider.of<StatusProvider>(context, listen: false);
|
Provider.of<StatusProvider>(context, listen: false);
|
||||||
|
|
||||||
|
// check if access token isn't expired
|
||||||
|
// if (user.user?.accessToken == null) {
|
||||||
|
// lock = false;
|
||||||
|
// return Future.value();
|
||||||
|
// }
|
||||||
|
|
||||||
List<Future<void>> tasks = [];
|
List<Future<void>> tasks = [];
|
||||||
int taski = 0;
|
int taski = 0;
|
||||||
|
|
||||||
@@ -50,6 +57,49 @@ Future<void> syncAll(BuildContext context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tasks = [
|
tasks = [
|
||||||
|
// refresh login
|
||||||
|
syncStatus(() async {
|
||||||
|
// print(user.user?.accessTokenExpire);
|
||||||
|
// print('${user.user?.accessToken ?? "no token"} - ACCESS TOKEN');
|
||||||
|
|
||||||
|
// user.user!.accessToken = "";
|
||||||
|
if (user.user == null) {
|
||||||
|
Navigator.of(context).pushNamedAndRemoveUntil("login", (_) => false);
|
||||||
|
|
||||||
|
lock = false;
|
||||||
|
return Future.value();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (user.user!.accessToken.replaceAll(" ", "") == "") {
|
||||||
|
String uid = user.user!.id;
|
||||||
|
|
||||||
|
user.removeUser(uid);
|
||||||
|
await Provider.of<DatabaseProvider>(context, listen: false)
|
||||||
|
.store
|
||||||
|
.removeUser(uid);
|
||||||
|
|
||||||
|
Navigator.of(context).pushNamedAndRemoveUntil("login", (_) => false);
|
||||||
|
|
||||||
|
lock = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (user.user!.accessTokenExpire.isBefore(DateTime.now())) {
|
||||||
|
String authRes = await Provider.of<KretaClient>(context, listen: false)
|
||||||
|
.refreshLogin() ??
|
||||||
|
'';
|
||||||
|
if (authRes != 'success') {
|
||||||
|
if (kDebugMode) print('ERROR: failed to refresh login');
|
||||||
|
/ lock = false;
|
||||||
|
/ return Future.value();
|
||||||
|
/ } else {
|
||||||
|
/ if (kDebugMode) print('INFO: access token refreshed');
|
||||||
|
/ }
|
||||||
|
} else {
|
||||||
|
if (kDebugMode) print('INFO: access token is not expired');
|
||||||
|
}
|
||||||
|
}()),
|
||||||
|
|
||||||
syncStatus(Provider.of<GradeProvider>(context, listen: false).fetch()),
|
syncStatus(Provider.of<GradeProvider>(context, listen: false).fetch()),
|
||||||
syncStatus(Provider.of<TimetableProvider>(context, listen: false)
|
syncStatus(Provider.of<TimetableProvider>(context, listen: false)
|
||||||
.fetch(week: Week.current())),
|
.fetch(week: Week.current())),
|
||||||
@@ -71,6 +121,8 @@ Future<void> syncAll(BuildContext context) {
|
|||||||
if (studentJson == null) return;
|
if (studentJson == null) return;
|
||||||
Student student = Student.fromJson(studentJson);
|
Student student = Student.fromJson(studentJson);
|
||||||
|
|
||||||
|
// print(studentJson);
|
||||||
|
|
||||||
user.user?.name = student.name;
|
user.user?.name = student.name;
|
||||||
|
|
||||||
// Store user
|
// Store user
|
||||||
@@ -89,13 +141,11 @@ Future<void> syncAll(BuildContext context) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return Future.wait(tasks).then((value) {
|
return Future.wait(tasks).then((value) {
|
||||||
// Unlock
|
// Unlock
|
||||||
lock = false;
|
lock = false;
|
||||||
|
|
||||||
if(Platform.isIOS && LiveCardProvider.hasActivityStarted == true){
|
if (Platform.isIOS && LiveCardProvider.hasActivityStarted == true) {
|
||||||
PlatformChannel.endLiveActivity();
|
PlatformChannel.endLiveActivity();
|
||||||
LiveCardProvider.hasActivityStarted = false;
|
LiveCardProvider.hasActivityStarted = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,11 +39,11 @@ import 'package:refilc_mobile_ui/screens/settings/settings_route.dart'
|
|||||||
import 'package:refilc_mobile_ui/screens/settings/settings_screen.dart'
|
import 'package:refilc_mobile_ui/screens/settings/settings_screen.dart'
|
||||||
as mobile;
|
as mobile;
|
||||||
|
|
||||||
// Desktop UI
|
// Desktop UI (no more desktop ui)
|
||||||
import 'package:refilc_desktop_ui/screens/navigation/navigation_screen.dart'
|
// import 'package:refilc_desktop_ui/screens/navigation/navigation_screen.dart'
|
||||||
as desktop;
|
// as desktop;
|
||||||
import 'package:refilc_desktop_ui/screens/login/login_screen.dart' as desktop;
|
// import 'package:refilc_desktop_ui/screens/login/login_screen.dart' as desktop;
|
||||||
import 'package:refilc_desktop_ui/screens/login/login_route.dart' as desktop;
|
// import 'package:refilc_desktop_ui/screens/login/login_route.dart' as desktop;
|
||||||
|
|
||||||
// Providers
|
// Providers
|
||||||
import 'package:refilc/models/settings.dart';
|
import 'package:refilc/models/settings.dart';
|
||||||
@@ -237,7 +237,7 @@ class App extends StatelessWidget {
|
|||||||
},
|
},
|
||||||
onGenerateRoute: (settings) => rootNavigator(settings),
|
onGenerateRoute: (settings) => rootNavigator(settings),
|
||||||
initialRoute:
|
initialRoute:
|
||||||
user.getUsers().isNotEmpty ? "navigation" : "login",
|
(user.getUsers().isNotEmpty) ? "navigation" : "login",
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
@@ -248,17 +248,18 @@ class App extends StatelessWidget {
|
|||||||
|
|
||||||
Route? rootNavigator(RouteSettings route) {
|
Route? rootNavigator(RouteSettings route) {
|
||||||
if (kIsWeb) {
|
if (kIsWeb) {
|
||||||
switch (route.name) {
|
return null;
|
||||||
case "login_back":
|
// switch (route.name) {
|
||||||
return CupertinoPageRoute(
|
// case "login_back":
|
||||||
builder: (context) => const desktop.LoginScreen(back: true));
|
// return CupertinoPageRoute(
|
||||||
case "login":
|
// builder: (context) => const desktop.LoginScreen(back: true));
|
||||||
return _rootRoute(const desktop.LoginScreen());
|
// case "login":
|
||||||
case "navigation":
|
// return _rootRoute(const desktop.LoginScreen());
|
||||||
return _rootRoute(const desktop.NavigationScreen());
|
// case "navigation":
|
||||||
case "login_to_navigation":
|
// return _rootRoute(const desktop.NavigationScreen());
|
||||||
return desktop.loginRoute(const desktop.NavigationScreen());
|
// case "login_to_navigation":
|
||||||
}
|
// return desktop.loginRoute(const desktop.NavigationScreen());
|
||||||
|
// }
|
||||||
} else if (Platform.isAndroid || Platform.isIOS) {
|
} else if (Platform.isAndroid || Platform.isIOS) {
|
||||||
switch (route.name) {
|
switch (route.name) {
|
||||||
case "login_back":
|
case "login_back":
|
||||||
@@ -274,17 +275,18 @@ class App extends StatelessWidget {
|
|||||||
return mobile.settingsRoute(const mobile.SettingsScreen());
|
return mobile.settingsRoute(const mobile.SettingsScreen());
|
||||||
}
|
}
|
||||||
} else if (Platform.isWindows || Platform.isMacOS || Platform.isLinux) {
|
} else if (Platform.isWindows || Platform.isMacOS || Platform.isLinux) {
|
||||||
switch (route.name) {
|
return null;
|
||||||
case "login_back":
|
// switch (route.name) {
|
||||||
return CupertinoPageRoute(
|
// case "login_back":
|
||||||
builder: (context) => const desktop.LoginScreen(back: true));
|
// return CupertinoPageRoute(
|
||||||
case "login":
|
// builder: (context) => const desktop.LoginScreen(back: true));
|
||||||
return _rootRoute(const desktop.LoginScreen());
|
// case "login":
|
||||||
case "navigation":
|
// return _rootRoute(const desktop.LoginScreen());
|
||||||
return _rootRoute(const desktop.NavigationScreen());
|
// case "navigation":
|
||||||
case "login_to_navigation":
|
// return _rootRoute(const desktop.NavigationScreen());
|
||||||
return desktop.loginRoute(const desktop.NavigationScreen());
|
// case "login_to_navigation":
|
||||||
}
|
// return desktop.loginRoute(const desktop.NavigationScreen());
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import 'package:refilc/models/settings.dart';
|
|||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
// ignore: depend_on_referenced_packages
|
// ignore: depend_on_referenced_packages
|
||||||
import 'package:sqflite_common_ffi/sqflite_ffi.dart';
|
import 'package:sqflite_common_ffi/sqflite_ffi.dart';
|
||||||
import 'package:sqflite_common_ffi_web/sqflite_ffi_web.dart';
|
// import 'package:sqflite_common_ffi_web/sqflite_ffi_web.dart';
|
||||||
|
|
||||||
const settingsDB = DatabaseStruct("settings", {
|
const settingsDB = DatabaseStruct("settings", {
|
||||||
"language": String, "start_page": int, "rounding": int, "theme": int,
|
"language": String, "start_page": int, "rounding": int, "theme": int,
|
||||||
@@ -27,7 +27,8 @@ const settingsDB = DatabaseStruct("settings", {
|
|||||||
"notifications_absences": int,
|
"notifications_absences": int,
|
||||||
"notifications_messages": int,
|
"notifications_messages": int,
|
||||||
"notifications_lessons": int, // notifications
|
"notifications_lessons": int, // notifications
|
||||||
"x_filc_id": String, "graph_class_avg": int, "presentation_mode": int,
|
"x_filc_id": String, "graph_class_avg": int,
|
||||||
|
"analytics_enabled": int, "presentation_mode": int,
|
||||||
"bell_delay": int, "bell_delay_enabled": int,
|
"bell_delay": int, "bell_delay_enabled": int,
|
||||||
"grade_opening_fun": int, "icon_pack": String, "premium_scopes": String,
|
"grade_opening_fun": int, "icon_pack": String, "premium_scopes": String,
|
||||||
"premium_token": String, "premium_login": String,
|
"premium_token": String, "premium_login": String,
|
||||||
@@ -55,6 +56,9 @@ const settingsDB = DatabaseStruct("settings", {
|
|||||||
"uwu_mode": int,
|
"uwu_mode": int,
|
||||||
"new_popups": int,
|
"new_popups": int,
|
||||||
"unseen_new_features": String,
|
"unseen_new_features": String,
|
||||||
|
"cloud_sync_enabled": int,
|
||||||
|
"cloud_sync_token": String,
|
||||||
|
"local_updated_at": String,
|
||||||
// quick settings
|
// quick settings
|
||||||
"q_timetable_lesson_num": int, "q_timetable_sub_tiles": int,
|
"q_timetable_lesson_num": int, "q_timetable_sub_tiles": int,
|
||||||
"q_subjects_sub_tiles": int,
|
"q_subjects_sub_tiles": int,
|
||||||
@@ -66,6 +70,7 @@ const usersDB = DatabaseStruct("users", {
|
|||||||
"institute_code": String, "student": String, "role": int,
|
"institute_code": String, "student": String, "role": int,
|
||||||
"nickname": String, "picture": String, // premium only (it's now plus btw)
|
"nickname": String, "picture": String, // premium only (it's now plus btw)
|
||||||
"grade_streak": int,
|
"grade_streak": int,
|
||||||
|
"access_token": String, "access_token_expire": String,
|
||||||
"refresh_token": String,
|
"refresh_token": String,
|
||||||
});
|
});
|
||||||
const userDataDB = DatabaseStruct("user_data", {
|
const userDataDB = DatabaseStruct("user_data", {
|
||||||
@@ -105,7 +110,8 @@ Future<Database> initDB(DatabaseProvider database) async {
|
|||||||
Database db;
|
Database db;
|
||||||
|
|
||||||
if (kIsWeb) {
|
if (kIsWeb) {
|
||||||
db = await databaseFactoryFfiWeb.openDatabase("app.db");
|
// db = await databaseFactoryFfiWeb.openDatabase("app.db");
|
||||||
|
throw "web is not supported";
|
||||||
} else if (Platform.isLinux || Platform.isWindows) {
|
} else if (Platform.isLinux || Platform.isWindows) {
|
||||||
sqfliteFfiInit();
|
sqfliteFfiInit();
|
||||||
db = await databaseFactoryFfi.openDatabase("app.db");
|
db = await databaseFactoryFfi.openDatabase("app.db");
|
||||||
@@ -140,6 +146,8 @@ Future<Database> initDB(DatabaseProvider database) async {
|
|||||||
"nickname": "",
|
"nickname": "",
|
||||||
"picture": "",
|
"picture": "",
|
||||||
"grade_streak": 0,
|
"grade_streak": 0,
|
||||||
|
"access_token": "",
|
||||||
|
"access_token_expire": "",
|
||||||
"refresh_token": "",
|
"refresh_token": "",
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import 'package:flutter_svg/flutter_svg.dart';
|
|||||||
import 'package:refilc/api/providers/user_provider.dart';
|
import 'package:refilc/api/providers/user_provider.dart';
|
||||||
import 'package:refilc/api/providers/database_provider.dart';
|
import 'package:refilc/api/providers/database_provider.dart';
|
||||||
import 'package:refilc/database/init.dart';
|
import 'package:refilc/database/init.dart';
|
||||||
import 'package:refilc/helpers/notification_helper.dart';
|
// import 'package:refilc/helpers/notification_helper.dart';
|
||||||
import 'package:refilc/models/settings.dart';
|
import 'package:refilc/models/settings.dart';
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
@@ -104,7 +104,7 @@ class Startup {
|
|||||||
user = await database.query.getUsers(settings);
|
user = await database.query.getUsers(settings);
|
||||||
|
|
||||||
// Set all notification categories to seen to avoid having notifications that the user has already seen in the app
|
// Set all notification categories to seen to avoid having notifications that the user has already seen in the app
|
||||||
NotificationsHelper().setAllCategoriesSeen(user);
|
// NotificationsHelper().setAllCategoriesSeen(user);
|
||||||
|
|
||||||
late FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin;
|
late FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin;
|
||||||
// Notifications setup
|
// Notifications setup
|
||||||
@@ -146,30 +146,30 @@ class Startup {
|
|||||||
|
|
||||||
// Platform specific settings
|
// Platform specific settings
|
||||||
if (!kIsWeb) {
|
if (!kIsWeb) {
|
||||||
const DarwinInitializationSettings initializationSettingsDarwin =
|
// const DarwinInitializationSettings initializationSettingsDarwin =
|
||||||
DarwinInitializationSettings(
|
// DarwinInitializationSettings(
|
||||||
requestSoundPermission: true,
|
// requestSoundPermission: true,
|
||||||
requestBadgePermission: true,
|
// requestBadgePermission: true,
|
||||||
requestAlertPermission: false,
|
// requestAlertPermission: false,
|
||||||
);
|
// );
|
||||||
const AndroidInitializationSettings initializationSettingsAndroid =
|
// const AndroidInitializationSettings initializationSettingsAndroid =
|
||||||
AndroidInitializationSettings('ic_notification');
|
// AndroidInitializationSettings('ic_notification');
|
||||||
const LinuxInitializationSettings initializationSettingsLinux =
|
// const LinuxInitializationSettings initializationSettingsLinux =
|
||||||
LinuxInitializationSettings(defaultActionName: 'Open notification');
|
// LinuxInitializationSettings(defaultActionName: 'Open notification');
|
||||||
const InitializationSettings initializationSettings =
|
// const InitializationSettings initializationSettings =
|
||||||
InitializationSettings(
|
// InitializationSettings(
|
||||||
android: initializationSettingsAndroid,
|
// android: initializationSettingsAndroid,
|
||||||
iOS: initializationSettingsDarwin,
|
// iOS: initializationSettingsDarwin,
|
||||||
macOS: initializationSettingsDarwin,
|
// macOS: initializationSettingsDarwin,
|
||||||
linux: initializationSettingsLinux,
|
// linux: initializationSettingsLinux,
|
||||||
);
|
// );
|
||||||
|
|
||||||
// Initialize notifications
|
// Initialize notifications
|
||||||
await flutterLocalNotificationsPlugin.initialize(
|
// await flutterLocalNotificationsPlugin.initialize(
|
||||||
initializationSettings,
|
// initializationSettings,
|
||||||
onDidReceiveNotificationResponse:
|
// onDidReceiveNotificationResponse:
|
||||||
NotificationsHelper().onDidReceiveNotificationResponse,
|
// NotificationsHelper().onDidReceiveNotificationResponse,
|
||||||
);
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (Platform.isAndroid || Platform.isIOS) {
|
// if (Platform.isAndroid || Platform.isIOS) {
|
||||||
@@ -214,7 +214,7 @@ Widget errorBuilder(FlutterErrorDetails details) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return Container();
|
return Container();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -239,7 +239,7 @@ Future<void> initPlatformState() async {
|
|||||||
if (!Platform.isIOS) return;
|
if (!Platform.isIOS) return;
|
||||||
LiveActivityHelper().backgroundJob();
|
LiveActivityHelper().backgroundJob();
|
||||||
} else {
|
} else {
|
||||||
NotificationsHelper().backgroundJob();
|
// NotificationsHelper().backgroundJob();
|
||||||
}
|
}
|
||||||
BackgroundFetch.finish(taskId);
|
BackgroundFetch.finish(taskId);
|
||||||
}, (String taskId) async {
|
}, (String taskId) async {
|
||||||
@@ -279,7 +279,7 @@ void backgroundHeadlessTask(HeadlessTask task) {
|
|||||||
if (!Platform.isIOS) return;
|
if (!Platform.isIOS) return;
|
||||||
LiveActivityHelper().backgroundJob();
|
LiveActivityHelper().backgroundJob();
|
||||||
} else {
|
} else {
|
||||||
NotificationsHelper().backgroundJob();
|
// NotificationsHelper().backgroundJob();
|
||||||
}
|
}
|
||||||
BackgroundFetch.finish(task.taskId);
|
BackgroundFetch.finish(task.taskId);
|
||||||
}
|
}
|
||||||
|
|||||||
22
refilc/lib/models/cloud_sync_data.dart
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
class CloudSyncData {
|
||||||
|
Map settings;
|
||||||
|
List<String> deviceIds;
|
||||||
|
String reFilcPlusId;
|
||||||
|
Map json;
|
||||||
|
|
||||||
|
CloudSyncData({
|
||||||
|
this.settings = const {},
|
||||||
|
this.deviceIds = const [],
|
||||||
|
this.reFilcPlusId = "",
|
||||||
|
required this.json,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory CloudSyncData.fromJson(Map json) {
|
||||||
|
return CloudSyncData(
|
||||||
|
settings: json['settings'] ?? {},
|
||||||
|
deviceIds: List<String>.from(json['device_ids'] ?? []),
|
||||||
|
reFilcPlusId: json['refilc_plus_id'] ?? "",
|
||||||
|
json: json,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -7,6 +7,8 @@ class News {
|
|||||||
String platform;
|
String platform;
|
||||||
bool emergency;
|
bool emergency;
|
||||||
DateTime expireDate;
|
DateTime expireDate;
|
||||||
|
List<String>? appVersions;
|
||||||
|
String? specificAppId;
|
||||||
Map? json;
|
Map? json;
|
||||||
|
|
||||||
News({
|
News({
|
||||||
@@ -18,6 +20,8 @@ class News {
|
|||||||
required this.platform,
|
required this.platform,
|
||||||
required this.emergency,
|
required this.emergency,
|
||||||
required this.expireDate,
|
required this.expireDate,
|
||||||
|
this.appVersions,
|
||||||
|
this.specificAppId,
|
||||||
this.json,
|
this.json,
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -31,6 +35,10 @@ class News {
|
|||||||
platform: json["platform"] ?? "",
|
platform: json["platform"] ?? "",
|
||||||
emergency: json["emergency"] ?? false,
|
emergency: json["emergency"] ?? false,
|
||||||
expireDate: DateTime.parse(json["expire_date"] ?? ''),
|
expireDate: DateTime.parse(json["expire_date"] ?? ''),
|
||||||
|
appVersions: json["app_versions"] != null
|
||||||
|
? List<String>.from(json["app_versions"])
|
||||||
|
: null,
|
||||||
|
specificAppId: json["specific_app_id"],
|
||||||
json: json,
|
json: json,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,6 +60,7 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
UpdateChannel _updateChannel;
|
UpdateChannel _updateChannel;
|
||||||
Config _config;
|
Config _config;
|
||||||
String _xFilcId;
|
String _xFilcId;
|
||||||
|
bool _analyticsEnabled;
|
||||||
bool _graphClassAvg;
|
bool _graphClassAvg;
|
||||||
bool _goodStudent;
|
bool _goodStudent;
|
||||||
bool _presentationMode;
|
bool _presentationMode;
|
||||||
@@ -108,6 +109,9 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
bool _uwuMode;
|
bool _uwuMode;
|
||||||
bool _newPopups;
|
bool _newPopups;
|
||||||
List<String> _unseenNewFeatures;
|
List<String> _unseenNewFeatures;
|
||||||
|
bool _cloudSyncEnabled;
|
||||||
|
String _cloudSyncToken;
|
||||||
|
DateTime _updatedAt;
|
||||||
// quick settings
|
// quick settings
|
||||||
bool _qTimetableLessonNum;
|
bool _qTimetableLessonNum;
|
||||||
bool _qTimetableSubTiles;
|
bool _qTimetableSubTiles;
|
||||||
@@ -137,6 +141,7 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
required UpdateChannel updateChannel,
|
required UpdateChannel updateChannel,
|
||||||
required Config config,
|
required Config config,
|
||||||
required String xFilcId,
|
required String xFilcId,
|
||||||
|
required bool analyticsEnabled,
|
||||||
required bool graphClassAvg,
|
required bool graphClassAvg,
|
||||||
required bool goodStudent,
|
required bool goodStudent,
|
||||||
required bool presentationMode,
|
required bool presentationMode,
|
||||||
@@ -182,6 +187,9 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
required bool uwuMode,
|
required bool uwuMode,
|
||||||
required bool newPopups,
|
required bool newPopups,
|
||||||
required List<String> unseenNewFeatures,
|
required List<String> unseenNewFeatures,
|
||||||
|
required bool cloudSyncEnabled,
|
||||||
|
required String cloudSyncToken,
|
||||||
|
required DateTime updatedAt,
|
||||||
required bool qTimetableLessonNum,
|
required bool qTimetableLessonNum,
|
||||||
required bool qTimetableSubTiles,
|
required bool qTimetableSubTiles,
|
||||||
required bool qSubjectsSubTiles,
|
required bool qSubjectsSubTiles,
|
||||||
@@ -208,6 +216,7 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
_updateChannel = updateChannel,
|
_updateChannel = updateChannel,
|
||||||
_config = config,
|
_config = config,
|
||||||
_xFilcId = xFilcId,
|
_xFilcId = xFilcId,
|
||||||
|
_analyticsEnabled = analyticsEnabled,
|
||||||
_graphClassAvg = graphClassAvg,
|
_graphClassAvg = graphClassAvg,
|
||||||
_goodStudent = goodStudent,
|
_goodStudent = goodStudent,
|
||||||
_presentationMode = presentationMode,
|
_presentationMode = presentationMode,
|
||||||
@@ -253,6 +262,9 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
_uwuMode = uwuMode,
|
_uwuMode = uwuMode,
|
||||||
_newPopups = newPopups,
|
_newPopups = newPopups,
|
||||||
_unseenNewFeatures = unseenNewFeatures,
|
_unseenNewFeatures = unseenNewFeatures,
|
||||||
|
_cloudSyncEnabled = cloudSyncEnabled,
|
||||||
|
_cloudSyncToken = cloudSyncToken,
|
||||||
|
_updatedAt = updatedAt,
|
||||||
_qTimetableLessonNum = qTimetableLessonNum,
|
_qTimetableLessonNum = qTimetableLessonNum,
|
||||||
_qTimetableSubTiles = qTimetableSubTiles,
|
_qTimetableSubTiles = qTimetableSubTiles,
|
||||||
_qSubjectsSubTiles = qSubjectsSubTiles;
|
_qSubjectsSubTiles = qSubjectsSubTiles;
|
||||||
@@ -297,6 +309,7 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
updateChannel: UpdateChannel.values[map["update_channel"]],
|
updateChannel: UpdateChannel.values[map["update_channel"]],
|
||||||
config: Config.fromJson(configMap ?? {}),
|
config: Config.fromJson(configMap ?? {}),
|
||||||
xFilcId: map["x_filc_id"],
|
xFilcId: map["x_filc_id"],
|
||||||
|
analyticsEnabled: map["analytics_enabled"] == 1,
|
||||||
graphClassAvg: map["graph_class_avg"] == 1,
|
graphClassAvg: map["graph_class_avg"] == 1,
|
||||||
goodStudent: false,
|
goodStudent: false,
|
||||||
presentationMode: map["presentation_mode"] == 1,
|
presentationMode: map["presentation_mode"] == 1,
|
||||||
@@ -343,6 +356,9 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
uwuMode: map['uwu_mode'] == 1,
|
uwuMode: map['uwu_mode'] == 1,
|
||||||
newPopups: map['new_popups'] == 1,
|
newPopups: map['new_popups'] == 1,
|
||||||
unseenNewFeatures: jsonDecode(map["unseen_new_features"]).cast<String>(),
|
unseenNewFeatures: jsonDecode(map["unseen_new_features"]).cast<String>(),
|
||||||
|
cloudSyncEnabled: map['cloud_sync_enabled'] == 1,
|
||||||
|
cloudSyncToken: map['cloud_sync_token'],
|
||||||
|
updatedAt: DateTime.tryParse(map['local_updated_at']) ?? DateTime.now(),
|
||||||
qTimetableLessonNum: map['q_timetable_lesson_num'] == 1,
|
qTimetableLessonNum: map['q_timetable_lesson_num'] == 1,
|
||||||
qTimetableSubTiles: map['q_timetable_sub_tiles'] == 1,
|
qTimetableSubTiles: map['q_timetable_sub_tiles'] == 1,
|
||||||
qSubjectsSubTiles: map['q_subjects_sub_tiles'] == 1,
|
qSubjectsSubTiles: map['q_subjects_sub_tiles'] == 1,
|
||||||
@@ -377,6 +393,7 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
"notification_poll_interval": _notificationPollInterval,
|
"notification_poll_interval": _notificationPollInterval,
|
||||||
"config": jsonEncode(config.json),
|
"config": jsonEncode(config.json),
|
||||||
"x_filc_id": _xFilcId,
|
"x_filc_id": _xFilcId,
|
||||||
|
"analytics_enabled": _analyticsEnabled ? 1 : 0,
|
||||||
"graph_class_avg": _graphClassAvg ? 1 : 0,
|
"graph_class_avg": _graphClassAvg ? 1 : 0,
|
||||||
"presentation_mode": _presentationMode ? 1 : 0,
|
"presentation_mode": _presentationMode ? 1 : 0,
|
||||||
"bell_delay_enabled": _bellDelayEnabled ? 1 : 0,
|
"bell_delay_enabled": _bellDelayEnabled ? 1 : 0,
|
||||||
@@ -421,6 +438,9 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
"uwu_mode": _uwuMode ? 1 : 0,
|
"uwu_mode": _uwuMode ? 1 : 0,
|
||||||
"new_popups": _newPopups ? 1 : 0,
|
"new_popups": _newPopups ? 1 : 0,
|
||||||
"unseen_new_features": jsonEncode(_unseenNewFeatures),
|
"unseen_new_features": jsonEncode(_unseenNewFeatures),
|
||||||
|
"cloud_sync_enabled": _cloudSyncEnabled ? 1 : 0,
|
||||||
|
"cloud_sync_token": _cloudSyncToken,
|
||||||
|
"local_updated_at": _updatedAt.toIso8601String(),
|
||||||
"q_timetable_lesson_num": _qTimetableLessonNum ? 1 : 0,
|
"q_timetable_lesson_num": _qTimetableLessonNum ? 1 : 0,
|
||||||
"q_timetable_sub_tiles": _qTimetableSubTiles ? 1 : 0,
|
"q_timetable_sub_tiles": _qTimetableSubTiles ? 1 : 0,
|
||||||
"q_subjects_sub_tiles": _qSubjectsSubTiles ? 1 : 0,
|
"q_subjects_sub_tiles": _qSubjectsSubTiles ? 1 : 0,
|
||||||
@@ -450,7 +470,7 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
notificationsMessagesEnabled: true,
|
notificationsMessagesEnabled: true,
|
||||||
notificationsLessonsEnabled: true,
|
notificationsLessonsEnabled: true,
|
||||||
notificationsBitfield: 255,
|
notificationsBitfield: 255,
|
||||||
developerMode: false,
|
developerMode: true,
|
||||||
notificationPollInterval: 1,
|
notificationPollInterval: 1,
|
||||||
vibrate: VibrationStrength.medium,
|
vibrate: VibrationStrength.medium,
|
||||||
abWeeks: false,
|
abWeeks: false,
|
||||||
@@ -458,6 +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,
|
||||||
graphClassAvg: false,
|
graphClassAvg: false,
|
||||||
goodStudent: false,
|
goodStudent: false,
|
||||||
presentationMode: false,
|
presentationMode: false,
|
||||||
@@ -479,13 +500,13 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
renameSubjectsItalics: false,
|
renameSubjectsItalics: false,
|
||||||
renameTeachersEnabled: false,
|
renameTeachersEnabled: false,
|
||||||
renameTeachersItalics: false,
|
renameTeachersItalics: false,
|
||||||
liveActivityColor: const Color(0xFF676767),
|
liveActivityColor: const Color(0x00000000),
|
||||||
welcomeMessage: '',
|
welcomeMessage: '',
|
||||||
appIcon: 'refilc_default',
|
appIcon: 'refilc_default',
|
||||||
currentThemeId: '',
|
currentThemeId: '',
|
||||||
currentThemeDisplayName: '',
|
currentThemeDisplayName: '',
|
||||||
currentThemeCreator: 'reFilc',
|
currentThemeCreator: 'reFilc',
|
||||||
showBreaks: true,
|
showBreaks: false,
|
||||||
pinSetGeneral: '',
|
pinSetGeneral: '',
|
||||||
pinSetPersonalize: '',
|
pinSetPersonalize: '',
|
||||||
pinSetNotify: '',
|
pinSetNotify: '',
|
||||||
@@ -503,6 +524,9 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
uwuMode: false,
|
uwuMode: false,
|
||||||
newPopups: true,
|
newPopups: true,
|
||||||
unseenNewFeatures: ['grade_exporting'],
|
unseenNewFeatures: ['grade_exporting'],
|
||||||
|
cloudSyncEnabled: false,
|
||||||
|
cloudSyncToken: '',
|
||||||
|
updatedAt: DateTime.now(),
|
||||||
qTimetableLessonNum: true,
|
qTimetableLessonNum: true,
|
||||||
qTimetableSubTiles: true,
|
qTimetableSubTiles: true,
|
||||||
qSubjectsSubTiles: true,
|
qSubjectsSubTiles: true,
|
||||||
@@ -532,6 +556,7 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
UpdateChannel get updateChannel => _updateChannel;
|
UpdateChannel get updateChannel => _updateChannel;
|
||||||
Config get config => _config;
|
Config get config => _config;
|
||||||
String get xFilcId => _xFilcId;
|
String get xFilcId => _xFilcId;
|
||||||
|
bool get analyticsEnabled => _analyticsEnabled;
|
||||||
bool get graphClassAvg => _graphClassAvg;
|
bool get graphClassAvg => _graphClassAvg;
|
||||||
bool get goodStudent => _goodStudent;
|
bool get goodStudent => _goodStudent;
|
||||||
bool get presentationMode => _presentationMode;
|
bool get presentationMode => _presentationMode;
|
||||||
@@ -576,6 +601,9 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
bool get uwuMode => _uwuMode;
|
bool get uwuMode => _uwuMode;
|
||||||
bool get newPopups => _newPopups;
|
bool get newPopups => _newPopups;
|
||||||
List<String> get unseenNewFeatures => _unseenNewFeatures;
|
List<String> get unseenNewFeatures => _unseenNewFeatures;
|
||||||
|
bool get cloudSyncEnabled => _cloudSyncEnabled;
|
||||||
|
String get cloudSyncToken => _cloudSyncToken;
|
||||||
|
DateTime get updatedAt => _updatedAt;
|
||||||
bool get qTimetableLessonNum => _qTimetableLessonNum;
|
bool get qTimetableLessonNum => _qTimetableLessonNum;
|
||||||
bool get qTimetableSubTiles => _qTimetableSubTiles;
|
bool get qTimetableSubTiles => _qTimetableSubTiles;
|
||||||
bool get qSubjectsSubTiles => _qSubjectsSubTiles;
|
bool get qSubjectsSubTiles => _qSubjectsSubTiles;
|
||||||
@@ -590,6 +618,7 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
List<Color>? gradeColors,
|
List<Color>? gradeColors,
|
||||||
bool? newsEnabled,
|
bool? newsEnabled,
|
||||||
String? seenNewsId,
|
String? seenNewsId,
|
||||||
|
String? seenNews, // only for restoring from map
|
||||||
bool? notificationsEnabled,
|
bool? notificationsEnabled,
|
||||||
bool? notificationsGradesEnabled,
|
bool? notificationsGradesEnabled,
|
||||||
bool? notificationsAbsencesEnabled,
|
bool? notificationsAbsencesEnabled,
|
||||||
@@ -604,6 +633,7 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
UpdateChannel? updateChannel,
|
UpdateChannel? updateChannel,
|
||||||
Config? config,
|
Config? config,
|
||||||
String? xFilcId,
|
String? xFilcId,
|
||||||
|
bool? analyticsEnabled,
|
||||||
bool? graphClassAvg,
|
bool? graphClassAvg,
|
||||||
bool? goodStudent,
|
bool? goodStudent,
|
||||||
bool? presentationMode,
|
bool? presentationMode,
|
||||||
@@ -645,6 +675,8 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
bool? uwuMode,
|
bool? uwuMode,
|
||||||
bool? newPopups,
|
bool? newPopups,
|
||||||
List<String>? unseenNewFeatures,
|
List<String>? unseenNewFeatures,
|
||||||
|
bool? cloudSyncEnabled,
|
||||||
|
String? cloudSyncToken,
|
||||||
bool? qTimetableLessonNum,
|
bool? qTimetableLessonNum,
|
||||||
bool? qTimetableSubTiles,
|
bool? qTimetableSubTiles,
|
||||||
bool? qSubjectsSubTiles,
|
bool? qSubjectsSubTiles,
|
||||||
@@ -667,6 +699,7 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
tempList.add(seenNewsId);
|
tempList.add(seenNewsId);
|
||||||
_seenNews = tempList.join(',');
|
_seenNews = tempList.join(',');
|
||||||
}
|
}
|
||||||
|
if (seenNews != null && seenNews != _seenNews) _seenNews = seenNews;
|
||||||
if (notificationsEnabled != null &&
|
if (notificationsEnabled != null &&
|
||||||
notificationsEnabled != _notificationsEnabled) {
|
notificationsEnabled != _notificationsEnabled) {
|
||||||
_notificationsEnabled = notificationsEnabled;
|
_notificationsEnabled = notificationsEnabled;
|
||||||
@@ -708,6 +741,9 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
}
|
}
|
||||||
if (config != null && config != _config) _config = config;
|
if (config != null && config != _config) _config = config;
|
||||||
if (xFilcId != null && xFilcId != _xFilcId) _xFilcId = xFilcId;
|
if (xFilcId != null && xFilcId != _xFilcId) _xFilcId = xFilcId;
|
||||||
|
if (analyticsEnabled != null && analyticsEnabled != _analyticsEnabled) {
|
||||||
|
_analyticsEnabled = analyticsEnabled;
|
||||||
|
}
|
||||||
if (graphClassAvg != null && graphClassAvg != _graphClassAvg) {
|
if (graphClassAvg != null && graphClassAvg != _graphClassAvg) {
|
||||||
_graphClassAvg = graphClassAvg;
|
_graphClassAvg = graphClassAvg;
|
||||||
}
|
}
|
||||||
@@ -839,6 +875,12 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
if (unseenNewFeatures != null && unseenNewFeatures != _unseenNewFeatures) {
|
if (unseenNewFeatures != null && unseenNewFeatures != _unseenNewFeatures) {
|
||||||
_unseenNewFeatures = unseenNewFeatures;
|
_unseenNewFeatures = unseenNewFeatures;
|
||||||
}
|
}
|
||||||
|
if (cloudSyncEnabled != null && cloudSyncEnabled != _cloudSyncEnabled) {
|
||||||
|
_cloudSyncEnabled = cloudSyncEnabled;
|
||||||
|
}
|
||||||
|
if (cloudSyncToken != null && cloudSyncToken != _cloudSyncToken) {
|
||||||
|
_cloudSyncToken = cloudSyncToken;
|
||||||
|
}
|
||||||
if (qTimetableLessonNum != null &&
|
if (qTimetableLessonNum != null &&
|
||||||
qTimetableLessonNum != _qTimetableLessonNum) {
|
qTimetableLessonNum != _qTimetableLessonNum) {
|
||||||
_qTimetableLessonNum = qTimetableLessonNum;
|
_qTimetableLessonNum = qTimetableLessonNum;
|
||||||
@@ -850,11 +892,115 @@ class SettingsProvider extends ChangeNotifier {
|
|||||||
if (qSubjectsSubTiles != null && qSubjectsSubTiles != _qSubjectsSubTiles) {
|
if (qSubjectsSubTiles != null && qSubjectsSubTiles != _qSubjectsSubTiles) {
|
||||||
_qSubjectsSubTiles = qSubjectsSubTiles;
|
_qSubjectsSubTiles = qSubjectsSubTiles;
|
||||||
}
|
}
|
||||||
|
// change updated at time
|
||||||
|
_updatedAt = DateTime.now();
|
||||||
// store or not
|
// store or not
|
||||||
if (store) await _database?.store.storeSettings(this);
|
if (store) await _database?.store.storeSettings(this);
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<void> updateFromMap({
|
||||||
|
required Map<dynamic, dynamic> map,
|
||||||
|
bool store = true,
|
||||||
|
}) async {
|
||||||
|
print(map);
|
||||||
|
|
||||||
|
await update(
|
||||||
|
store: store,
|
||||||
|
language: map["language"],
|
||||||
|
startPage: Pages.values[map["start_page"] ?? _startPage.index],
|
||||||
|
rounding: map["rounding"],
|
||||||
|
theme: ThemeMode.values[map["theme"] ?? _theme.index],
|
||||||
|
accentColor:
|
||||||
|
AccentColor.values[map["accent_color"] ?? _accentColor.index],
|
||||||
|
gradeColors: [
|
||||||
|
Color(map["grade_color1"] ?? _gradeColors[0].value),
|
||||||
|
Color(map["grade_color2"] ?? _gradeColors[1].value),
|
||||||
|
Color(map["grade_color3"] ?? _gradeColors[2].value),
|
||||||
|
Color(map["grade_color4"] ?? _gradeColors[3].value),
|
||||||
|
Color(map["grade_color5"] ?? _gradeColors[4].value),
|
||||||
|
],
|
||||||
|
newsEnabled: map["news"] == 1,
|
||||||
|
seenNews: map["seen_news"],
|
||||||
|
notificationsEnabled: map["notifications"] == 1,
|
||||||
|
notificationsGradesEnabled: map["notifications_grades"] == 1,
|
||||||
|
notificationsAbsencesEnabled: map["notifications_absences"] == 1,
|
||||||
|
notificationsMessagesEnabled: map["notifications_messages"] == 1,
|
||||||
|
notificationsLessonsEnabled: map["notifications_lessons"] == 1,
|
||||||
|
notificationsBitfield: map["notifications_bitfield"],
|
||||||
|
notificationPollInterval: map["notification_poll_interval"],
|
||||||
|
developerMode: map["developer_mode"] == 1,
|
||||||
|
vibrate:
|
||||||
|
VibrationStrength.values[map["vibration_strength"] ?? _vibrate.index],
|
||||||
|
abWeeks: map["ab_weeks"] == 1,
|
||||||
|
swapABweeks: map["swap_ab_weeks"] == 1,
|
||||||
|
updateChannel:
|
||||||
|
UpdateChannel.values[map["update_channel"] ?? _updateChannel.index],
|
||||||
|
config: Config.fromJson(jsonDecode(map["config"] ?? "{}")),
|
||||||
|
xFilcId: map["x_filc_id"],
|
||||||
|
analyticsEnabled: map["analytics_enabled"] == 1,
|
||||||
|
graphClassAvg: map["graph_class_avg"] == 1,
|
||||||
|
goodStudent: false,
|
||||||
|
presentationMode: map["presentation_mode"] == 1,
|
||||||
|
bellDelayEnabled: map["bell_delay_enabled"] == 1,
|
||||||
|
bellDelay: map["bell_delay"],
|
||||||
|
gradeOpeningFun: map["grade_opening_fun"] == 1,
|
||||||
|
iconPack: Map.fromEntries(
|
||||||
|
IconPack.values.map((e) => MapEntry(e.name, e)))[map["icon_pack"]]!,
|
||||||
|
customAccentColor:
|
||||||
|
Color(map["custom_accent_color"] ?? _customAccentColor.value),
|
||||||
|
customBackgroundColor:
|
||||||
|
Color(map["custom_background_color"] ?? _customBackgroundColor.value),
|
||||||
|
customHighlightColor:
|
||||||
|
Color(map["custom_highlight_color"] ?? _customHighlightColor.value),
|
||||||
|
customIconColor:
|
||||||
|
Color(map["custom_icon_color"] ?? _customIconColor.value),
|
||||||
|
customTextColor:
|
||||||
|
Color(map["custom_text_color"] ?? _customTextColor.value),
|
||||||
|
shadowEffect: map["shadow_effect"] == 1,
|
||||||
|
premiumScopes:
|
||||||
|
jsonDecode(map["premium_scopes"] ?? _premiumScopes).cast<String>(),
|
||||||
|
premiumAccessToken: map["premium_token"],
|
||||||
|
premiumLogin: map["premium_login"],
|
||||||
|
lastAccountId: map["last_account_id"],
|
||||||
|
renamedSubjectsEnabled: map["renamed_subjects_enabled"] == 1,
|
||||||
|
renamedSubjectsItalics: map["renamed_subjects_italics"] == 1,
|
||||||
|
renamedTeachersEnabled: map["renamed_teachers_enabled"] == 1,
|
||||||
|
renamedTeachersItalics: map["renamed_teachers_italics"] == 1,
|
||||||
|
liveActivityColor:
|
||||||
|
Color(map["live_activity_color"] ?? _liveActivityColor),
|
||||||
|
welcomeMessage: map["welcome_message"],
|
||||||
|
appIcon: map["app_icon"],
|
||||||
|
currentThemeId: map['current_theme_id'],
|
||||||
|
currentThemeDisplayName: map['current_theme_display_name'],
|
||||||
|
currentThemeCreator: map['current_theme_creator'],
|
||||||
|
showBreaks: map['show_breaks'] == 1,
|
||||||
|
// pinSetGeneral: map['general_s_pin'],
|
||||||
|
// pinSetPersonalize: map['personalize_s_pin'],
|
||||||
|
// pinSetNotify: map['notify_s_pin'],
|
||||||
|
// pinSetExtras: map['extras_s_pin'],
|
||||||
|
fontFamily: map['font_family'],
|
||||||
|
titleOnlyFont: map['title_only_font'] == 1,
|
||||||
|
plusSessionId: map['plus_session_id'],
|
||||||
|
calSyncRoomLocation: map['cal_sync_room_location'],
|
||||||
|
calSyncShowExams: map['cal_sync_show_exams'] == 1,
|
||||||
|
calSyncShowTeacher: map['cal_sync_show_teacher'] == 1,
|
||||||
|
calSyncRenamed: map['cal_sync_renamed'] == 1,
|
||||||
|
calendarId: map['calendar_id'],
|
||||||
|
navShadow: map['nav_shadow'] == 1,
|
||||||
|
newColors: map['new_colors'] == 1,
|
||||||
|
uwuMode: map['uwu_mode'] == 1,
|
||||||
|
newPopups: map['new_popups'] == 1,
|
||||||
|
unseenNewFeatures:
|
||||||
|
jsonDecode(map["unseen_new_features"] ?? "[]").cast<String>(),
|
||||||
|
cloudSyncEnabled: map['cloud_sync_enabled'] == 1,
|
||||||
|
cloudSyncToken: map['cloud_sync_token'],
|
||||||
|
qTimetableLessonNum: map['q_timetable_lesson_num'] == 1,
|
||||||
|
qTimetableSubTiles: map['q_timetable_sub_tiles'] == 1,
|
||||||
|
qSubjectsSubTiles: map['q_subjects_sub_tiles'] == 1,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
void exportJson() {
|
void exportJson() {
|
||||||
String sets = json.encode(toMap());
|
String sets = json.encode(toMap());
|
||||||
Clipboard.setData(ClipboardData(text: sets));
|
Clipboard.setData(ClipboardData(text: sets));
|
||||||
|
|||||||
@@ -18,7 +18,13 @@ class User {
|
|||||||
String picture;
|
String picture;
|
||||||
int gradeStreak;
|
int gradeStreak;
|
||||||
// new login method
|
// new login method
|
||||||
|
String accessToken;
|
||||||
|
DateTime accessTokenExpire;
|
||||||
String refreshToken;
|
String refreshToken;
|
||||||
|
// cloud sync
|
||||||
|
// String qwidAccessToken;
|
||||||
|
// DateTime? qwidAccessTokenExpire;
|
||||||
|
// String qwidRefreshToken;
|
||||||
|
|
||||||
String get displayName => nickname != '' ? nickname : name;
|
String get displayName => nickname != '' ? nickname : name;
|
||||||
bool get hasStreak => gradeStreak > 0;
|
bool get hasStreak => gradeStreak > 0;
|
||||||
@@ -34,7 +40,12 @@ class User {
|
|||||||
this.nickname = "",
|
this.nickname = "",
|
||||||
this.picture = "",
|
this.picture = "",
|
||||||
this.gradeStreak = 0,
|
this.gradeStreak = 0,
|
||||||
|
required this.accessToken,
|
||||||
|
required this.accessTokenExpire,
|
||||||
required this.refreshToken,
|
required this.refreshToken,
|
||||||
|
// this.qwidAccessToken = "",
|
||||||
|
// this.qwidAccessTokenExpire,
|
||||||
|
// this.qwidRefreshToken = "",
|
||||||
}) {
|
}) {
|
||||||
if (id != null) {
|
if (id != null) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
@@ -59,12 +70,22 @@ class User {
|
|||||||
birth: DateTime.now(),
|
birth: DateTime.now(),
|
||||||
yearId: '1',
|
yearId: '1',
|
||||||
parents: [],
|
parents: [],
|
||||||
|
gradeDelay: 0,
|
||||||
),
|
),
|
||||||
role: Role.values[map["role"] ?? 0],
|
role: Role.values[map["role"] ?? 0],
|
||||||
nickname: map["nickname"] ?? "",
|
nickname: map["nickname"] ?? "",
|
||||||
picture: map["picture"] ?? "",
|
picture: map["picture"] ?? "",
|
||||||
gradeStreak: map["grade_streak"] ?? 0,
|
gradeStreak: map["grade_streak"] ?? 0,
|
||||||
|
accessToken: map["access_token"] ?? "",
|
||||||
|
accessTokenExpire: DateTime.parse(map["access_token_expire"] != ""
|
||||||
|
? map["access_token_expire"]
|
||||||
|
: DateTime.now().toIso8601String()),
|
||||||
refreshToken: map["refresh_token"] ?? "",
|
refreshToken: map["refresh_token"] ?? "",
|
||||||
|
// qwidAccessToken: map["qwid_access_token"] ?? "",
|
||||||
|
// qwidAccessTokenExpire: map["qwid_access_token_expire"] != ""
|
||||||
|
// ? DateTime.parse(map["qwid_access_token_expire"])
|
||||||
|
// : null,
|
||||||
|
// qwidRefreshToken: map["qwid_refresh_token"] ?? "",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -80,7 +101,14 @@ class User {
|
|||||||
"nickname": nickname,
|
"nickname": nickname,
|
||||||
"picture": picture,
|
"picture": picture,
|
||||||
"grade_streak": gradeStreak,
|
"grade_streak": gradeStreak,
|
||||||
|
"access_token": accessToken,
|
||||||
|
"access_token_expire": accessTokenExpire.toIso8601String(),
|
||||||
"refresh_token": refreshToken,
|
"refresh_token": refreshToken,
|
||||||
|
// "qwid_access_token": qwidAccessToken,
|
||||||
|
// "qwid_access_token_expire": qwidAccessTokenExpire != null
|
||||||
|
// ? qwidAccessTokenExpire!.toIso8601String()
|
||||||
|
// : "",
|
||||||
|
// "qwid_refresh_token": qwidRefreshToken,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:refilc/theme/colors/dark_desktop.dart';
|
// import 'package:refilc/theme/colors/dark_desktop.dart';
|
||||||
import 'package:refilc/theme/colors/dark_mobile.dart';
|
import 'package:refilc/theme/colors/dark_mobile.dart';
|
||||||
import 'package:refilc/theme/colors/light_desktop.dart';
|
// import 'package:refilc/theme/colors/light_desktop.dart';
|
||||||
import 'package:refilc/theme/colors/light_mobile.dart';
|
import 'package:refilc/theme/colors/light_mobile.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
@@ -21,10 +21,16 @@ class AppColors {
|
|||||||
} else {
|
} else {
|
||||||
switch (brightness) {
|
switch (brightness) {
|
||||||
case Brightness.light:
|
case Brightness.light:
|
||||||
return LightDesktopAppColors();
|
return LightMobileAppColors();
|
||||||
case Brightness.dark:
|
case Brightness.dark:
|
||||||
return DarkDesktopAppColors();
|
return DarkMobileAppColors();
|
||||||
}
|
}
|
||||||
|
// switch (brightness) {
|
||||||
|
// case Brightness.light:
|
||||||
|
// return LightDesktopAppColors();
|
||||||
|
// case Brightness.dark:
|
||||||
|
// return DarkDesktopAppColors();
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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)
|
||||||
.withOpacity(.9),
|
.withValues(alpha: .9),
|
||||||
secondary: newSecondary,
|
secondary: newSecondary,
|
||||||
onSecondary: (newSecondary.computeLuminance() > 0.5
|
onSecondary: (newSecondary.computeLuminance() > 0.5
|
||||||
? Colors.black
|
? Colors.black
|
||||||
: Colors.white)
|
: Colors.white)
|
||||||
.withOpacity(.9),
|
.withValues(alpha: .9),
|
||||||
tertiary: newTertiary,
|
tertiary: newTertiary,
|
||||||
onTertiary:
|
onTertiary:
|
||||||
(newTertiary.computeLuminance() > 0.5 ? Colors.black : Colors.white)
|
(newTertiary.computeLuminance() > 0.5 ? Colors.black : Colors.white)
|
||||||
.withOpacity(.9),
|
.withValues(alpha: .9),
|
||||||
brightness: Brightness.light,
|
brightness: Brightness.light,
|
||||||
error: lightColors.red,
|
error: lightColors.red,
|
||||||
onError: Colors.white.withOpacity(.9),
|
onError: Colors.white.withValues(alpha: .9),
|
||||||
surface: highlightColor,
|
surface: highlightColor,
|
||||||
onSurface: Colors.black.withOpacity(.9),
|
onSurface: Colors.black.withValues(alpha: .9),
|
||||||
),
|
),
|
||||||
shadowColor: lightColors.shadow.withOpacity(.5),
|
shadowColor: lightColors.shadow.withValues(alpha: .5),
|
||||||
appBarTheme: AppBarTheme(backgroundColor: backgroundColor),
|
appBarTheme: AppBarTheme(backgroundColor: backgroundColor),
|
||||||
indicatorColor: accent,
|
indicatorColor: accent,
|
||||||
iconTheme: IconThemeData(color: lightColors.text.withOpacity(.75)),
|
iconTheme: IconThemeData(color: lightColors.text.withValues(alpha: .75)),
|
||||||
navigationBarTheme: NavigationBarThemeData(
|
navigationBarTheme: NavigationBarThemeData(
|
||||||
indicatorColor:
|
indicatorColor: accent.withValues(
|
||||||
accent.withOpacity(accentColor == AccentColor.adaptive ? 0.4 : 0.8),
|
alpha: 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.withOpacity(0.8),
|
color: lightColors.text.withValues(alpha: 0.8),
|
||||||
)),
|
)),
|
||||||
labelBehavior: NavigationDestinationLabelBehavior.alwaysShow,
|
labelBehavior: NavigationDestinationLabelBehavior.alwaysShow,
|
||||||
height: 76.0,
|
height: 76.0,
|
||||||
),
|
),
|
||||||
sliderTheme: SliderThemeData(
|
sliderTheme: SliderThemeData(
|
||||||
inactiveTrackColor: accent.withOpacity(.3),
|
inactiveTrackColor: accent.withValues(alpha: .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)
|
||||||
.withOpacity(.9),
|
.withValues(alpha: .9),
|
||||||
secondary: newSecondary,
|
secondary: newSecondary,
|
||||||
onSecondary: (newSecondary.computeLuminance() > 0.5
|
onSecondary: (newSecondary.computeLuminance() > 0.5
|
||||||
? Colors.black
|
? Colors.black
|
||||||
: Colors.white)
|
: Colors.white)
|
||||||
.withOpacity(.9),
|
.withValues(alpha: .9),
|
||||||
tertiary: newTertiary,
|
tertiary: newTertiary,
|
||||||
onTertiary:
|
onTertiary:
|
||||||
(newTertiary.computeLuminance() > 0.5 ? Colors.black : Colors.white)
|
(newTertiary.computeLuminance() > 0.5 ? Colors.black : Colors.white)
|
||||||
.withOpacity(.9),
|
.withValues(alpha: .9),
|
||||||
brightness: Brightness.dark,
|
brightness: Brightness.dark,
|
||||||
error: darkColors.red,
|
error: darkColors.red,
|
||||||
onError: Colors.black.withOpacity(.9),
|
onError: Colors.black.withValues(alpha: .9),
|
||||||
surface: highlightColor,
|
surface: highlightColor,
|
||||||
onSurface: Colors.white.withOpacity(.9),
|
onSurface: Colors.white.withValues(alpha: .9),
|
||||||
),
|
),
|
||||||
shadowColor: highlightColor.withOpacity(.5), //darkColors.shadow,
|
shadowColor: highlightColor.withValues(alpha: .5), //darkColors.shadow,
|
||||||
appBarTheme: AppBarTheme(backgroundColor: backgroundColor),
|
appBarTheme: AppBarTheme(backgroundColor: backgroundColor),
|
||||||
indicatorColor: accent,
|
indicatorColor: accent,
|
||||||
iconTheme: IconThemeData(color: darkColors.text.withOpacity(.75)),
|
iconTheme: IconThemeData(color: darkColors.text.withValues(alpha: .75)),
|
||||||
navigationBarTheme: NavigationBarThemeData(
|
navigationBarTheme: NavigationBarThemeData(
|
||||||
indicatorColor:
|
indicatorColor: accent.withValues(
|
||||||
accent.withOpacity(accentColor == AccentColor.adaptive ? 0.4 : 0.8),
|
alpha: 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.withOpacity(0.8),
|
color: darkColors.text.withValues(alpha: 0.8),
|
||||||
)),
|
)),
|
||||||
labelBehavior: NavigationDestinationLabelBehavior.alwaysShow,
|
labelBehavior: NavigationDestinationLabelBehavior.alwaysShow,
|
||||||
height: 76.0,
|
height: 76.0,
|
||||||
),
|
),
|
||||||
sliderTheme: SliderThemeData(
|
sliderTheme: SliderThemeData(
|
||||||
inactiveTrackColor: accent.withOpacity(.3),
|
inactiveTrackColor: accent.withValues(alpha: .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.withOpacity(.2),
|
backgroundColor: accent.withValues(alpha: .2),
|
||||||
elevation: 1,
|
elevation: 1,
|
||||||
),
|
),
|
||||||
bottomNavigationBarTheme: BottomNavigationBarThemeData(
|
bottomNavigationBarTheme: BottomNavigationBarThemeData(
|
||||||
|
|||||||
@@ -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.withOpacity(.25),
|
color: AppColors.of(context).text.withValues(alpha: .25),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -178,7 +178,7 @@ 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);
|
items = ad_filter.getWidgets(adProvider.ads, context);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -232,8 +232,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.withOpacity(
|
color: Theme.of(context).shadowColor.withValues(
|
||||||
Theme.of(context).shadowColor.opacity *
|
alpha: Theme.of(context).shadowColor.opacity *
|
||||||
CurvedAnimation(
|
CurvedAnimation(
|
||||||
parent: CurvedAnimation(
|
parent: CurvedAnimation(
|
||||||
parent: animation,
|
parent: animation,
|
||||||
|
|||||||
@@ -1,23 +1,70 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
import 'package:refilc/models/ad.dart';
|
import 'package:refilc/models/ad.dart';
|
||||||
import 'package:refilc/ui/date_widget.dart';
|
import 'package:refilc/ui/date_widget.dart';
|
||||||
|
import 'package:refilc_mobile_ui/common/widgets/ad/ad_tile.dart';
|
||||||
import 'package:refilc_mobile_ui/common/widgets/ad/ad_viewable.dart' as mobile;
|
import 'package:refilc_mobile_ui/common/widgets/ad/ad_viewable.dart' as mobile;
|
||||||
|
import 'package:refilc_mobile_ui/plus/plus_screen.dart';
|
||||||
|
import 'package:refilc_plus/providers/plus_provider.dart';
|
||||||
|
import 'package:uuid/uuid.dart';
|
||||||
|
|
||||||
List<DateWidget> getWidgets(List<Ad> providerAds) {
|
List<DateWidget> getWidgets(List<Ad> providerAds, BuildContext context) {
|
||||||
List<DateWidget> items = [];
|
List<DateWidget> items = [];
|
||||||
|
|
||||||
|
bool hasPlus = Provider.of<PlusProvider>(context).hasPremium;
|
||||||
|
|
||||||
|
DateWidget plusWidget = DateWidget(
|
||||||
|
key: const Uuid().v4(),
|
||||||
|
date: DateTime.now(),
|
||||||
|
widget: AdTile(
|
||||||
|
Ad(
|
||||||
|
title: 'reFilc+',
|
||||||
|
description:
|
||||||
|
'Fizess elő reFilc+-ra, rejtsd el a hirdetéseket és támogasd az app működését!',
|
||||||
|
author: '',
|
||||||
|
logoUrl: Uri.parse('https://refilc.hu/image/brand/logo.png'),
|
||||||
|
overridePremium: false,
|
||||||
|
date: DateTime(2007, 6, 29, 9, 41),
|
||||||
|
expireDate: DateTime.now().add(const Duration(days: 11)),
|
||||||
|
launchUrl: Uri.parse('https://refilc.hu/plus'),
|
||||||
|
),
|
||||||
|
onTap: () => Navigator.of(context, rootNavigator: true)
|
||||||
|
.push(MaterialPageRoute(builder: (context) {
|
||||||
|
return const PlusScreen();
|
||||||
|
})),
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 5.0),
|
||||||
|
showExternalIcon: false,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
if (providerAds.isNotEmpty) {
|
if (providerAds.isNotEmpty) {
|
||||||
for (var ad in providerAds) {
|
for (var ad in providerAds) {
|
||||||
if (ad.date.isBefore(DateTime.now()) &&
|
if (ad.date.isBefore(DateTime.now()) &&
|
||||||
ad.expireDate.isAfter(DateTime.now())) {
|
ad.expireDate.isAfter(DateTime.now()) &&
|
||||||
providerAds.sort((a, b) => -a.date.compareTo(b.date));
|
DateTime.now().hour.isOdd) {
|
||||||
|
if (!hasPlus || ad.overridePremium) {
|
||||||
|
providerAds.sort((a, b) => -a.date.compareTo(b.date));
|
||||||
|
|
||||||
items.add(DateWidget(
|
items.add(DateWidget(
|
||||||
key: ad.description,
|
key: ad.description,
|
||||||
date: ad.date,
|
date: ad.date,
|
||||||
widget: mobile.AdViewable(ad),
|
widget: mobile.AdViewable(ad),
|
||||||
));
|
));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (DateTime.now().weekday == DateTime.saturday &&
|
||||||
|
items.isEmpty &&
|
||||||
|
!hasPlus) {
|
||||||
|
items.add(plusWidget);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if (DateTime.now().weekday == DateTime.saturday &&
|
||||||
|
items.isEmpty &&
|
||||||
|
!hasPlus) {
|
||||||
|
items.add(plusWidget);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return items;
|
return items;
|
||||||
|
|||||||
@@ -8,7 +8,9 @@ List<DateWidget> getWidgets(List<Grade> providerGrades) {
|
|||||||
List<DateWidget> items = [];
|
List<DateWidget> items = [];
|
||||||
for (var gradeType in GradeType.values) {
|
for (var gradeType in GradeType.values) {
|
||||||
if ([GradeType.midYear, GradeType.unknown, GradeType.levelExam]
|
if ([GradeType.midYear, GradeType.unknown, GradeType.levelExam]
|
||||||
.contains(gradeType)) continue;
|
.contains(gradeType)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
List<Grade> grades =
|
List<Grade> grades =
|
||||||
providerGrades.where((grade) => grade.type == gradeType).toList();
|
providerGrades.where((grade) => grade.type == gradeType).toList();
|
||||||
|
|||||||
@@ -1,12 +1,9 @@
|
|||||||
import 'package:refilc/ui/date_widget.dart';
|
import 'package:refilc/ui/date_widget.dart';
|
||||||
import 'package:refilc/utils/platform.dart';
|
|
||||||
import 'package:refilc_kreta_api/models/grade.dart';
|
import 'package:refilc_kreta_api/models/grade.dart';
|
||||||
import 'package:refilc_mobile_ui/common/widgets/grade/grade_viewable.dart'
|
import 'package:refilc_mobile_ui/common/widgets/grade/grade_viewable.dart'
|
||||||
as mobile;
|
as mobile;
|
||||||
import 'package:refilc_mobile_ui/common/widgets/grade/new_grades.dart'
|
import 'package:refilc_mobile_ui/common/widgets/grade/new_grades.dart'
|
||||||
as mobile;
|
as mobile;
|
||||||
import 'package:refilc_desktop_ui/common/widgets/grade/grade_viewable.dart'
|
|
||||||
as desktop;
|
|
||||||
|
|
||||||
List<DateWidget> getWidgets(
|
List<DateWidget> getWidgets(
|
||||||
List<Grade> providerGrades, DateTime? lastSeenDate) {
|
List<Grade> providerGrades, DateTime? lastSeenDate) {
|
||||||
@@ -19,9 +16,7 @@ List<DateWidget> getWidgets(
|
|||||||
items.add(DateWidget(
|
items.add(DateWidget(
|
||||||
key: grade.id,
|
key: grade.id,
|
||||||
date: grade.date,
|
date: grade.date,
|
||||||
widget: PlatformUtils.isMobile
|
widget: mobile.GradeViewable(grade),
|
||||||
? mobile.GradeViewable(grade)
|
|
||||||
: desktop.GradeViewable(grade),
|
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
/// Blocky Color Picker
|
/// Blocky Color Picker
|
||||||
|
|
||||||
library block_colorpicker;
|
library;
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:refilc/theme/colors/accent.dart';
|
import 'package:refilc/theme/colors/accent.dart';
|
||||||
@@ -73,7 +73,7 @@ Widget _defaultItemBuilder(
|
|||||||
color: color,
|
color: color,
|
||||||
boxShadow: [
|
boxShadow: [
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
color: color.withOpacity(0.8),
|
color: color.withValues(alpha: 0.8),
|
||||||
offset: const Offset(1, 2),
|
offset: const Offset(1, 2),
|
||||||
blurRadius: 5)
|
blurRadius: 5)
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
// ignore_for_file: use_build_context_synchronously
|
// ignore_for_file: use_build_context_synchronously
|
||||||
|
|
||||||
library hsv_picker;
|
library;
|
||||||
|
|
||||||
import 'package:refilc/models/shared_theme.dart';
|
import 'package:refilc/models/shared_theme.dart';
|
||||||
import 'package:refilc_mobile_ui/common/custom_snack_bar.dart';
|
import 'package:refilc_mobile_ui/common/custom_snack_bar.dart';
|
||||||
@@ -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
|
||||||
.withOpacity(isAdvancedView ? 1.0 : .5),
|
.withValues(alpha: isAdvancedView ? 1.0 : .5),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -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).withOpacity(1.0),
|
hsvColor.toColor().withRed(0).withValues(alpha: 1.0),
|
||||||
hsvColor.toColor().withRed(255).withOpacity(1.0),
|
hsvColor.toColor().withRed(255).withValues(alpha: 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).withOpacity(1.0),
|
hsvColor.toColor().withGreen(0).withValues(alpha: 1.0),
|
||||||
hsvColor.toColor().withGreen(255).withOpacity(1.0),
|
hsvColor.toColor().withGreen(255).withValues(alpha: 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).withOpacity(1.0),
|
hsvColor.toColor().withBlue(0).withValues(alpha: 1.0),
|
||||||
hsvColor.toColor().withBlue(255).withOpacity(1.0),
|
hsvColor.toColor().withBlue(255).withValues(alpha: 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().withOpacity(0.0),
|
hsvColor.toColor().withValues(alpha: 0.0),
|
||||||
hsvColor.toColor().withOpacity(1.0),
|
hsvColor.toColor().withValues(alpha: 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.withOpacity(.1),
|
fillColor: AppColors.of(context).text.withValues(alpha: .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().withOpacity(1.0);
|
thumbColor = hsvColor.toColor().withValues(alpha: 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().withOpacity(1.0);
|
thumbColor = hsvColor.toColor().withValues(alpha: 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().withOpacity(1.0);
|
thumbColor = hsvColor.toColor().withValues(alpha: 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().withOpacity(hsvColor.alpha);
|
thumbColor = hsvColor.toColor().withValues(alpha: hsvColor.alpha);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -709,8 +709,8 @@ class ColorIndicator extends StatelessWidget {
|
|||||||
boxShadow: [
|
boxShadow: [
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
color: useWhiteForeground(color)
|
color: useWhiteForeground(color)
|
||||||
? Colors.white.withOpacity(.5)
|
? Colors.white.withValues(alpha: .5)
|
||||||
: Colors.black.withOpacity(.5),
|
: Colors.black.withValues(alpha: .5),
|
||||||
offset: const Offset(0, 0),
|
offset: const Offset(0, 0),
|
||||||
blurRadius: 5)
|
blurRadius: 5)
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -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.withOpacity(.5),
|
color: AppColors.of(context).text.withValues(alpha: .5),
|
||||||
),
|
),
|
||||||
minLeadingWidth: isSubjectView ? 32.0 : 0,
|
minLeadingWidth: isSubjectView ? 32.0 : 0,
|
||||||
),
|
),
|
||||||
@@ -288,7 +288,8 @@ class GradeValueWidget extends StatelessWidget {
|
|||||||
shadows: [
|
shadows: [
|
||||||
if (value.weight >= 200)
|
if (value.weight >= 200)
|
||||||
Shadow(
|
Shadow(
|
||||||
color: (contrast ? Colors.white : color).withOpacity(.4),
|
color:
|
||||||
|
(contrast ? Colors.white : color).withValues(alpha: .4),
|
||||||
offset: const Offset(-4, -3),
|
offset: const Offset(-4, -3),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
@@ -312,7 +313,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.withOpacity(contrast ? 1.0 : .25),
|
color: color.withValues(alpha: contrast ? 1.0 : .25),
|
||||||
shape: BoxShape.circle,
|
shape: BoxShape.circle,
|
||||||
boxShadow: [
|
boxShadow: [
|
||||||
if (shadow &&
|
if (shadow &&
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ class LessonTile extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (lesson.isEmpty) {
|
if (lesson.isEmpty) {
|
||||||
accent = AppColors.of(context).text.withOpacity(0.6);
|
accent = AppColors.of(context).text.withValues(alpha: 0.6);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!lesson.studentPresence) {
|
if (!lesson.studentPresence) {
|
||||||
@@ -182,9 +182,8 @@ class LessonTile extends StatelessWidget {
|
|||||||
fontSize: 16.5,
|
fontSize: 16.5,
|
||||||
color: fill
|
color: fill
|
||||||
? accent
|
? accent
|
||||||
: AppColors.of(context)
|
: AppColors.of(context).text.withValues(
|
||||||
.text
|
alpha: !lesson.isEmpty ? 1.0 : 0.5),
|
||||||
.withOpacity(!lesson.isEmpty ? 1.0 : 0.5),
|
|
||||||
fontStyle: lesson.subject.isRenamed &&
|
fontStyle: lesson.subject.isRenamed &&
|
||||||
settingsProvider.renamedSubjectsItalics
|
settingsProvider.renamedSubjectsItalics
|
||||||
? FontStyle.italic
|
? FontStyle.italic
|
||||||
@@ -199,8 +198,10 @@ class LessonTile extends StatelessWidget {
|
|||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
fontSize: 14.0,
|
fontSize: 14.0,
|
||||||
color: fill
|
color: fill
|
||||||
? accent.withOpacity(.9)
|
? accent.withValues(alpha: .9)
|
||||||
: AppColors.of(context).text.withOpacity(.9),
|
: AppColors.of(context)
|
||||||
|
.text
|
||||||
|
.withValues(alpha: .9),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -217,7 +218,7 @@ class LessonTile extends StatelessWidget {
|
|||||||
// color: Theme.of(context)
|
// color: Theme.of(context)
|
||||||
// .colorScheme
|
// .colorScheme
|
||||||
// .secondary
|
// .secondary
|
||||||
// .withOpacity(.15),
|
// .withValues(alpha: .15),
|
||||||
// borderRadius: BorderRadius.circular(10.0),
|
// borderRadius: BorderRadius.circular(10.0),
|
||||||
// ),
|
// ),
|
||||||
// child: Text(
|
// child: Text(
|
||||||
@@ -229,7 +230,7 @@ class LessonTile extends StatelessWidget {
|
|||||||
// color: Theme.of(context)
|
// color: Theme.of(context)
|
||||||
// .colorScheme
|
// .colorScheme
|
||||||
// .secondary
|
// .secondary
|
||||||
// .withOpacity(.9),
|
// .withValues(alpha: .9),
|
||||||
// ),
|
// ),
|
||||||
// ),
|
// ),
|
||||||
// )
|
// )
|
||||||
@@ -246,11 +247,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.withOpacity(.15)
|
? accent.withValues(alpha: .15)
|
||||||
: Theme.of(context)
|
: Theme.of(context)
|
||||||
.colorScheme
|
.colorScheme
|
||||||
.tertiary
|
.tertiary
|
||||||
.withOpacity(.15),
|
.withValues(alpha: .15),
|
||||||
borderRadius: BorderRadius.circular(10.0),
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
),
|
),
|
||||||
child: Text(
|
child: Text(
|
||||||
@@ -261,11 +262,11 @@ class LessonTile extends StatelessWidget {
|
|||||||
fontSize: 12.0,
|
fontSize: 12.0,
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
color: fill
|
color: fill
|
||||||
? accent.withOpacity(0.9)
|
? accent.withValues(alpha: 0.9)
|
||||||
: Theme.of(context)
|
: Theme.of(context)
|
||||||
.colorScheme
|
.colorScheme
|
||||||
.secondary
|
.secondary
|
||||||
.withOpacity(.9),
|
.withValues(alpha: .9),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -277,7 +278,9 @@ class LessonTile extends StatelessWidget {
|
|||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 14.0,
|
fontSize: 14.0,
|
||||||
color: fill ? accent.withOpacity(0.5) : null,
|
color: fill
|
||||||
|
? accent.withValues(alpha: 0.5)
|
||||||
|
: null,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@@ -344,7 +347,7 @@ class LessonTile extends StatelessWidget {
|
|||||||
? Theme.of(context)
|
? Theme.of(context)
|
||||||
.colorScheme
|
.colorScheme
|
||||||
.secondary
|
.secondary
|
||||||
.withOpacity(.3)
|
.withValues(alpha: .3)
|
||||||
: const Color(0x00000000),
|
: const Color(0x00000000),
|
||||||
borderRadius: BorderRadius.circular(12.0),
|
borderRadius: BorderRadius.circular(12.0),
|
||||||
boxShadow: [
|
boxShadow: [
|
||||||
@@ -353,7 +356,7 @@ class LessonTile extends StatelessWidget {
|
|||||||
color: Theme.of(context)
|
color: Theme.of(context)
|
||||||
.colorScheme
|
.colorScheme
|
||||||
.secondary
|
.secondary
|
||||||
.withOpacity(.25),
|
.withValues(alpha: .25),
|
||||||
blurRadius: 6.0,
|
blurRadius: 6.0,
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
@@ -386,7 +389,7 @@ class LessonTile extends StatelessWidget {
|
|||||||
// fontWeight: FontWeight.w500,
|
// fontWeight: FontWeight.w500,
|
||||||
// color: AppColors.of(context)
|
// color: AppColors.of(context)
|
||||||
// .text
|
// .text
|
||||||
// .withOpacity(.75),
|
// .withValues(alpha: .75),
|
||||||
// ),
|
// ),
|
||||||
// ),
|
// ),
|
||||||
// ),
|
// ),
|
||||||
@@ -398,11 +401,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.withOpacity(.15)
|
? accent.withValues(alpha: .15)
|
||||||
: Theme.of(context)
|
: Theme.of(context)
|
||||||
.colorScheme
|
.colorScheme
|
||||||
.tertiary
|
.tertiary
|
||||||
.withOpacity(.15),
|
.withValues(alpha: .15),
|
||||||
borderRadius: BorderRadius.circular(10.0),
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
),
|
),
|
||||||
child: Text(
|
child: Text(
|
||||||
@@ -413,11 +416,11 @@ class LessonTile extends StatelessWidget {
|
|||||||
fontSize: 12.5,
|
fontSize: 12.5,
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
color: fill
|
color: fill
|
||||||
? accent.withOpacity(0.9)
|
? accent.withValues(alpha: 0.9)
|
||||||
: Theme.of(context)
|
: Theme.of(context)
|
||||||
.colorScheme
|
.colorScheme
|
||||||
.secondary
|
.secondary
|
||||||
.withOpacity(.9),
|
.withValues(alpha: .9),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -438,10 +441,10 @@ class LessonTile extends StatelessWidget {
|
|||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
color: fill
|
color: fill
|
||||||
? accent.withOpacity(.9)
|
? accent.withValues(alpha: .9)
|
||||||
: AppColors.of(context)
|
: AppColors.of(context)
|
||||||
.text
|
.text
|
||||||
.withOpacity(.9),
|
.withValues(alpha: .9),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@@ -502,8 +505,8 @@ class LessonSubtile extends StatelessWidget {
|
|||||||
Center(
|
Center(
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: 30.0,
|
width: 30.0,
|
||||||
child:
|
child: Icon(icon,
|
||||||
Icon(icon, color: iconColor.withOpacity(.75), size: 20.0),
|
color: iconColor.withValues(alpha: .75), size: 20.0),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
@@ -515,7 +518,8 @@ class LessonSubtile extends StatelessWidget {
|
|||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
color: AppColors.of(context).text.withOpacity(.65)),
|
color:
|
||||||
|
AppColors.of(context).text.withValues(alpha: .65)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -58,7 +58,8 @@ class MessageTile extends StatelessWidget {
|
|||||||
width: 105,
|
width: 105,
|
||||||
height: 15,
|
height: 15,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: AppColors.of(context).text.withOpacity(.85),
|
color:
|
||||||
|
AppColors.of(context).text.withValues(alpha: .85),
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -89,7 +90,8 @@ class MessageTile extends StatelessWidget {
|
|||||||
width: 150,
|
width: 150,
|
||||||
height: 10,
|
height: 10,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: AppColors.of(context).text.withOpacity(.45),
|
color:
|
||||||
|
AppColors.of(context).text.withValues(alpha: .45),
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -109,7 +111,8 @@ class MessageTile extends StatelessWidget {
|
|||||||
width: 35,
|
width: 35,
|
||||||
height: 15,
|
height: 15,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: AppColors.of(context).text.withOpacity(.45),
|
color:
|
||||||
|
AppColors.of(context).text.withValues(alpha: .45),
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -120,7 +123,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.withOpacity(.75),
|
color: AppColors.of(context).text.withValues(alpha: .75),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -58,7 +58,9 @@ extension DateFormatUtils on DateTime {
|
|||||||
}
|
}
|
||||||
if (now.year == year &&
|
if (now.year == year &&
|
||||||
now.month == month &&
|
now.month == month &&
|
||||||
now.add(const Duration(days: 1)).day == day) return "Tomorrow".i18n;
|
now.add(const Duration(days: 1)).day == day) {
|
||||||
|
return "Tomorrow".i18n;
|
||||||
|
}
|
||||||
|
|
||||||
String formatString;
|
String formatString;
|
||||||
|
|
||||||
|
|||||||
@@ -3,10 +3,10 @@ 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.0.4+274
|
version: 5.1.2+286
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=3.3.2 <=3.4.3"
|
sdk: ^3.6.0
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
flutter:
|
flutter:
|
||||||
@@ -16,8 +16,8 @@ dependencies:
|
|||||||
# reFilc packages
|
# reFilc packages
|
||||||
refilc_mobile_ui:
|
refilc_mobile_ui:
|
||||||
path: "../refilc_mobile_ui/"
|
path: "../refilc_mobile_ui/"
|
||||||
refilc_desktop_ui:
|
# refilc_desktop_ui:
|
||||||
path: "../refilc_desktop_ui/"
|
# path: "../refilc_desktop_ui/"
|
||||||
refilc_kreta_api:
|
refilc_kreta_api:
|
||||||
path: "../refilc_kreta_api/"
|
path: "../refilc_kreta_api/"
|
||||||
refilc_plus:
|
refilc_plus:
|
||||||
@@ -29,72 +29,59 @@ dependencies:
|
|||||||
sqflite: ^2.2.0+2
|
sqflite: ^2.2.0+2
|
||||||
intl: ^0.19.0
|
intl: ^0.19.0
|
||||||
provider: ^6.1.1
|
provider: ^6.1.1
|
||||||
http: ^1.1.2
|
http: ^1.2.0
|
||||||
uuid: ^4.2.1
|
uuid: ^4.2.1
|
||||||
html: ^0.15.0
|
html: ^0.15.0
|
||||||
open_filex: ^4.3.4
|
open_filex: ^4.3.4
|
||||||
# open_file:
|
path_provider: ^2.1.3
|
||||||
# git:
|
|
||||||
# url: https://github.com/crazecoder/open_file
|
|
||||||
# ref: master
|
|
||||||
path_provider: ^2.0.2
|
|
||||||
permission_handler: ^11.0.1
|
permission_handler: ^11.0.1
|
||||||
share_plus: ^9.0.0
|
share_plus: ^10.0.3
|
||||||
connectivity_plus: ^6.0.3
|
connectivity_plus: ^6.0.3
|
||||||
flutter_displaymode: ^0.6.0
|
flutter_displaymode: ^0.6.0
|
||||||
quick_actions: ^1.0.1
|
quick_actions: ^1.0.1
|
||||||
animated_list_plus: ^0.5.0
|
animated_list_plus: ^0.5.0
|
||||||
dynamic_color: ^1.2.2
|
dynamic_color: ^1.2.2
|
||||||
material_color_utilities: ^0.8.0
|
material_color_utilities: ^0.11.1
|
||||||
crypto: ^3.0.2
|
crypto: ^3.0.2
|
||||||
elegant_notification: ^2.2.0
|
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.1.0
|
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:
|
home_widget: ^0.7.0+1
|
||||||
git:
|
|
||||||
url: https://github.com/refilc/home_widget.git
|
|
||||||
ref: flutter-beta
|
|
||||||
flutter_expandable_fab: ^2.0.0
|
flutter_expandable_fab: ^2.0.0
|
||||||
uni_links: ^0.5.1
|
url_launcher: ^6.2.5
|
||||||
url_launcher: ^6.1.6
|
|
||||||
workmanager:
|
|
||||||
git:
|
|
||||||
url: https://github.com/refilc/flutter_workmanager.git
|
|
||||||
ref: v0.5.1
|
|
||||||
flutter_svg: ^2.0.10+1
|
flutter_svg: ^2.0.10+1
|
||||||
image_picker: ^1.0.7
|
image_picker: ^1.0.7
|
||||||
animations: ^2.0.1
|
animations: ^2.0.1
|
||||||
background_fetch: ^1.1.5
|
background_fetch: ^1.1.5
|
||||||
flutter_local_notifications: ^17.1.2
|
flutter_local_notifications: ^18.0.1
|
||||||
package_info_plus: ^8.0.0
|
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:
|
|
||||||
git:
|
|
||||||
url: https://github.com/kimaah/image_crop.git
|
|
||||||
googleapis: ^13.2.0
|
googleapis: ^13.2.0
|
||||||
google_sign_in: ^6.2.1
|
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: ^2.2.0
|
maps_launcher: ^3.0.0+1
|
||||||
google_fonts: ^6.1.0
|
google_fonts: ^6.1.0
|
||||||
flutter_stripe: ^10.0.0
|
|
||||||
get_it: ^7.6.7
|
get_it: ^7.6.7
|
||||||
xml: ^6.5.0
|
xml: ^6.5.0
|
||||||
carousel_slider: ^4.2.1
|
carousel_slider: ^5.0.0
|
||||||
flutter_portal: ^1.1.4
|
flutter_portal: ^1.1.4
|
||||||
shake_flutter: ^17.0.0
|
shake_flutter: ^17.0.0
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_lints: ^4.0.0
|
flutter_lints: ^5.0.0
|
||||||
flutter_launcher_icons: "^0.13.1"
|
flutter_launcher_icons: ^0.14.2
|
||||||
flutter_native_splash: "^2.3.10"
|
flutter_native_splash: "^2.3.10"
|
||||||
sqflite_common_ffi: ^2.0.0+3
|
sqflite_common_ffi: ^2.0.0+3
|
||||||
|
dependency_validator: ^5.0.2
|
||||||
|
|
||||||
|
dependency_overrides:
|
||||||
|
webview_flutter_wkwebview: 3.17.0
|
||||||
|
|
||||||
flutter:
|
flutter:
|
||||||
uses-material-design: true
|
uses-material-design: true
|
||||||
@@ -188,13 +175,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: "#03112D"
|
adaptive_icon_background: "#7CA021"
|
||||||
adaptive_icon_foreground: assets/icons/ic_android.png
|
adaptive_icon_foreground: assets/icons/ic_launcher_foreground.png
|
||||||
ios: false
|
ios: false
|
||||||
remove_alpha_ios: false
|
remove_alpha_ios: false
|
||||||
|
|
||||||
flutter_native_splash:
|
flutter_native_splash:
|
||||||
color: "#03112D"
|
color: "#7CA021"
|
||||||
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
|
||||||
|
|||||||
@@ -1,674 +0,0 @@
|
|||||||
GNU GENERAL PUBLIC LICENSE
|
|
||||||
Version 3, 29 June 2007
|
|
||||||
|
|
||||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
|
||||||
of this license document, but changing it is not allowed.
|
|
||||||
|
|
||||||
Preamble
|
|
||||||
|
|
||||||
The GNU General Public License is a free, copyleft license for
|
|
||||||
software and other kinds of works.
|
|
||||||
|
|
||||||
The licenses for most software and other practical works are designed
|
|
||||||
to take away your freedom to share and change the works. By contrast,
|
|
||||||
the GNU General Public License is intended to guarantee your freedom to
|
|
||||||
share and change all versions of a program--to make sure it remains free
|
|
||||||
software for all its users. We, the Free Software Foundation, use the
|
|
||||||
GNU General Public License for most of our software; it applies also to
|
|
||||||
any other work released this way by its authors. You can apply it to
|
|
||||||
your programs, too.
|
|
||||||
|
|
||||||
When we speak of free software, we are referring to freedom, not
|
|
||||||
price. Our General Public Licenses are designed to make sure that you
|
|
||||||
have the freedom to distribute copies of free software (and charge for
|
|
||||||
them if you wish), that you receive source code or can get it if you
|
|
||||||
want it, that you can change the software or use pieces of it in new
|
|
||||||
free programs, and that you know you can do these things.
|
|
||||||
|
|
||||||
To protect your rights, we need to prevent others from denying you
|
|
||||||
these rights or asking you to surrender the rights. Therefore, you have
|
|
||||||
certain responsibilities if you distribute copies of the software, or if
|
|
||||||
you modify it: responsibilities to respect the freedom of others.
|
|
||||||
|
|
||||||
For example, if you distribute copies of such a program, whether
|
|
||||||
gratis or for a fee, you must pass on to the recipients the same
|
|
||||||
freedoms that you received. You must make sure that they, too, receive
|
|
||||||
or can get the source code. And you must show them these terms so they
|
|
||||||
know their rights.
|
|
||||||
|
|
||||||
Developers that use the GNU GPL protect your rights with two steps:
|
|
||||||
(1) assert copyright on the software, and (2) offer you this License
|
|
||||||
giving you legal permission to copy, distribute and/or modify it.
|
|
||||||
|
|
||||||
For the developers' and authors' protection, the GPL clearly explains
|
|
||||||
that there is no warranty for this free software. For both users' and
|
|
||||||
authors' sake, the GPL requires that modified versions be marked as
|
|
||||||
changed, so that their problems will not be attributed erroneously to
|
|
||||||
authors of previous versions.
|
|
||||||
|
|
||||||
Some devices are designed to deny users access to install or run
|
|
||||||
modified versions of the software inside them, although the manufacturer
|
|
||||||
can do so. This is fundamentally incompatible with the aim of
|
|
||||||
protecting users' freedom to change the software. The systematic
|
|
||||||
pattern of such abuse occurs in the area of products for individuals to
|
|
||||||
use, which is precisely where it is most unacceptable. Therefore, we
|
|
||||||
have designed this version of the GPL to prohibit the practice for those
|
|
||||||
products. If such problems arise substantially in other domains, we
|
|
||||||
stand ready to extend this provision to those domains in future versions
|
|
||||||
of the GPL, as needed to protect the freedom of users.
|
|
||||||
|
|
||||||
Finally, every program is threatened constantly by software patents.
|
|
||||||
States should not allow patents to restrict development and use of
|
|
||||||
software on general-purpose computers, but in those that do, we wish to
|
|
||||||
avoid the special danger that patents applied to a free program could
|
|
||||||
make it effectively proprietary. To prevent this, the GPL assures that
|
|
||||||
patents cannot be used to render the program non-free.
|
|
||||||
|
|
||||||
The precise terms and conditions for copying, distribution and
|
|
||||||
modification follow.
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
0. Definitions.
|
|
||||||
|
|
||||||
"This License" refers to version 3 of the GNU General Public License.
|
|
||||||
|
|
||||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
|
||||||
works, such as semiconductor masks.
|
|
||||||
|
|
||||||
"The Program" refers to any copyrightable work licensed under this
|
|
||||||
License. Each licensee is addressed as "you". "Licensees" and
|
|
||||||
"recipients" may be individuals or organizations.
|
|
||||||
|
|
||||||
To "modify" a work means to copy from or adapt all or part of the work
|
|
||||||
in a fashion requiring copyright permission, other than the making of an
|
|
||||||
exact copy. The resulting work is called a "modified version" of the
|
|
||||||
earlier work or a work "based on" the earlier work.
|
|
||||||
|
|
||||||
A "covered work" means either the unmodified Program or a work based
|
|
||||||
on the Program.
|
|
||||||
|
|
||||||
To "propagate" a work means to do anything with it that, without
|
|
||||||
permission, would make you directly or secondarily liable for
|
|
||||||
infringement under applicable copyright law, except executing it on a
|
|
||||||
computer or modifying a private copy. Propagation includes copying,
|
|
||||||
distribution (with or without modification), making available to the
|
|
||||||
public, and in some countries other activities as well.
|
|
||||||
|
|
||||||
To "convey" a work means any kind of propagation that enables other
|
|
||||||
parties to make or receive copies. Mere interaction with a user through
|
|
||||||
a computer network, with no transfer of a copy, is not conveying.
|
|
||||||
|
|
||||||
An interactive user interface displays "Appropriate Legal Notices"
|
|
||||||
to the extent that it includes a convenient and prominently visible
|
|
||||||
feature that (1) displays an appropriate copyright notice, and (2)
|
|
||||||
tells the user that there is no warranty for the work (except to the
|
|
||||||
extent that warranties are provided), that licensees may convey the
|
|
||||||
work under this License, and how to view a copy of this License. If
|
|
||||||
the interface presents a list of user commands or options, such as a
|
|
||||||
menu, a prominent item in the list meets this criterion.
|
|
||||||
|
|
||||||
1. Source Code.
|
|
||||||
|
|
||||||
The "source code" for a work means the preferred form of the work
|
|
||||||
for making modifications to it. "Object code" means any non-source
|
|
||||||
form of a work.
|
|
||||||
|
|
||||||
A "Standard Interface" means an interface that either is an official
|
|
||||||
standard defined by a recognized standards body, or, in the case of
|
|
||||||
interfaces specified for a particular programming language, one that
|
|
||||||
is widely used among developers working in that language.
|
|
||||||
|
|
||||||
The "System Libraries" of an executable work include anything, other
|
|
||||||
than the work as a whole, that (a) is included in the normal form of
|
|
||||||
packaging a Major Component, but which is not part of that Major
|
|
||||||
Component, and (b) serves only to enable use of the work with that
|
|
||||||
Major Component, or to implement a Standard Interface for which an
|
|
||||||
implementation is available to the public in source code form. A
|
|
||||||
"Major Component", in this context, means a major essential component
|
|
||||||
(kernel, window system, and so on) of the specific operating system
|
|
||||||
(if any) on which the executable work runs, or a compiler used to
|
|
||||||
produce the work, or an object code interpreter used to run it.
|
|
||||||
|
|
||||||
The "Corresponding Source" for a work in object code form means all
|
|
||||||
the source code needed to generate, install, and (for an executable
|
|
||||||
work) run the object code and to modify the work, including scripts to
|
|
||||||
control those activities. However, it does not include the work's
|
|
||||||
System Libraries, or general-purpose tools or generally available free
|
|
||||||
programs which are used unmodified in performing those activities but
|
|
||||||
which are not part of the work. For example, Corresponding Source
|
|
||||||
includes interface definition files associated with source files for
|
|
||||||
the work, and the source code for shared libraries and dynamically
|
|
||||||
linked subprograms that the work is specifically designed to require,
|
|
||||||
such as by intimate data communication or control flow between those
|
|
||||||
subprograms and other parts of the work.
|
|
||||||
|
|
||||||
The Corresponding Source need not include anything that users
|
|
||||||
can regenerate automatically from other parts of the Corresponding
|
|
||||||
Source.
|
|
||||||
|
|
||||||
The Corresponding Source for a work in source code form is that
|
|
||||||
same work.
|
|
||||||
|
|
||||||
2. Basic Permissions.
|
|
||||||
|
|
||||||
All rights granted under this License are granted for the term of
|
|
||||||
copyright on the Program, and are irrevocable provided the stated
|
|
||||||
conditions are met. This License explicitly affirms your unlimited
|
|
||||||
permission to run the unmodified Program. The output from running a
|
|
||||||
covered work is covered by this License only if the output, given its
|
|
||||||
content, constitutes a covered work. This License acknowledges your
|
|
||||||
rights of fair use or other equivalent, as provided by copyright law.
|
|
||||||
|
|
||||||
You may make, run and propagate covered works that you do not
|
|
||||||
convey, without conditions so long as your license otherwise remains
|
|
||||||
in force. You may convey covered works to others for the sole purpose
|
|
||||||
of having them make modifications exclusively for you, or provide you
|
|
||||||
with facilities for running those works, provided that you comply with
|
|
||||||
the terms of this License in conveying all material for which you do
|
|
||||||
not control copyright. Those thus making or running the covered works
|
|
||||||
for you must do so exclusively on your behalf, under your direction
|
|
||||||
and control, on terms that prohibit them from making any copies of
|
|
||||||
your copyrighted material outside their relationship with you.
|
|
||||||
|
|
||||||
Conveying under any other circumstances is permitted solely under
|
|
||||||
the conditions stated below. Sublicensing is not allowed; section 10
|
|
||||||
makes it unnecessary.
|
|
||||||
|
|
||||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
|
||||||
|
|
||||||
No covered work shall be deemed part of an effective technological
|
|
||||||
measure under any applicable law fulfilling obligations under article
|
|
||||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
|
||||||
similar laws prohibiting or restricting circumvention of such
|
|
||||||
measures.
|
|
||||||
|
|
||||||
When you convey a covered work, you waive any legal power to forbid
|
|
||||||
circumvention of technological measures to the extent such circumvention
|
|
||||||
is effected by exercising rights under this License with respect to
|
|
||||||
the covered work, and you disclaim any intention to limit operation or
|
|
||||||
modification of the work as a means of enforcing, against the work's
|
|
||||||
users, your or third parties' legal rights to forbid circumvention of
|
|
||||||
technological measures.
|
|
||||||
|
|
||||||
4. Conveying Verbatim Copies.
|
|
||||||
|
|
||||||
You may convey verbatim copies of the Program's source code as you
|
|
||||||
receive it, in any medium, provided that you conspicuously and
|
|
||||||
appropriately publish on each copy an appropriate copyright notice;
|
|
||||||
keep intact all notices stating that this License and any
|
|
||||||
non-permissive terms added in accord with section 7 apply to the code;
|
|
||||||
keep intact all notices of the absence of any warranty; and give all
|
|
||||||
recipients a copy of this License along with the Program.
|
|
||||||
|
|
||||||
You may charge any price or no price for each copy that you convey,
|
|
||||||
and you may offer support or warranty protection for a fee.
|
|
||||||
|
|
||||||
5. Conveying Modified Source Versions.
|
|
||||||
|
|
||||||
You may convey a work based on the Program, or the modifications to
|
|
||||||
produce it from the Program, in the form of source code under the
|
|
||||||
terms of section 4, provided that you also meet all of these conditions:
|
|
||||||
|
|
||||||
a) The work must carry prominent notices stating that you modified
|
|
||||||
it, and giving a relevant date.
|
|
||||||
|
|
||||||
b) The work must carry prominent notices stating that it is
|
|
||||||
released under this License and any conditions added under section
|
|
||||||
7. This requirement modifies the requirement in section 4 to
|
|
||||||
"keep intact all notices".
|
|
||||||
|
|
||||||
c) You must license the entire work, as a whole, under this
|
|
||||||
License to anyone who comes into possession of a copy. This
|
|
||||||
License will therefore apply, along with any applicable section 7
|
|
||||||
additional terms, to the whole of the work, and all its parts,
|
|
||||||
regardless of how they are packaged. This License gives no
|
|
||||||
permission to license the work in any other way, but it does not
|
|
||||||
invalidate such permission if you have separately received it.
|
|
||||||
|
|
||||||
d) If the work has interactive user interfaces, each must display
|
|
||||||
Appropriate Legal Notices; however, if the Program has interactive
|
|
||||||
interfaces that do not display Appropriate Legal Notices, your
|
|
||||||
work need not make them do so.
|
|
||||||
|
|
||||||
A compilation of a covered work with other separate and independent
|
|
||||||
works, which are not by their nature extensions of the covered work,
|
|
||||||
and which are not combined with it such as to form a larger program,
|
|
||||||
in or on a volume of a storage or distribution medium, is called an
|
|
||||||
"aggregate" if the compilation and its resulting copyright are not
|
|
||||||
used to limit the access or legal rights of the compilation's users
|
|
||||||
beyond what the individual works permit. Inclusion of a covered work
|
|
||||||
in an aggregate does not cause this License to apply to the other
|
|
||||||
parts of the aggregate.
|
|
||||||
|
|
||||||
6. Conveying Non-Source Forms.
|
|
||||||
|
|
||||||
You may convey a covered work in object code form under the terms
|
|
||||||
of sections 4 and 5, provided that you also convey the
|
|
||||||
machine-readable Corresponding Source under the terms of this License,
|
|
||||||
in one of these ways:
|
|
||||||
|
|
||||||
a) Convey the object code in, or embodied in, a physical product
|
|
||||||
(including a physical distribution medium), accompanied by the
|
|
||||||
Corresponding Source fixed on a durable physical medium
|
|
||||||
customarily used for software interchange.
|
|
||||||
|
|
||||||
b) Convey the object code in, or embodied in, a physical product
|
|
||||||
(including a physical distribution medium), accompanied by a
|
|
||||||
written offer, valid for at least three years and valid for as
|
|
||||||
long as you offer spare parts or customer support for that product
|
|
||||||
model, to give anyone who possesses the object code either (1) a
|
|
||||||
copy of the Corresponding Source for all the software in the
|
|
||||||
product that is covered by this License, on a durable physical
|
|
||||||
medium customarily used for software interchange, for a price no
|
|
||||||
more than your reasonable cost of physically performing this
|
|
||||||
conveying of source, or (2) access to copy the
|
|
||||||
Corresponding Source from a network server at no charge.
|
|
||||||
|
|
||||||
c) Convey individual copies of the object code with a copy of the
|
|
||||||
written offer to provide the Corresponding Source. This
|
|
||||||
alternative is allowed only occasionally and noncommercially, and
|
|
||||||
only if you received the object code with such an offer, in accord
|
|
||||||
with subsection 6b.
|
|
||||||
|
|
||||||
d) Convey the object code by offering access from a designated
|
|
||||||
place (gratis or for a charge), and offer equivalent access to the
|
|
||||||
Corresponding Source in the same way through the same place at no
|
|
||||||
further charge. You need not require recipients to copy the
|
|
||||||
Corresponding Source along with the object code. If the place to
|
|
||||||
copy the object code is a network server, the Corresponding Source
|
|
||||||
may be on a different server (operated by you or a third party)
|
|
||||||
that supports equivalent copying facilities, provided you maintain
|
|
||||||
clear directions next to the object code saying where to find the
|
|
||||||
Corresponding Source. Regardless of what server hosts the
|
|
||||||
Corresponding Source, you remain obligated to ensure that it is
|
|
||||||
available for as long as needed to satisfy these requirements.
|
|
||||||
|
|
||||||
e) Convey the object code using peer-to-peer transmission, provided
|
|
||||||
you inform other peers where the object code and Corresponding
|
|
||||||
Source of the work are being offered to the general public at no
|
|
||||||
charge under subsection 6d.
|
|
||||||
|
|
||||||
A separable portion of the object code, whose source code is excluded
|
|
||||||
from the Corresponding Source as a System Library, need not be
|
|
||||||
included in conveying the object code work.
|
|
||||||
|
|
||||||
A "User Product" is either (1) a "consumer product", which means any
|
|
||||||
tangible personal property which is normally used for personal, family,
|
|
||||||
or household purposes, or (2) anything designed or sold for incorporation
|
|
||||||
into a dwelling. In determining whether a product is a consumer product,
|
|
||||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
|
||||||
product received by a particular user, "normally used" refers to a
|
|
||||||
typical or common use of that class of product, regardless of the status
|
|
||||||
of the particular user or of the way in which the particular user
|
|
||||||
actually uses, or expects or is expected to use, the product. A product
|
|
||||||
is a consumer product regardless of whether the product has substantial
|
|
||||||
commercial, industrial or non-consumer uses, unless such uses represent
|
|
||||||
the only significant mode of use of the product.
|
|
||||||
|
|
||||||
"Installation Information" for a User Product means any methods,
|
|
||||||
procedures, authorization keys, or other information required to install
|
|
||||||
and execute modified versions of a covered work in that User Product from
|
|
||||||
a modified version of its Corresponding Source. The information must
|
|
||||||
suffice to ensure that the continued functioning of the modified object
|
|
||||||
code is in no case prevented or interfered with solely because
|
|
||||||
modification has been made.
|
|
||||||
|
|
||||||
If you convey an object code work under this section in, or with, or
|
|
||||||
specifically for use in, a User Product, and the conveying occurs as
|
|
||||||
part of a transaction in which the right of possession and use of the
|
|
||||||
User Product is transferred to the recipient in perpetuity or for a
|
|
||||||
fixed term (regardless of how the transaction is characterized), the
|
|
||||||
Corresponding Source conveyed under this section must be accompanied
|
|
||||||
by the Installation Information. But this requirement does not apply
|
|
||||||
if neither you nor any third party retains the ability to install
|
|
||||||
modified object code on the User Product (for example, the work has
|
|
||||||
been installed in ROM).
|
|
||||||
|
|
||||||
The requirement to provide Installation Information does not include a
|
|
||||||
requirement to continue to provide support service, warranty, or updates
|
|
||||||
for a work that has been modified or installed by the recipient, or for
|
|
||||||
the User Product in which it has been modified or installed. Access to a
|
|
||||||
network may be denied when the modification itself materially and
|
|
||||||
adversely affects the operation of the network or violates the rules and
|
|
||||||
protocols for communication across the network.
|
|
||||||
|
|
||||||
Corresponding Source conveyed, and Installation Information provided,
|
|
||||||
in accord with this section must be in a format that is publicly
|
|
||||||
documented (and with an implementation available to the public in
|
|
||||||
source code form), and must require no special password or key for
|
|
||||||
unpacking, reading or copying.
|
|
||||||
|
|
||||||
7. Additional Terms.
|
|
||||||
|
|
||||||
"Additional permissions" are terms that supplement the terms of this
|
|
||||||
License by making exceptions from one or more of its conditions.
|
|
||||||
Additional permissions that are applicable to the entire Program shall
|
|
||||||
be treated as though they were included in this License, to the extent
|
|
||||||
that they are valid under applicable law. If additional permissions
|
|
||||||
apply only to part of the Program, that part may be used separately
|
|
||||||
under those permissions, but the entire Program remains governed by
|
|
||||||
this License without regard to the additional permissions.
|
|
||||||
|
|
||||||
When you convey a copy of a covered work, you may at your option
|
|
||||||
remove any additional permissions from that copy, or from any part of
|
|
||||||
it. (Additional permissions may be written to require their own
|
|
||||||
removal in certain cases when you modify the work.) You may place
|
|
||||||
additional permissions on material, added by you to a covered work,
|
|
||||||
for which you have or can give appropriate copyright permission.
|
|
||||||
|
|
||||||
Notwithstanding any other provision of this License, for material you
|
|
||||||
add to a covered work, you may (if authorized by the copyright holders of
|
|
||||||
that material) supplement the terms of this License with terms:
|
|
||||||
|
|
||||||
a) Disclaiming warranty or limiting liability differently from the
|
|
||||||
terms of sections 15 and 16 of this License; or
|
|
||||||
|
|
||||||
b) Requiring preservation of specified reasonable legal notices or
|
|
||||||
author attributions in that material or in the Appropriate Legal
|
|
||||||
Notices displayed by works containing it; or
|
|
||||||
|
|
||||||
c) Prohibiting misrepresentation of the origin of that material, or
|
|
||||||
requiring that modified versions of such material be marked in
|
|
||||||
reasonable ways as different from the original version; or
|
|
||||||
|
|
||||||
d) Limiting the use for publicity purposes of names of licensors or
|
|
||||||
authors of the material; or
|
|
||||||
|
|
||||||
e) Declining to grant rights under trademark law for use of some
|
|
||||||
trade names, trademarks, or service marks; or
|
|
||||||
|
|
||||||
f) Requiring indemnification of licensors and authors of that
|
|
||||||
material by anyone who conveys the material (or modified versions of
|
|
||||||
it) with contractual assumptions of liability to the recipient, for
|
|
||||||
any liability that these contractual assumptions directly impose on
|
|
||||||
those licensors and authors.
|
|
||||||
|
|
||||||
All other non-permissive additional terms are considered "further
|
|
||||||
restrictions" within the meaning of section 10. If the Program as you
|
|
||||||
received it, or any part of it, contains a notice stating that it is
|
|
||||||
governed by this License along with a term that is a further
|
|
||||||
restriction, you may remove that term. If a license document contains
|
|
||||||
a further restriction but permits relicensing or conveying under this
|
|
||||||
License, you may add to a covered work material governed by the terms
|
|
||||||
of that license document, provided that the further restriction does
|
|
||||||
not survive such relicensing or conveying.
|
|
||||||
|
|
||||||
If you add terms to a covered work in accord with this section, you
|
|
||||||
must place, in the relevant source files, a statement of the
|
|
||||||
additional terms that apply to those files, or a notice indicating
|
|
||||||
where to find the applicable terms.
|
|
||||||
|
|
||||||
Additional terms, permissive or non-permissive, may be stated in the
|
|
||||||
form of a separately written license, or stated as exceptions;
|
|
||||||
the above requirements apply either way.
|
|
||||||
|
|
||||||
8. Termination.
|
|
||||||
|
|
||||||
You may not propagate or modify a covered work except as expressly
|
|
||||||
provided under this License. Any attempt otherwise to propagate or
|
|
||||||
modify it is void, and will automatically terminate your rights under
|
|
||||||
this License (including any patent licenses granted under the third
|
|
||||||
paragraph of section 11).
|
|
||||||
|
|
||||||
However, if you cease all violation of this License, then your
|
|
||||||
license from a particular copyright holder is reinstated (a)
|
|
||||||
provisionally, unless and until the copyright holder explicitly and
|
|
||||||
finally terminates your license, and (b) permanently, if the copyright
|
|
||||||
holder fails to notify you of the violation by some reasonable means
|
|
||||||
prior to 60 days after the cessation.
|
|
||||||
|
|
||||||
Moreover, your license from a particular copyright holder is
|
|
||||||
reinstated permanently if the copyright holder notifies you of the
|
|
||||||
violation by some reasonable means, this is the first time you have
|
|
||||||
received notice of violation of this License (for any work) from that
|
|
||||||
copyright holder, and you cure the violation prior to 30 days after
|
|
||||||
your receipt of the notice.
|
|
||||||
|
|
||||||
Termination of your rights under this section does not terminate the
|
|
||||||
licenses of parties who have received copies or rights from you under
|
|
||||||
this License. If your rights have been terminated and not permanently
|
|
||||||
reinstated, you do not qualify to receive new licenses for the same
|
|
||||||
material under section 10.
|
|
||||||
|
|
||||||
9. Acceptance Not Required for Having Copies.
|
|
||||||
|
|
||||||
You are not required to accept this License in order to receive or
|
|
||||||
run a copy of the Program. Ancillary propagation of a covered work
|
|
||||||
occurring solely as a consequence of using peer-to-peer transmission
|
|
||||||
to receive a copy likewise does not require acceptance. However,
|
|
||||||
nothing other than this License grants you permission to propagate or
|
|
||||||
modify any covered work. These actions infringe copyright if you do
|
|
||||||
not accept this License. Therefore, by modifying or propagating a
|
|
||||||
covered work, you indicate your acceptance of this License to do so.
|
|
||||||
|
|
||||||
10. Automatic Licensing of Downstream Recipients.
|
|
||||||
|
|
||||||
Each time you convey a covered work, the recipient automatically
|
|
||||||
receives a license from the original licensors, to run, modify and
|
|
||||||
propagate that work, subject to this License. You are not responsible
|
|
||||||
for enforcing compliance by third parties with this License.
|
|
||||||
|
|
||||||
An "entity transaction" is a transaction transferring control of an
|
|
||||||
organization, or substantially all assets of one, or subdividing an
|
|
||||||
organization, or merging organizations. If propagation of a covered
|
|
||||||
work results from an entity transaction, each party to that
|
|
||||||
transaction who receives a copy of the work also receives whatever
|
|
||||||
licenses to the work the party's predecessor in interest had or could
|
|
||||||
give under the previous paragraph, plus a right to possession of the
|
|
||||||
Corresponding Source of the work from the predecessor in interest, if
|
|
||||||
the predecessor has it or can get it with reasonable efforts.
|
|
||||||
|
|
||||||
You may not impose any further restrictions on the exercise of the
|
|
||||||
rights granted or affirmed under this License. For example, you may
|
|
||||||
not impose a license fee, royalty, or other charge for exercise of
|
|
||||||
rights granted under this License, and you may not initiate litigation
|
|
||||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
|
||||||
any patent claim is infringed by making, using, selling, offering for
|
|
||||||
sale, or importing the Program or any portion of it.
|
|
||||||
|
|
||||||
11. Patents.
|
|
||||||
|
|
||||||
A "contributor" is a copyright holder who authorizes use under this
|
|
||||||
License of the Program or a work on which the Program is based. The
|
|
||||||
work thus licensed is called the contributor's "contributor version".
|
|
||||||
|
|
||||||
A contributor's "essential patent claims" are all patent claims
|
|
||||||
owned or controlled by the contributor, whether already acquired or
|
|
||||||
hereafter acquired, that would be infringed by some manner, permitted
|
|
||||||
by this License, of making, using, or selling its contributor version,
|
|
||||||
but do not include claims that would be infringed only as a
|
|
||||||
consequence of further modification of the contributor version. For
|
|
||||||
purposes of this definition, "control" includes the right to grant
|
|
||||||
patent sublicenses in a manner consistent with the requirements of
|
|
||||||
this License.
|
|
||||||
|
|
||||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
|
||||||
patent license under the contributor's essential patent claims, to
|
|
||||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
|
||||||
propagate the contents of its contributor version.
|
|
||||||
|
|
||||||
In the following three paragraphs, a "patent license" is any express
|
|
||||||
agreement or commitment, however denominated, not to enforce a patent
|
|
||||||
(such as an express permission to practice a patent or covenant not to
|
|
||||||
sue for patent infringement). To "grant" such a patent license to a
|
|
||||||
party means to make such an agreement or commitment not to enforce a
|
|
||||||
patent against the party.
|
|
||||||
|
|
||||||
If you convey a covered work, knowingly relying on a patent license,
|
|
||||||
and the Corresponding Source of the work is not available for anyone
|
|
||||||
to copy, free of charge and under the terms of this License, through a
|
|
||||||
publicly available network server or other readily accessible means,
|
|
||||||
then you must either (1) cause the Corresponding Source to be so
|
|
||||||
available, or (2) arrange to deprive yourself of the benefit of the
|
|
||||||
patent license for this particular work, or (3) arrange, in a manner
|
|
||||||
consistent with the requirements of this License, to extend the patent
|
|
||||||
license to downstream recipients. "Knowingly relying" means you have
|
|
||||||
actual knowledge that, but for the patent license, your conveying the
|
|
||||||
covered work in a country, or your recipient's use of the covered work
|
|
||||||
in a country, would infringe one or more identifiable patents in that
|
|
||||||
country that you have reason to believe are valid.
|
|
||||||
|
|
||||||
If, pursuant to or in connection with a single transaction or
|
|
||||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
|
||||||
covered work, and grant a patent license to some of the parties
|
|
||||||
receiving the covered work authorizing them to use, propagate, modify
|
|
||||||
or convey a specific copy of the covered work, then the patent license
|
|
||||||
you grant is automatically extended to all recipients of the covered
|
|
||||||
work and works based on it.
|
|
||||||
|
|
||||||
A patent license is "discriminatory" if it does not include within
|
|
||||||
the scope of its coverage, prohibits the exercise of, or is
|
|
||||||
conditioned on the non-exercise of one or more of the rights that are
|
|
||||||
specifically granted under this License. You may not convey a covered
|
|
||||||
work if you are a party to an arrangement with a third party that is
|
|
||||||
in the business of distributing software, under which you make payment
|
|
||||||
to the third party based on the extent of your activity of conveying
|
|
||||||
the work, and under which the third party grants, to any of the
|
|
||||||
parties who would receive the covered work from you, a discriminatory
|
|
||||||
patent license (a) in connection with copies of the covered work
|
|
||||||
conveyed by you (or copies made from those copies), or (b) primarily
|
|
||||||
for and in connection with specific products or compilations that
|
|
||||||
contain the covered work, unless you entered into that arrangement,
|
|
||||||
or that patent license was granted, prior to 28 March 2007.
|
|
||||||
|
|
||||||
Nothing in this License shall be construed as excluding or limiting
|
|
||||||
any implied license or other defenses to infringement that may
|
|
||||||
otherwise be available to you under applicable patent law.
|
|
||||||
|
|
||||||
12. No Surrender of Others' Freedom.
|
|
||||||
|
|
||||||
If conditions are imposed on you (whether by court order, agreement or
|
|
||||||
otherwise) that contradict the conditions of this License, they do not
|
|
||||||
excuse you from the conditions of this License. If you cannot convey a
|
|
||||||
covered work so as to satisfy simultaneously your obligations under this
|
|
||||||
License and any other pertinent obligations, then as a consequence you may
|
|
||||||
not convey it at all. For example, if you agree to terms that obligate you
|
|
||||||
to collect a royalty for further conveying from those to whom you convey
|
|
||||||
the Program, the only way you could satisfy both those terms and this
|
|
||||||
License would be to refrain entirely from conveying the Program.
|
|
||||||
|
|
||||||
13. Use with the GNU Affero General Public License.
|
|
||||||
|
|
||||||
Notwithstanding any other provision of this License, you have
|
|
||||||
permission to link or combine any covered work with a work licensed
|
|
||||||
under version 3 of the GNU Affero General Public License into a single
|
|
||||||
combined work, and to convey the resulting work. The terms of this
|
|
||||||
License will continue to apply to the part which is the covered work,
|
|
||||||
but the special requirements of the GNU Affero General Public License,
|
|
||||||
section 13, concerning interaction through a network will apply to the
|
|
||||||
combination as such.
|
|
||||||
|
|
||||||
14. Revised Versions of this License.
|
|
||||||
|
|
||||||
The Free Software Foundation may publish revised and/or new versions of
|
|
||||||
the GNU General Public License from time to time. Such new versions will
|
|
||||||
be similar in spirit to the present version, but may differ in detail to
|
|
||||||
address new problems or concerns.
|
|
||||||
|
|
||||||
Each version is given a distinguishing version number. If the
|
|
||||||
Program specifies that a certain numbered version of the GNU General
|
|
||||||
Public License "or any later version" applies to it, you have the
|
|
||||||
option of following the terms and conditions either of that numbered
|
|
||||||
version or of any later version published by the Free Software
|
|
||||||
Foundation. If the Program does not specify a version number of the
|
|
||||||
GNU General Public License, you may choose any version ever published
|
|
||||||
by the Free Software Foundation.
|
|
||||||
|
|
||||||
If the Program specifies that a proxy can decide which future
|
|
||||||
versions of the GNU General Public License can be used, that proxy's
|
|
||||||
public statement of acceptance of a version permanently authorizes you
|
|
||||||
to choose that version for the Program.
|
|
||||||
|
|
||||||
Later license versions may give you additional or different
|
|
||||||
permissions. However, no additional obligations are imposed on any
|
|
||||||
author or copyright holder as a result of your choosing to follow a
|
|
||||||
later version.
|
|
||||||
|
|
||||||
15. Disclaimer of Warranty.
|
|
||||||
|
|
||||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
|
||||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
|
||||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
|
||||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
|
||||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
||||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
|
||||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
|
||||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
|
||||||
|
|
||||||
16. Limitation of Liability.
|
|
||||||
|
|
||||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
|
||||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
|
||||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
|
||||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
|
||||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
|
||||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
|
||||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
|
||||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
|
||||||
SUCH DAMAGES.
|
|
||||||
|
|
||||||
17. Interpretation of Sections 15 and 16.
|
|
||||||
|
|
||||||
If the disclaimer of warranty and limitation of liability provided
|
|
||||||
above cannot be given local legal effect according to their terms,
|
|
||||||
reviewing courts shall apply local law that most closely approximates
|
|
||||||
an absolute waiver of all civil liability in connection with the
|
|
||||||
Program, unless a warranty or assumption of liability accompanies a
|
|
||||||
copy of the Program in return for a fee.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
How to Apply These Terms to Your New Programs
|
|
||||||
|
|
||||||
If you develop a new program, and you want it to be of the greatest
|
|
||||||
possible use to the public, the best way to achieve this is to make it
|
|
||||||
free software which everyone can redistribute and change under these terms.
|
|
||||||
|
|
||||||
To do so, attach the following notices to the program. It is safest
|
|
||||||
to attach them to the start of each source file to most effectively
|
|
||||||
state the exclusion of warranty; and each file should have at least
|
|
||||||
the "copyright" line and a pointer to where the full notice is found.
|
|
||||||
|
|
||||||
<one line to give the program's name and a brief idea of what it does.>
|
|
||||||
Copyright (C) <year> <name of author>
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
|
||||||
|
|
||||||
If the program does terminal interaction, make it output a short
|
|
||||||
notice like this when it starts in an interactive mode:
|
|
||||||
|
|
||||||
<program> Copyright (C) <year> <name of author>
|
|
||||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
|
||||||
This is free software, and you are welcome to redistribute it
|
|
||||||
under certain conditions; type `show c' for details.
|
|
||||||
|
|
||||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
|
||||||
parts of the General Public License. Of course, your program's commands
|
|
||||||
might be different; for a GUI interface, you would use an "about box".
|
|
||||||
|
|
||||||
You should also get your employer (if you work as a programmer) or school,
|
|
||||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
|
||||||
For more information on this, and how to apply and follow the GNU GPL, see
|
|
||||||
<https://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
The GNU General Public License does not permit incorporating your program
|
|
||||||
into proprietary programs. If your program is a subroutine library, you
|
|
||||||
may consider it more useful to permit linking proprietary applications with
|
|
||||||
the library. If this is what you want to do, use the GNU Lesser General
|
|
||||||
Public License instead of this License. But first, please read
|
|
||||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
# This file configures the analyzer, which statically analyzes Dart code to
|
|
||||||
# check for errors, warnings, and lints.
|
|
||||||
#
|
|
||||||
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
|
|
||||||
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
|
|
||||||
# invoked from the command line by running `flutter analyze`.
|
|
||||||
|
|
||||||
# The following line activates a set of recommended lints for Flutter apps,
|
|
||||||
# packages, and plugins designed to encourage good coding practices.
|
|
||||||
include: package:flutter_lints/flutter.yaml
|
|
||||||
|
|
||||||
linter:
|
|
||||||
# The lint rules applied to this project can be customized in the
|
|
||||||
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
|
|
||||||
# included above or to enable additional rules. A list of all available lints
|
|
||||||
# and their documentation is published at
|
|
||||||
# https://dart-lang.github.io/linter/lints/index.html.
|
|
||||||
#
|
|
||||||
# Instead of disabling a lint rule for the entire project in the
|
|
||||||
# section below, it can also be suppressed for a single line of code
|
|
||||||
# or a specific dart file by using the `// ignore: name_of_lint` and
|
|
||||||
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
|
|
||||||
# producing the lint.
|
|
||||||
rules:
|
|
||||||
# avoid_print: false # Uncomment to disable the `avoid_print` rule
|
|
||||||
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
|
|
||||||
# Additional information about this file can be found at
|
|
||||||
# https://dart.dev/guides/language/analysis-options
|
|
||||||