forked from firka/student-legacy
sticker map shit
This commit is contained in:
parent
f4fd9a3c2f
commit
d842b2d588
@ -42,7 +42,6 @@ import 'package:refilc_mobile_ui/screens/settings/notifications_screen.dart';
|
||||
import 'package:refilc_mobile_ui/screens/settings/privacy_view.dart';
|
||||
import 'package:refilc_mobile_ui/screens/settings/settings_helper.dart';
|
||||
import 'package:refilc_mobile_ui/screens/settings/submenu/extras_screen.dart';
|
||||
import 'package:refilc_mobile_ui/screens/settings/submenu/other_screen.dart';
|
||||
import 'package:refilc_mobile_ui/screens/settings/submenu/personalize_screen.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
// import 'package:refilc_plus/models/premium_scopes.dart';
|
||||
@ -906,18 +905,18 @@ class SettingsScreenState extends State<SettingsScreen>
|
||||
),
|
||||
],
|
||||
),
|
||||
const SplittedPanel(
|
||||
padding: EdgeInsets.only(top: 8.0),
|
||||
cardPadding: EdgeInsets.all(4.0),
|
||||
children: [
|
||||
MenuOtherSettings(
|
||||
borderRadius: BorderRadius.vertical(
|
||||
top: Radius.circular(12.0),
|
||||
bottom: Radius.circular(12.0),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
// const SplittedPanel(
|
||||
// padding: EdgeInsets.only(top: 8.0),
|
||||
// cardPadding: EdgeInsets.all(4.0),
|
||||
// children: [
|
||||
// MenuOtherSettings(
|
||||
// borderRadius: BorderRadius.vertical(
|
||||
// top: Radius.circular(12.0),
|
||||
// bottom: Radius.circular(12.0),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
],
|
||||
),
|
||||
),
|
||||
@ -925,8 +924,8 @@ class SettingsScreenState extends State<SettingsScreen>
|
||||
// // icon gallery (debug mode)
|
||||
if (kDebugMode)
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 12.0, horizontal: 24.0),
|
||||
padding: const EdgeInsets.only(
|
||||
bottom: 16.0, left: 24.0, right: 24.0),
|
||||
child: Panel(
|
||||
title: const Text("Debug"),
|
||||
child: Column(
|
||||
@ -949,6 +948,28 @@ class SettingsScreenState extends State<SettingsScreen>
|
||||
),
|
||||
),
|
||||
|
||||
// other secion
|
||||
SplittedPanel(
|
||||
title: Text("other".i18n),
|
||||
cardPadding: const EdgeInsets.all(4.0),
|
||||
children: [
|
||||
PanelButton(
|
||||
leading: Icon(
|
||||
FeatherIcons.map,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(0.95),
|
||||
),
|
||||
title: Text("stickermap".i18n),
|
||||
onPressed: () =>
|
||||
launchUrl(Uri.parse("https://stickermap.refilc.hu")),
|
||||
borderRadius: const BorderRadius.vertical(
|
||||
top: Radius.circular(12.0),
|
||||
bottom: Radius.circular(4.0),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
// // extra settings
|
||||
// Padding(
|
||||
// padding:
|
||||
|
@ -129,6 +129,8 @@ extension SettingsLocalization on String {
|
||||
"grade_exporting": "Grade Exporting",
|
||||
"custom": "Custom",
|
||||
"feedback": "Feedback",
|
||||
"other": "Other",
|
||||
"stickermap": "Sticker Map",
|
||||
},
|
||||
"hu_hu": {
|
||||
"heads_up": "Figyelem!",
|
||||
@ -256,6 +258,8 @@ extension SettingsLocalization on String {
|
||||
"grade_exporting": "Jegy exportálás",
|
||||
"custom": "Egyedi",
|
||||
"feedback": "Visszajelzés",
|
||||
"other": "Egyéb",
|
||||
"stickermap": "Matrica térkép",
|
||||
},
|
||||
"de_de": {
|
||||
"heads_up": "Achtung!",
|
||||
@ -383,6 +387,8 @@ extension SettingsLocalization on String {
|
||||
"grade_exporting": "Noten exportieren",
|
||||
"custom": "Benutzerdefiniert",
|
||||
"feedback": "Feedback",
|
||||
"other": "Sonstiges",
|
||||
"stickermap": "Sticker Map",
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -1,131 +0,0 @@
|
||||
// import 'package:refilc/models/settings.dart';
|
||||
import 'package:refilc/api/providers/user_provider.dart';
|
||||
import 'package:refilc/models/settings.dart';
|
||||
import 'package:refilc/theme/colors/colors.dart';
|
||||
import 'package:refilc_mobile_ui/common/panel/panel_button.dart';
|
||||
import 'package:refilc_mobile_ui/common/splitted_panel/splitted_panel.dart';
|
||||
import 'package:refilc_mobile_ui/screens/settings/settings_helper.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_feather_icons/flutter_feather_icons.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:refilc_plus/ui/mobile/settings/submenu/calendar_sync.dart';
|
||||
import 'package:refilc_plus/ui/mobile/settings/submenu/grade_exporting.dart';
|
||||
import 'package:refilc_plus/models/premium_scopes.dart';
|
||||
import 'package:refilc_plus/providers/plus_provider.dart';
|
||||
import 'package:refilc_plus/ui/mobile/plus/upsell.dart';
|
||||
import 'package:refilc_plus/ui/mobile/settings/welcome_message.dart';
|
||||
// import 'package:provider/provider.dart';
|
||||
import 'submenu_screen.i18n.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
final Uri _url = Uri.parse('https://stickermap.refilc.hu');
|
||||
|
||||
class MenuOtherSettings extends StatelessWidget {
|
||||
const MenuOtherSettings({
|
||||
super.key,
|
||||
this.borderRadius = const BorderRadius.vertical(
|
||||
top: Radius.circular(4.0), bottom: Radius.circular(4.0)),
|
||||
});
|
||||
|
||||
final BorderRadius borderRadius;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return PanelButton(
|
||||
onPressed: () => Navigator.of(context, rootNavigator: true).push(
|
||||
CupertinoPageRoute(builder: (context) => const ExtrasSettingsScreen()),
|
||||
),
|
||||
title: Text("other".i18n),
|
||||
leading: Icon(
|
||||
FeatherIcons.hash,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(0.95),
|
||||
),
|
||||
trailing: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Icon(
|
||||
FeatherIcons.chevronRight,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(0.95),
|
||||
)
|
||||
],
|
||||
),
|
||||
borderRadius: borderRadius,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class ExtrasSettingsScreen extends StatefulWidget {
|
||||
const ExtrasSettingsScreen({super.key});
|
||||
|
||||
@override
|
||||
ExtrasSettingsScreenState createState() => ExtrasSettingsScreenState();
|
||||
}
|
||||
|
||||
class ExtrasSettingsScreenState extends State<ExtrasSettingsScreen> {
|
||||
late SettingsProvider settingsProvider;
|
||||
late UserProvider user;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
SettingsProvider settingsProvider = Provider.of<SettingsProvider>(context);
|
||||
UserProvider user = Provider.of<UserProvider>(context);
|
||||
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
surfaceTintColor: Theme.of(context).scaffoldBackgroundColor,
|
||||
leading: BackButton(color: AppColors.of(context).text),
|
||||
title: Text(
|
||||
"other".i18n,
|
||||
style: TextStyle(color: AppColors.of(context).text),
|
||||
),
|
||||
),
|
||||
body: SingleChildScrollView(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 16.0, horizontal: 24.0),
|
||||
child: Column(
|
||||
children: [
|
||||
SplittedPanel(
|
||||
padding: const EdgeInsets.only(top: 9.0),
|
||||
cardPadding: const EdgeInsets.all(4.0),
|
||||
isSeparated: true,
|
||||
children: [
|
||||
PanelButton(
|
||||
onPressed: _launchUrl,
|
||||
title: Text(
|
||||
"stickermap".i18n,
|
||||
style: TextStyle(
|
||||
color: AppColors.of(context).text.withOpacity(.95),
|
||||
),
|
||||
),
|
||||
leading: Icon(
|
||||
FeatherIcons.navigation,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(.95),
|
||||
),
|
||||
trailing: Icon(
|
||||
FeatherIcons.chevronRight,
|
||||
size: 22.0,
|
||||
color: AppColors.of(context).text.withOpacity(0.95),
|
||||
),
|
||||
borderRadius: const BorderRadius.vertical(
|
||||
top: Radius.circular(4.0),
|
||||
bottom: Radius.circular(4.0)),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> _launchUrl() async {
|
||||
if (!await launchUrl(_url)) {
|
||||
throw Exception('Could not launch $_url');
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user