started creating end-year summary and stb

This commit is contained in:
Kima 2023-06-08 19:53:50 +02:00
parent e1f84caf19
commit 87f3f93177
6 changed files with 97 additions and 12 deletions

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

@ -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);
}

View File

@ -60,7 +60,11 @@ class _PremiumFSTimetableState extends State<PremiumFSTimetable> {
final colw = (MediaQuery.of(context).size.width - padding) / days.length;
return Scaffold(
appBar: buildAppBar(),
appBar: AppBar(
surfaceTintColor: Theme.of(context).scaffoldBackgroundColor,
leading: BackButton(color: AppColors.of(context).text),
shadowColor: Colors.transparent,
),
body: ListView.builder(
physics: const BouncingScrollPhysics(),
padding: const EdgeInsets.symmetric(horizontal: 6.0, vertical: 24.0),
@ -209,14 +213,4 @@ class _PremiumFSTimetableState extends State<PremiumFSTimetable> {
),
);
}
AppBar buildAppBar() {
return AppBar(
backgroundColor: Colors.transparent,
automaticallyImplyLeading: false,
actions: const [
BackButton(),
],
);
}
}