Merge branch 'dev' of github.com:refilc/naplo into dev

This commit is contained in:
Kima 2024-03-03 22:33:05 +01:00
commit 21ebbf224b
7 changed files with 89 additions and 215 deletions

View File

@ -29,6 +29,10 @@ def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file("key.properties")
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
def debugKeystoreProperties = new Properties()
def debugKeystorePropertiesFile = rootProject.file("debugkey.properties")
debugKeystoreProperties.load(new FileInputStream(debugKeystorePropertiesFile))
android {
ndkVersion "25.1.8937393"
@ -66,9 +70,9 @@ android {
signingConfigs {
debug {
keyAlias "androiddebugkey"
keyPassword "Jelszo123"
storeFile file("C:/Users/Kima/debugkeystore.jks")
storePassword "Jelszo123"
keyPassword "android"
storeFile file(debugKeystoreProperties['storeFile'])
storePassword "android"
}
release {

View File

@ -1,189 +0,0 @@
package io.flutter.plugins;
import androidx.annotation.Keep;
import androidx.annotation.NonNull;
import io.flutter.Log;
import io.flutter.embedding.engine.FlutterEngine;
/**
* Generated file. Do not edit.
* This file is generated by the Flutter tool based on the
* plugins that support the Android platform.
*/
@Keep
public final class GeneratedPluginRegistrant {
private static final String TAG = "GeneratedPluginRegistrant";
public static void registerWith(@NonNull FlutterEngine flutterEngine) {
try {
flutterEngine.getPlugins().add(new com.example.android_dynamic_icon.AndroidDynamicIconPlugin());
} catch (Exception e) {
Log.e(TAG, "Error registering plugin android_dynamic_icon, com.example.android_dynamic_icon.AndroidDynamicIconPlugin", e);
}
try {
flutterEngine.getPlugins().add(new me.wolszon.app_group_directory.AppGroupDirectoryPlugin());
} catch (Exception e) {
Log.e(TAG, "Error registering plugin app_group_directory, me.wolszon.app_group_directory.AppGroupDirectoryPlugin", e);
}
try {
flutterEngine.getPlugins().add(new com.transistorsoft.flutter.backgroundfetch.BackgroundFetchPlugin());
} catch (Exception e) {
Log.e(TAG, "Error registering plugin background_fetch, com.transistorsoft.flutter.backgroundfetch.BackgroundFetchPlugin", e);
}
try {
flutterEngine.getPlugins().add(new dev.fluttercommunity.plus.connectivity.ConnectivityPlugin());
} catch (Exception e) {
Log.e(TAG, "Error registering plugin connectivity_plus, dev.fluttercommunity.plus.connectivity.ConnectivityPlugin", e);
}
try {
flutterEngine.getPlugins().add(new io.material.plugins.dynamic_color.DynamicColorPlugin());
} catch (Exception e) {
Log.e(TAG, "Error registering plugin dynamic_color, io.material.plugins.dynamic_color.DynamicColorPlugin", e);
}
try {
flutterEngine.getPlugins().add(new com.mr.flutter.plugin.filepicker.FilePickerPlugin());
} catch (Exception e) {
Log.e(TAG, "Error registering plugin file_picker, com.mr.flutter.plugin.filepicker.FilePickerPlugin", e);
}
try {
flutterEngine.getPlugins().add(new com.jordyhers.flutter_any_logo.FlutterAnyLogoPlugin());
} catch (Exception e) {
Log.e(TAG, "Error registering plugin flutter_any_logo, com.jordyhers.flutter_any_logo.FlutterAnyLogoPlugin", e);
}
try {
flutterEngine.getPlugins().add(new com.github.droibit.flutter.plugins.customtabs.CustomTabsPlugin());
} catch (Exception e) {
Log.e(TAG, "Error registering plugin flutter_custom_tabs_android, com.github.droibit.flutter.plugins.customtabs.CustomTabsPlugin", e);
}
try {
flutterEngine.getPlugins().add(new com.ajinasokan.flutterdisplaymode.DisplayModePlugin());
} catch (Exception e) {
Log.e(TAG, "Error registering plugin flutter_displaymode, com.ajinasokan.flutterdisplaymode.DisplayModePlugin", e);
}
try {
flutterEngine.getPlugins().add(new io.github.tastelessjolt.flutterdynamicicon.FlutterDynamicIconPlugin());
} catch (Exception e) {
Log.e(TAG, "Error registering plugin flutter_dynamic_icon, io.github.tastelessjolt.flutterdynamicicon.FlutterDynamicIconPlugin", e);
}
try {
flutterEngine.getPlugins().add(new com.fluttercandies.flutter_image_compress.ImageCompressPlugin());
} catch (Exception e) {
Log.e(TAG, "Error registering plugin flutter_image_compress_common, com.fluttercandies.flutter_image_compress.ImageCompressPlugin", e);
}
try {
flutterEngine.getPlugins().add(new com.dexterous.flutterlocalnotifications.FlutterLocalNotificationsPlugin());
} catch (Exception e) {
Log.e(TAG, "Error registering plugin flutter_local_notifications, com.dexterous.flutterlocalnotifications.FlutterLocalNotificationsPlugin", e);
}
try {
flutterEngine.getPlugins().add(new com.example.flutternativeimage.FlutterNativeImagePlugin());
} catch (Exception e) {
Log.e(TAG, "Error registering plugin flutter_native_image, com.example.flutternativeimage.FlutterNativeImagePlugin", e);
}
try {
flutterEngine.getPlugins().add(new net.jonhanson.flutter_native_splash.FlutterNativeSplashPlugin());
} catch (Exception e) {
Log.e(TAG, "Error registering plugin flutter_native_splash, net.jonhanson.flutter_native_splash.FlutterNativeSplashPlugin", e);
}
try {
flutterEngine.getPlugins().add(new io.flutter.plugins.flutter_plugin_android_lifecycle.FlutterAndroidLifecyclePlugin());
} catch (Exception e) {
Log.e(TAG, "Error registering plugin flutter_plugin_android_lifecycle, io.flutter.plugins.flutter_plugin_android_lifecycle.FlutterAndroidLifecyclePlugin", e);
}
try {
flutterEngine.getPlugins().add(new io.flutter.plugins.googlesignin.GoogleSignInPlugin());
} catch (Exception e) {
Log.e(TAG, "Error registering plugin google_sign_in_android, io.flutter.plugins.googlesignin.GoogleSignInPlugin", e);
}
try {
flutterEngine.getPlugins().add(new es.antonborri.home_widget.HomeWidgetPlugin());
} catch (Exception e) {
Log.e(TAG, "Error registering plugin home_widget, es.antonborri.home_widget.HomeWidgetPlugin", e);
}
try {
flutterEngine.getPlugins().add(new com.lykhonis.imagecrop.ImageCropPlugin());
} catch (Exception e) {
Log.e(TAG, "Error registering plugin image_crop, com.lykhonis.imagecrop.ImageCropPlugin", e);
}
try {
flutterEngine.getPlugins().add(new com.example.imagegallerysaver.ImageGallerySaverPlugin());
} catch (Exception e) {
Log.e(TAG, "Error registering plugin image_gallery_saver, com.example.imagegallerysaver.ImageGallerySaverPlugin", e);
}
try {
flutterEngine.getPlugins().add(new io.flutter.plugins.imagepicker.ImagePickerPlugin());
} catch (Exception e) {
Log.e(TAG, "Error registering plugin image_picker_android, io.flutter.plugins.imagepicker.ImagePickerPlugin", e);
}
try {
flutterEngine.getPlugins().add(new com.flutter_live_activities.FlutterLiveActivitiesPlugin());
} catch (Exception e) {
Log.e(TAG, "Error registering plugin live_activities, com.flutter_live_activities.FlutterLiveActivitiesPlugin", e);
}
try {
flutterEngine.getPlugins().add(new com.example.maps_launcher.MapsLauncherPlugin());
} catch (Exception e) {
Log.e(TAG, "Error registering plugin maps_launcher, com.example.maps_launcher.MapsLauncherPlugin", e);
}
try {
flutterEngine.getPlugins().add(new com.crazecoder.openfile.OpenFilePlugin());
} catch (Exception e) {
Log.e(TAG, "Error registering plugin open_filex, com.crazecoder.openfile.OpenFilePlugin", e);
}
try {
flutterEngine.getPlugins().add(new dev.fluttercommunity.plus.packageinfo.PackageInfoPlugin());
} catch (Exception e) {
Log.e(TAG, "Error registering plugin package_info_plus, dev.fluttercommunity.plus.packageinfo.PackageInfoPlugin", e);
}
try {
flutterEngine.getPlugins().add(new io.flutter.plugins.pathprovider.PathProviderPlugin());
} catch (Exception e) {
Log.e(TAG, "Error registering plugin path_provider_android, io.flutter.plugins.pathprovider.PathProviderPlugin", e);
}
try {
flutterEngine.getPlugins().add(new com.baseflow.permissionhandler.PermissionHandlerPlugin());
} catch (Exception e) {
Log.e(TAG, "Error registering plugin permission_handler_android, com.baseflow.permissionhandler.PermissionHandlerPlugin", e);
}
try {
flutterEngine.getPlugins().add(new io.flutter.plugins.quickactions.QuickActionsPlugin());
} catch (Exception e) {
Log.e(TAG, "Error registering plugin quick_actions_android, io.flutter.plugins.quickactions.QuickActionsPlugin", e);
}
try {
flutterEngine.getPlugins().add(new app.rive.rive.RivePlugin());
} catch (Exception e) {
Log.e(TAG, "Error registering plugin rive_common, app.rive.rive.RivePlugin", e);
}
try {
flutterEngine.getPlugins().add(new dev.fluttercommunity.plus.share.SharePlusPlugin());
} catch (Exception e) {
Log.e(TAG, "Error registering plugin share_plus, dev.fluttercommunity.plus.share.SharePlusPlugin", e);
}
try {
flutterEngine.getPlugins().add(new com.tekartik.sqflite.SqflitePlugin());
} catch (Exception e) {
Log.e(TAG, "Error registering plugin sqflite, com.tekartik.sqflite.SqflitePlugin", e);
}
try {
flutterEngine.getPlugins().add(new com.flutter.stripe.StripeAndroidPlugin());
} catch (Exception e) {
Log.e(TAG, "Error registering plugin stripe_android, com.flutter.stripe.StripeAndroidPlugin", e);
}
try {
flutterEngine.getPlugins().add(new name.avioli.unilinks.UniLinksPlugin());
} catch (Exception e) {
Log.e(TAG, "Error registering plugin uni_links, name.avioli.unilinks.UniLinksPlugin", e);
}
try {
flutterEngine.getPlugins().add(new io.flutter.plugins.urllauncher.UrlLauncherPlugin());
} catch (Exception e) {
Log.e(TAG, "Error registering plugin url_launcher_android, io.flutter.plugins.urllauncher.UrlLauncherPlugin", e);
}
try {
flutterEngine.getPlugins().add(new dev.fluttercommunity.workmanager.WorkmanagerPlugin());
} catch (Exception e) {
Log.e(TAG, "Error registering plugin workmanager, dev.fluttercommunity.workmanager.WorkmanagerPlugin", e);
}
}
}

View File

@ -1,5 +0,0 @@
sdk.dir=C:\\Users\\Kima\\AppData\\Local\\Android\\sdk
flutter.sdk=C:\\src\\flutter
flutter.buildMode=debug
flutter.versionName=5.0.0
flutter.versionCode=241

View File

@ -24,7 +24,7 @@ class ActiveSponsorCard extends StatelessWidget {
return PremiumFeatureLevel.old;
}
IconData _levelIcon(PremiumFeatureLevel level) {
IconData? _levelIcon(PremiumFeatureLevel level) {
switch (level) {
case PremiumFeatureLevel.cap:
return FilcIcons.kupak;
@ -51,7 +51,7 @@ class ActiveSponsorCard extends StatelessWidget {
return const SizedBox();
}
Color glow;
Color? glow = Colors.white; //TODO: only temp fix kima
switch (level) {
case PremiumFeatureLevel.cap:
@ -73,7 +73,6 @@ class ActiveSponsorCard extends StatelessWidget {
glow = Colors.red;
break;
}
return Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20.0),

View File

@ -14,16 +14,12 @@ class ErrorReportScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.red,
backgroundColor: Color(0xFFE3EBFB),
body: SafeArea(
child: Padding(
padding: const EdgeInsets.all(12.0),
child: Column(
children: [
const Align(
alignment: Alignment.topLeft,
child: BackButton(),
),
const Spacer(),
const Icon(
FeatherIcons.alertTriangle,
@ -58,13 +54,25 @@ class ErrorReportScreen extends StatelessWidget {
width: double.infinity,
padding: const EdgeInsets.all(12.0),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12.0),
color: Colors.black.withOpacity(.2)),
borderRadius: BorderRadius.circular(12.0),
color: const Color(0xFFF7F9FC),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.2),
spreadRadius: 5,
blurRadius: 7,
offset:
const Offset(0, 3), // changes position of shadow
),
],
),
child: SingleChildScrollView(
physics: const BouncingScrollPhysics(),
child: Text(
details.exceptionAsString(),
style: const TextStyle(fontFamily: 'SpaceMono'),
style: const TextStyle(
fontFamily: 'GeistMono',
fontWeight: FontWeight.w500),
),
),
),
@ -85,7 +93,8 @@ class ErrorReportScreen extends StatelessWidget {
style: ButtonStyle(
padding: MaterialStateProperty.all(
const EdgeInsets.symmetric(vertical: 14.0)),
backgroundColor: MaterialStateProperty.all(Colors.white),
backgroundColor:
MaterialStateProperty.all(const Color(0xFF0E275A)),
shape: MaterialStateProperty.all(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12.0)),
@ -94,14 +103,42 @@ class ErrorReportScreen extends StatelessWidget {
child: Text(
"submit".i18n,
style: const TextStyle(
color: Colors.black,
fontSize: 17.0,
fontWeight: FontWeight.bold,
),
color: Color(0xFFF7F9FC),
fontSize: 18.0,
fontWeight: FontWeight.w700,
fontFamily: 'Montserrat'),
),
onPressed: () => reportProblem(context),
),
),
const SizedBox(height: 8),
SizedBox(
width: double.infinity,
child: OutlinedButton(
style: ButtonStyle(
padding: MaterialStateProperty.all(
const EdgeInsets.symmetric(vertical: 14.0)),
backgroundColor:
MaterialStateProperty.all(Color(0xFFF3F7FE)),
foregroundColor:
MaterialStateProperty.all(const Color(0xFFC7D3EB)),
shape: MaterialStateProperty.all(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12.0)),
),
),
child: Text(
"goback".i18n,
style: const TextStyle(
color: Color(0xFF011234),
fontSize: 18.0,
fontFamily: 'Montserrat',
fontWeight: FontWeight.w700,
),
),
onPressed: () => Navigator.maybePop(context),
),
),
const SizedBox(height: 32.0)
],
),

View File

@ -7,6 +7,7 @@ extension SettingsLocalization on String {
"uhoh": "Uh Oh!",
"description": "An error occurred!",
"submit": "Submit",
"goback": "Go back",
"details": "Details",
"error": "Error",
"os": "Operating System",
@ -17,7 +18,8 @@ extension SettingsLocalization on String {
"hu_hu": {
"uhoh": "Ajajj!",
"description": "Hiba történt!",
"submit": "Probléma Jelentése",
"submit": "Hiba jelentése",
"goback": "Vissza",
"details": "Részletek",
"error": "Hiba",
"os": "Operációs Rendszer",
@ -29,6 +31,7 @@ extension SettingsLocalization on String {
"uhoh": "Uh Oh!",
"description": "Ein Fehler ist aufgetreten!",
"submit": "Abschicken",
"goback": "Zurück",
"details": "Details",
"error": "Fehler",
"os": "Betriebssystem",

View File

@ -59,7 +59,8 @@ import 'package:refilc_mobile_ui/screens/settings/user/nickname.dart';
import 'package:refilc_mobile_ui/screens/settings/user/profile_pic.dart';
// import 'package:refilc_plus/ui/mobile/settings/modify_teacher_names.dart';
// import 'package:refilc_plus/ui/mobile/settings/welcome_message.dart';
import 'package:refilc_mobile_ui/screens/error_screen.dart';
import 'package:refilc_mobile_ui/screens/error_report_screen.dart';
import 'submenu/general_screen.dart';
class SettingsScreen extends StatefulWidget {
@ -198,6 +199,17 @@ class SettingsScreenState extends State<SettingsScreen>
vsync: this, duration: const Duration(milliseconds: 200));
}
void showErrorScreen(BuildContext context, FlutterErrorDetails details) {
Navigator.of(context, rootNavigator: true)
.push(MaterialPageRoute(builder: (context) {
if (kReleaseMode) {
return ErrorReportScreen(details);
} else {
return ErrorReportScreen(details);
}
}));
}
@override
Widget build(BuildContext context) {
user = Provider.of<UserProvider>(context);
@ -993,6 +1005,19 @@ class SettingsScreenState extends State<SettingsScreen>
),
],
),
ElevatedButton(
onPressed: () {
// Generate fake error details
FlutterErrorDetails fakeErrorDetails = FlutterErrorDetails(
exception: Exception('fasz'),
stack: StackTrace.current,
library: 'MyApp',
context: ErrorDescription('a kurva a-'),
);
showErrorScreen(context, fakeErrorDetails);
},
child: Text('hiba_tesztelese'),
),
// developer options
if (settings.developerMode)