Merge branch 'master' into bug-fixes

This commit is contained in:
Márton Kiss
2023-06-08 19:59:57 +02:00
committed by GitHub
17 changed files with 152 additions and 87 deletions

View File

@@ -214,25 +214,25 @@ class _GradeSubjectViewState extends State<GradeSubjectView> {
gradeCalc(context);
},
),
FloatingActionButton.small(
child: const Icon(FeatherIcons.flag, size: 20.0),
backgroundColor: Theme.of(context).colorScheme.secondary,
onPressed: () {
if (!Provider.of<PremiumProvider>(context, listen: false)
.hasScope(PremiumScopes.goalPlanner)) {
PremiumLockedFeatureUpsell.show(
context: context, feature: PremiumFeature.goalplanner);
return;
}
// FloatingActionButton.small(
// child: const Icon(FeatherIcons.flag, size: 20.0),
// backgroundColor: Theme.of(context).colorScheme.secondary,
// onPressed: () {
// if (!Provider.of<PremiumProvider>(context, listen: false)
// .hasScope(PremiumScopes.goalPlanner)) {
// PremiumLockedFeatureUpsell.show(
// context: context, feature: PremiumFeature.goalplanner);
// return;
// }
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(content: Text("Hamarosan...")));
// ScaffoldMessenger.of(context).showSnackBar(
// const SnackBar(content: Text("Hamarosan...")));
//Navigator.of(context).push(CupertinoPageRoute(
//builder: (context) => PremiumGoalplannerNewGoalScreen(
// subject: widget.subject)));
},
),
// Navigator.of(context).push(CupertinoPageRoute(
// builder: (context) => PremiumGoalplannerNewGoalScreen(
// subject: widget.subject)));
// },
// ),
],
),
),

View File

@@ -11,7 +11,7 @@ extension Localization on String {
"happybirthday": "🎂 Happy birthday, %s!",
"merryxmas": "🎄 Merry Christmas, %s!",
"happynewyear": "🎉 Happy New Year, %s!",
"refilcopen": "🎈 Welcome to reFilc, %s!",
"refilcopen": "🎈 reFilc is 1 year old, %s!",
"empty": "Nothing to see here.",
"All": "All",
"Grades": "Grades",
@@ -30,7 +30,7 @@ extension Localization on String {
"happybirthday": "🎂 Boldog születésnapot, %s!",
"merryxmas": "🎄 Boldog Karácsonyt, %s!",
"happynewyear": "🎉 Boldog új évet, %s!",
"refilcopen": "🎈 Üdv a reFilc-ben, %s!",
"refilcopen": "🎈 1 éves a reFilc, %s!",
"empty": "Nincs itt semmi látnivaló.",
"All": "Összes",
"Grades": "Jegyek",
@@ -49,7 +49,7 @@ extension Localization on String {
"happybirthday": "🎂 Alles Gute zum Geburtstag, %s!",
"merryxmas": "🎄 Frohe Weihnachten, %s!",
"happynewyear": "🎉 Frohes neues Jahr, %s!",
"refilcopen": "🎈 Willkommen bei reFilc, %s!",
"refilcopen": "🎈 reFilc ist 1 Jahr alt, %s!",
"empty": "Hier gibt es nichts zu sehen.",
"All": "Alles",
"Grades": "Noten",

View File

@@ -2,7 +2,8 @@ import 'package:filcnaplo_kreta_api/models/school.dart';
import 'package:flutter/material.dart';
class SchoolInputTile extends StatelessWidget {
const SchoolInputTile({Key? key, required this.school, this.onTap}) : super(key: key);
const SchoolInputTile({Key? key, required this.school, this.onTap})
: super(key: key);
final School school;
final Function()? onTap;

View File

@@ -634,7 +634,7 @@ class _SettingsScreenState extends State<SettingsScreen>
? Theme.of(context).colorScheme.secondary
: AppColors.of(context).text.withOpacity(.25),
),
const SizedBox(width: 24.0),
const SizedBox(width: 14.0),
Expanded(
child: Text(
"graph_class_avg".i18n,
@@ -679,7 +679,7 @@ class _SettingsScreenState extends State<SettingsScreen>
? Theme.of(context).colorScheme.secondary
: AppColors.of(context).text.withOpacity(.25),
),
const SizedBox(width: 24.0),
const SizedBox(width: 14.0),
Expanded(
child: Text(
"news".i18n,
@@ -724,7 +724,7 @@ class _SettingsScreenState extends State<SettingsScreen>
? Theme.of(context).colorScheme.secondary
: AppColors.of(context).text.withOpacity(.25),
),
const SizedBox(width: 24.0),
const SizedBox(width: 14.0),
Expanded(
child: Text(
"surprise_grades".i18n,

View File

@@ -0,0 +1,10 @@
import 'package:flutter/material.dart';
class GradesBody extends StatelessWidget {
const GradesBody({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Column();
}
}

View File

@@ -0,0 +1,10 @@
import 'package:flutter/material.dart';
class PersonalityBody extends StatelessWidget {
const PersonalityBody({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Column();
}
}

View File

@@ -0,0 +1,55 @@
import 'package:flutter/material.dart';
import 'pages/grades_page.dart';
class SummaryScreen extends StatefulWidget {
final String currentPage;
const SummaryScreen({Key? key, this.currentPage = 'personality'})
: super(key: key);
@override
_SummaryScreenState createState() => _SummaryScreenState();
}
class _SummaryScreenState extends State<SummaryScreen> {
final LinearGradient _backgroundGradient = const LinearGradient(
colors: [
Color(0xff1d56ac),
Color(0xff170a3d),
],
begin: Alignment(-0.8, -1.0),
end: Alignment(0.8, 1.0),
stops: [-1.0, 1.0],
);
@override
Widget build(BuildContext context) {
return Scaffold(
body: Container(
decoration: BoxDecoration(gradient: _backgroundGradient),
child: Container(
decoration: BoxDecoration(gradient: _backgroundGradient),
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height,
child: SafeArea(
child: Padding(
padding: EdgeInsets.only(
left: 24.0,
right: 24.0,
top: 26.0 + MediaQuery.of(context).padding.top,
bottom: 52.0,
),
child: widget.currentPage == 'grades'
? const GradesBody()
: widget.currentPage == 'lessons'
? const GradesBody()
: widget.currentPage == 'allsum'
? const GradesBody()
: const GradesBody(),
),
),
),
),
);
}
}

View File

@@ -0,0 +1,15 @@
import 'package:i18n_extension/i18n_extension.dart';
extension SettingsLocalization on String {
static final _t = Translations.byLocale("hu_hu") +
{
"en_en": {},
"hu_hu": {},
"de_de": {},
};
String get i18n => localize(this, _t);
String fill(List<Object> params) => localizeFill(this, params);
String plural(int value) => localizePlural(value, this, _t);
String version(Object modifier) => localizeVersion(modifier, this, _t);
}