diff --git a/.gitignore b/.gitignore index 5d5b2bc..5629c09 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ termek.txt .DS_Store filc3.properties +local.properties # Files and directories created by pub .dart_tool/ .packages diff --git a/filcnaplo/android/app/src/main/res/drawable-v21/launch_background.xml b/filcnaplo/android/app/src/main/res/drawable-v21/launch_background.xml index 51cb1b4..3cc4948 100644 --- a/filcnaplo/android/app/src/main/res/drawable-v21/launch_background.xml +++ b/filcnaplo/android/app/src/main/res/drawable-v21/launch_background.xml @@ -1,9 +1,9 @@ - - - - - - - - - + + + + + + + + + diff --git a/filcnaplo/android/app/src/main/res/drawable/launch_background.xml b/filcnaplo/android/app/src/main/res/drawable/launch_background.xml index 51cb1b4..3cc4948 100644 --- a/filcnaplo/android/app/src/main/res/drawable/launch_background.xml +++ b/filcnaplo/android/app/src/main/res/drawable/launch_background.xml @@ -1,9 +1,9 @@ - - - - - - - - - + + + + + + + + + diff --git a/filcnaplo/android/app/src/main/res/values-v31/styles.xml b/filcnaplo/android/app/src/main/res/values-v31/styles.xml deleted file mode 100644 index 5ec5068..0000000 --- a/filcnaplo/android/app/src/main/res/values-v31/styles.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/filcnaplo/android/app/src/main/res/values/styles.xml b/filcnaplo/android/app/src/main/res/values/styles.xml index 7992e45..30e86bc 100644 --- a/filcnaplo/android/app/src/main/res/values/styles.xml +++ b/filcnaplo/android/app/src/main/res/values/styles.xml @@ -1,30 +1,30 @@ - - - - + Flutter draws its first frame --> + @drawable/launch_background + false + false + false + shortEdges + - - - - + This Theme is only used starting with V2 of Flutter's Android embedding. --> + + + + diff --git a/filcnaplo/android/build.gradle b/filcnaplo/android/build.gradle index ecbea63..08eb4c9 100644 --- a/filcnaplo/android/build.gradle +++ b/filcnaplo/android/build.gradle @@ -1,5 +1,5 @@ buildscript { - ext.kotlin_version = '1.6.10' + ext.kotlin_version = '1.8.21' ext { compileSdkVersion = 33 diff --git a/filcnaplo/android/gradle.properties b/filcnaplo/android/gradle.properties index 7f55add..183b8aa 100644 --- a/filcnaplo/android/gradle.properties +++ b/filcnaplo/android/gradle.properties @@ -1,4 +1,8 @@ -org.gradle.jvmargs=-Xmx1536M +org.gradle.jvmargs=-Xmx1536M \ +--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.enableJetifier=true -org.gradle.java.home=C:\\Program Files\\Java\\jdk-14.0.2 diff --git a/filcnaplo/android/gradle/wrapper/gradle-wrapper.properties b/filcnaplo/android/gradle/wrapper/gradle-wrapper.properties index b9f4649..51d7af8 100644 --- a/filcnaplo/android/gradle/wrapper/gradle-wrapper.properties +++ b/filcnaplo/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip +distributionUrl=https://services.gradle.org/distributions/gradle-7.3.3-all.zip diff --git a/filcnaplo/ios/Runner/Assets.xcassets/LaunchBackground.imageset/Contents.json b/filcnaplo/ios/Runner/Assets.xcassets/LaunchBackground.imageset/Contents.json index 98c5509..9f447e1 100644 --- a/filcnaplo/ios/Runner/Assets.xcassets/LaunchBackground.imageset/Contents.json +++ b/filcnaplo/ios/Runner/Assets.xcassets/LaunchBackground.imageset/Contents.json @@ -1,21 +1,21 @@ -{ - "images" : [ - { - "filename" : "background.png", - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} +{ + "images" : [ + { + "filename" : "background.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/filcnaplo/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/filcnaplo/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json index 97a1d4b..00cabce 100644 --- a/filcnaplo/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json +++ b/filcnaplo/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -1,23 +1,23 @@ -{ - "images" : [ - { - "filename" : "LaunchImage.png", - "idiom" : "universal", - "scale" : "1x" - }, - { - "filename" : "LaunchImage@2x.png", - "idiom" : "universal", - "scale" : "2x" - }, - { - "filename" : "LaunchImage@3x.png", - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} +{ + "images" : [ + { + "filename" : "LaunchImage.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "LaunchImage@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "LaunchImage@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/filcnaplo/ios/Runner/Base.lproj/LaunchScreen.storyboard b/filcnaplo/ios/Runner/Base.lproj/LaunchScreen.storyboard index 9322003..2876738 100644 --- a/filcnaplo/ios/Runner/Base.lproj/LaunchScreen.storyboard +++ b/filcnaplo/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -1,44 +1,44 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/filcnaplo/ios/Runner/Info.plist b/filcnaplo/ios/Runner/Info.plist index 79a4ae5..17a486b 100644 --- a/filcnaplo/ios/Runner/Info.plist +++ b/filcnaplo/ios/Runner/Info.plist @@ -1,71 +1,71 @@ - - BGTaskSchedulerPermittedIdentifiers - - com.transistorsoft.fetch - - CADisableMinimumFrameDurationOnPhone - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - Filc Napló - CFBundlePackageType - APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) - CFBundleSignature - ???? - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - ITSAppUsesNonExemptEncryption - - LSApplicationQueriesSchemes - - https - http - - LSRequiresIPhoneOS - - NSPhotoLibraryUsageDescription - The app requires the photo library to set a custom profile picture. - NSSupportsLiveActivities - - UIApplicationSupportsIndirectInputEvents - - UIBackgroundModes - - fetch - processing - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UIStatusBarHidden - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - + + BGTaskSchedulerPermittedIdentifiers + + com.transistorsoft.fetch + + CADisableMinimumFrameDurationOnPhone + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + Filc Napló + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + ITSAppUsesNonExemptEncryption + + LSApplicationQueriesSchemes + + https + http + + LSRequiresIPhoneOS + + NSPhotoLibraryUsageDescription + The app requires the photo library to set a custom profile picture. + NSSupportsLiveActivities + + UIApplicationSupportsIndirectInputEvents + + UIBackgroundModes + + fetch + processing + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIStatusBarHidden + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + + diff --git a/filcnaplo/lib/main.dart b/filcnaplo/lib/main.dart index 2266a84..7032313 100644 --- a/filcnaplo/lib/main.dart +++ b/filcnaplo/lib/main.dart @@ -15,7 +15,6 @@ void main() async { WidgetsBinding binding = WidgetsFlutterBinding.ensureInitialized(); binding.renderView.automaticSystemUiAdjustment = false; SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]); - // Startup Startup startup = Startup(); await startup.start(); @@ -26,7 +25,10 @@ void main() async { BackgroundFetch.registerHeadlessTask(backgroundHeadlessTask); // Run App - runApp(App(database: startup.database, settings: startup.settings, user: startup.user)); + runApp(App( + database: startup.database, + settings: startup.settings, + user: startup.user)); } class Startup { @@ -55,7 +57,8 @@ Widget errorBuilder(FlutterErrorDetails details) { if (!errorShown && details.exceptionAsString() != lastException) { errorShown = true; lastException = details.exceptionAsString(); - Navigator.of(context, rootNavigator: true).push(MaterialPageRoute(builder: (context) { + Navigator.of(context, rootNavigator: true) + .push(MaterialPageRoute(builder: (context) { if (kReleaseMode) { return ErrorReportScreen(details); } else { diff --git a/filcnaplo/pubspec.yaml b/filcnaplo/pubspec.yaml index 18eba36..9002804 100644 --- a/filcnaplo/pubspec.yaml +++ b/filcnaplo/pubspec.yaml @@ -71,7 +71,7 @@ dependencies: dev_dependencies: flutter_lints: ^2.0.1 flutter_launcher_icons: "^0.13.1" - #flutter_native_splash: "^2.3.0" + flutter_native_splash: "^2.3.0" sqflite_common_ffi: ^2.0.0+3 flutter: @@ -157,6 +157,8 @@ flutter_icons: flutter_native_splash: color: "#3D7BF4" image: "assets/icons/ic_splash.png" + android_12: + image: "assets/icons/ic_splash.png" android: true android_gravity: center ios: true diff --git a/filcnaplo_mobile_ui/lib/screens/login/login_screen.dart b/filcnaplo_mobile_ui/lib/screens/login/login_screen.dart index 44c00bf..34bf31c 100755 --- a/filcnaplo_mobile_ui/lib/screens/login/login_screen.dart +++ b/filcnaplo_mobile_ui/lib/screens/login/login_screen.dart @@ -33,9 +33,9 @@ class _LoginScreenState extends State { // Scaffold Gradient background final LinearGradient _backgroundGradient = const LinearGradient( colors: [ - Color(0xff20AC9B), - Color(0xff20AC9B), - Color(0xff123323), + Color.fromARGB(255, 61, 122, 244), + Color.fromARGB(255, 23, 77, 185), + Color.fromARGB(255, 7, 42, 112), ], begin: Alignment(-0.8, -1.0), end: Alignment(0.8, 1.0), @@ -61,7 +61,8 @@ class _LoginScreenState extends State { }); } else { ScaffoldMessenger.of(context).showSnackBar(CustomSnackBar( - content: Text("schools_error".i18n, style: const TextStyle(color: Colors.white)), + content: Text("schools_error".i18n, + style: const TextStyle(color: Colors.white)), backgroundColor: AppColors.of(context).red, context: context, )); @@ -109,16 +110,22 @@ class _LoginScreenState extends State { children: [ Padding( padding: const EdgeInsets.only(top: 8.0), - child: Opacity(child: Image.asset("assets/icons/ic_splash.png", color: Colors.black), opacity: 0.3), + child: Opacity( + child: Image.asset( + "assets/icons/ic_splash.png", + color: Colors.black), + opacity: 0.3), ), BackdropFilter( - filter: ImageFilter.blur(sigmaX: 6.0, sigmaY: 6.0), + filter: + ImageFilter.blur(sigmaX: 6.0, sigmaY: 6.0), child: Image.asset("assets/icons/ic_splash.png"), ) ], ), width: MediaQuery.of(context).size.width / 4, - margin: const EdgeInsets.only(left: 12.0, right: 12.0, bottom: 12.0), + margin: const EdgeInsets.only( + left: 12.0, right: 12.0, bottom: 12.0), ), ), ), @@ -249,17 +256,26 @@ class _LoginScreenState extends State { replacement: const Padding( padding: EdgeInsets.symmetric(vertical: 6.0), child: CircularProgressIndicator( - valueColor: AlwaysStoppedAnimation(Colors.white), + valueColor: + AlwaysStoppedAnimation(Colors.white), ), ), ), ), - if (_loginState == LoginState.missingFields || _loginState == LoginState.invalidGrant || _loginState == LoginState.failed) + if (_loginState == LoginState.missingFields || + _loginState == LoginState.invalidGrant || + _loginState == LoginState.failed) Padding( padding: const EdgeInsets.only(top: 8.0), child: Text( - ["missing_fields", "invalid_grant", "error"][_loginState.index].i18n, - style: const TextStyle(color: Colors.red, fontWeight: FontWeight.w500), + [ + "missing_fields", + "invalid_grant", + "error" + ][_loginState.index] + .i18n, + style: const TextStyle( + color: Colors.red, fontWeight: FontWeight.w500), ), ), const Spacer() @@ -276,7 +292,9 @@ class _LoginScreenState extends State { String username = usernameController.text; String password = passwordController.text; - if (username == "" || password == "" || schoolController.selectedSchool == null) { + if (username == "" || + password == "" || + schoolController.selectedSchool == null) { return setState(() => _loginState = LoginState.missingFields); } @@ -291,7 +309,8 @@ class _LoginScreenState extends State { ScaffoldMessenger.of(context).showSnackBar(CustomSnackBar( context: context, brightness: Brightness.light, - content: Text("welcome".i18n.fill([user.name]), overflow: TextOverflow.ellipsis), + content: Text("welcome".i18n.fill([user.name]), + overflow: TextOverflow.ellipsis), )); }, onSuccess: () { diff --git a/filcnaplo_premium/android/local.properties b/filcnaplo_premium/android/local.properties index ba0df0d..142a2c2 100644 --- a/filcnaplo_premium/android/local.properties +++ b/filcnaplo_premium/android/local.properties @@ -1,2 +1,2 @@ sdk.dir=C:\\Users\\Peti\\AppData\\Local\\Android\\sdk -flutter.sdk=/Users/kima/development/flutter \ No newline at end of file +flutter.sdk=D:\\flutter \ No newline at end of file