forked from firka/student-legacy
commit
d65c722ef0
1
.gitignore
vendored
1
.gitignore
vendored
@ -48,3 +48,4 @@ filcnaplo/ios/Podfile.lock
|
||||
key.properties
|
||||
|
||||
.flutter-plugins*
|
||||
filcnaplo/ios/Flutter/flutter_export_environment 4.sh
|
||||
|
15
filcnaplo/ios/Flutter/Generated 4.xcconfig
Normal file
15
filcnaplo/ios/Flutter/Generated 4.xcconfig
Normal file
@ -0,0 +1,15 @@
|
||||
// This is a generated file; do not edit or check into version control.
|
||||
FLUTTER_ROOT=/Users/kima/src/flutter
|
||||
FLUTTER_APPLICATION_PATH=/Users/kima/Documents/refilc/app/naplo/filcnaplo
|
||||
COCOAPODS_PARALLEL_CODE_SIGN=true
|
||||
FLUTTER_TARGET=/Users/kima/Documents/refilc/app/naplo/filcnaplo/lib/main.dart
|
||||
FLUTTER_BUILD_DIR=build
|
||||
FLUTTER_BUILD_NAME=4.1.1
|
||||
FLUTTER_BUILD_NUMBER=216
|
||||
EXCLUDED_ARCHS[sdk=iphonesimulator*]=i386
|
||||
EXCLUDED_ARCHS[sdk=iphoneos*]=armv7
|
||||
DART_DEFINES=QVBQVkVSPTQuMS4x,RkxVVFRFUl9XRUJfQVVUT19ERVRFQ1Q9dHJ1ZQ==,RkxVVFRFUl9XRUJfQ0FOVkFTS0lUX1VSTD1odHRwczovL3d3dy5nc3RhdGljLmNvbS9mbHV0dGVyLWNhbnZhc2tpdC9jZGJlZGE3ODhhMjkzZmEyOTY2NWRjM2ZhM2Q2ZTYzYmQyMjFjYjBkLw==
|
||||
DART_OBFUSCATION=false
|
||||
TRACK_WIDGET_CREATION=true
|
||||
TREE_SHAKE_ICONS=false
|
||||
PACKAGE_CONFIG=/Users/kima/Documents/refilc/app/naplo/filcnaplo/.dart_tool/package_config.json
|
14
filcnaplo/ios/Flutter/Generated 5.xcconfig
Normal file
14
filcnaplo/ios/Flutter/Generated 5.xcconfig
Normal file
@ -0,0 +1,14 @@
|
||||
// This is a generated file; do not edit or check into version control.
|
||||
FLUTTER_ROOT=/Users/kima/src/flutter
|
||||
FLUTTER_APPLICATION_PATH=/Users/kima/Documents/refilc/app/naplo/filcnaplo
|
||||
COCOAPODS_PARALLEL_CODE_SIGN=true
|
||||
FLUTTER_TARGET=lib/main.dart
|
||||
FLUTTER_BUILD_DIR=build
|
||||
FLUTTER_BUILD_NAME=4.2.0
|
||||
FLUTTER_BUILD_NUMBER=220
|
||||
EXCLUDED_ARCHS[sdk=iphonesimulator*]=i386
|
||||
EXCLUDED_ARCHS[sdk=iphoneos*]=armv7
|
||||
DART_OBFUSCATION=false
|
||||
TRACK_WIDGET_CREATION=true
|
||||
TREE_SHAKE_ICONS=false
|
||||
PACKAGE_CONFIG=.dart_tool/package_config.json
|
13
filcnaplo/ios/Flutter/flutter_export_environment 3.sh
Executable file
13
filcnaplo/ios/Flutter/flutter_export_environment 3.sh
Executable file
@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
# This is a generated file; do not edit or check into version control.
|
||||
export "FLUTTER_ROOT=/Users/kima/src/flutter"
|
||||
export "FLUTTER_APPLICATION_PATH=/Users/kima/Documents/refilc/app/naplo/filcnaplo"
|
||||
export "COCOAPODS_PARALLEL_CODE_SIGN=true"
|
||||
export "FLUTTER_TARGET=lib/main.dart"
|
||||
export "FLUTTER_BUILD_DIR=build"
|
||||
export "FLUTTER_BUILD_NAME=4.2.0"
|
||||
export "FLUTTER_BUILD_NUMBER=220"
|
||||
export "DART_OBFUSCATION=false"
|
||||
export "TRACK_WIDGET_CREATION=true"
|
||||
export "TREE_SHAKE_ICONS=false"
|
||||
export "PACKAGE_CONFIG=.dart_tool/package_config.json"
|
13
filcnaplo/ios/Flutter/flutter_export_environment 5.sh
Executable file
13
filcnaplo/ios/Flutter/flutter_export_environment 5.sh
Executable file
@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
# This is a generated file; do not edit or check into version control.
|
||||
export "FLUTTER_ROOT=/Users/kima/src/flutter"
|
||||
export "FLUTTER_APPLICATION_PATH=/Users/kima/Documents/refilc/app/naplo/filcnaplo"
|
||||
export "COCOAPODS_PARALLEL_CODE_SIGN=true"
|
||||
export "FLUTTER_TARGET=lib/main.dart"
|
||||
export "FLUTTER_BUILD_DIR=build"
|
||||
export "FLUTTER_BUILD_NAME=4.2.0"
|
||||
export "FLUTTER_BUILD_NUMBER=220"
|
||||
export "DART_OBFUSCATION=false"
|
||||
export "TRACK_WIDGET_CREATION=true"
|
||||
export "TREE_SHAKE_ICONS=false"
|
||||
export "PACKAGE_CONFIG=.dart_tool/package_config.json"
|
@ -27,7 +27,7 @@ enum LoginState {
|
||||
failed,
|
||||
normal,
|
||||
inProgress,
|
||||
success
|
||||
success,
|
||||
}
|
||||
|
||||
Nonce getNonce(String nonce, String username, String instituteCode) {
|
||||
@ -39,7 +39,7 @@ Nonce getNonce(String nonce, String username, String instituteCode) {
|
||||
return nonceEncoder;
|
||||
}
|
||||
|
||||
Future loginApi({
|
||||
Future loginAPI({
|
||||
required String username,
|
||||
required String password,
|
||||
required String instituteCode,
|
||||
@ -101,27 +101,27 @@ Future loginApi({
|
||||
Provider.of<UserProvider>(context, listen: false).setUser(user.id);
|
||||
|
||||
// Get user data
|
||||
try {
|
||||
await Future.wait([
|
||||
Provider.of<GradeProvider>(context, listen: false).fetch(),
|
||||
Provider.of<TimetableProvider>(context, listen: false)
|
||||
.fetch(week: Week.current()),
|
||||
Provider.of<ExamProvider>(context, listen: false).fetch(),
|
||||
Provider.of<HomeworkProvider>(context, listen: false).fetch(),
|
||||
Provider.of<MessageProvider>(context, listen: false).fetchAll(),
|
||||
Provider.of<NoteProvider>(context, listen: false).fetch(),
|
||||
Provider.of<EventProvider>(context, listen: false).fetch(),
|
||||
Provider.of<AbsenceProvider>(context, listen: false).fetch(),
|
||||
]);
|
||||
} catch (error) {
|
||||
print("WARNING: failed to fetch user data: $error");
|
||||
}
|
||||
// try {
|
||||
await Future.wait([
|
||||
Provider.of<GradeProvider>(context, listen: false).fetch(),
|
||||
Provider.of<TimetableProvider>(context, listen: false)
|
||||
.fetch(week: Week.current()),
|
||||
Provider.of<ExamProvider>(context, listen: false).fetch(),
|
||||
Provider.of<HomeworkProvider>(context, listen: false).fetch(),
|
||||
Provider.of<MessageProvider>(context, listen: false).fetchAll(),
|
||||
Provider.of<NoteProvider>(context, listen: false).fetch(),
|
||||
Provider.of<EventProvider>(context, listen: false).fetch(),
|
||||
Provider.of<AbsenceProvider>(context, listen: false).fetch(),
|
||||
]);
|
||||
// } catch (error) {
|
||||
// print("WARNING: failed to fetch user data: $error");
|
||||
// }
|
||||
|
||||
if (onSuccess != null) onSuccess();
|
||||
|
||||
return LoginState.success;
|
||||
} catch (error) {
|
||||
print("ERROR: loginApi: $error");
|
||||
print("ERROR: loginAPI: $error");
|
||||
// maybe check debug mode
|
||||
// ScaffoldMessenger.of(context).showSnackBar(SnackBar(content: Text("ERROR: $error")));
|
||||
return LoginState.failed;
|
||||
|
@ -44,7 +44,8 @@ class LessonTile extends StatelessWidget {
|
||||
fillLeading = true;
|
||||
}
|
||||
|
||||
if (lesson.substituteTeacher?.name != "") {
|
||||
if (lesson.substituteTeacher != null &&
|
||||
lesson.substituteTeacher?.name != "") {
|
||||
fill = true;
|
||||
accent = AppColors.of(context).yellow;
|
||||
}
|
||||
|
@ -3,7 +3,7 @@ description: "Nem hivatalos e-napló alkalmazás az e-Kréta rendszerhez"
|
||||
homepage: https://refilc.hu
|
||||
publish_to: "none"
|
||||
|
||||
version: 4.2.0+220
|
||||
version: 4.2.1+221
|
||||
|
||||
environment:
|
||||
sdk: ">=2.17.0 <3.0.0"
|
||||
|
@ -235,7 +235,7 @@ class _LoginScreenState extends State<LoginScreen> {
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 15.0,
|
||||
)),
|
||||
onPressed: () => _loginApi(context: context),
|
||||
onPressed: () => _loginAPI(context: context),
|
||||
),
|
||||
visible: _loginState != LoginState.inProgress,
|
||||
replacement: const Padding(
|
||||
@ -279,7 +279,7 @@ class _LoginScreenState extends State<LoginScreen> {
|
||||
);
|
||||
}
|
||||
|
||||
void _loginApi({required BuildContext context}) {
|
||||
void _loginAPI({required BuildContext context}) {
|
||||
String username = usernameController.text;
|
||||
String password = passwordController.text;
|
||||
|
||||
@ -289,7 +289,7 @@ class _LoginScreenState extends State<LoginScreen> {
|
||||
|
||||
setState(() => _loginState = LoginState.inProgress);
|
||||
|
||||
loginApi(
|
||||
loginAPI(
|
||||
username: username,
|
||||
password: password,
|
||||
instituteCode: schoolController.selectedSchool!.instituteCode,
|
||||
|
@ -61,46 +61,48 @@ class Lesson {
|
||||
int get hashCode => id.hashCode;
|
||||
|
||||
factory Lesson.fromJson(Map json) {
|
||||
print(json['Allapot']);
|
||||
print(json['TanarNeve']);
|
||||
return Lesson(
|
||||
id: json["Uid"] ?? "",
|
||||
status:
|
||||
json["Allapot"] != null ? Category.fromJson(json["Allapot"]) : null,
|
||||
date: json["Datum"] != null
|
||||
? DateTime.parse(json["Datum"]).toLocal()
|
||||
: DateTime(0),
|
||||
subject: Subject.fromJson(json["Tantargy"] ?? {}),
|
||||
lessonIndex: json["Oraszam"] != null ? json["Oraszam"].toString() : "+",
|
||||
lessonYearIndex: json["OraEvesSorszama"],
|
||||
substituteTeacher:
|
||||
Teacher.fromString((json["HelyettesTanarNeve"] ?? "").trim()),
|
||||
teacher: Teacher.fromString((json["TanarNeve"] ?? "").trim()),
|
||||
homeworkEnabled: json["IsTanuloHaziFeladatEnabled"] ?? false,
|
||||
start: json["KezdetIdopont"] != null
|
||||
? DateTime.parse(json["KezdetIdopont"]).toLocal()
|
||||
: DateTime(0),
|
||||
studentPresence: json["TanuloJelenlet"] != null
|
||||
? (json["TanuloJelenlet"]["Nev"] ?? "") == "Hianyzas"
|
||||
? false
|
||||
: true
|
||||
: true,
|
||||
end: json["VegIdopont"] != null
|
||||
? DateTime.parse(json["VegIdopont"]).toLocal()
|
||||
: DateTime(0),
|
||||
homeworkId: json["HaziFeladatUid"] ?? "",
|
||||
exam: json["BejelentettSzamonkeresUid"] ?? "",
|
||||
type: json["Tipus"] != null ? Category.fromJson(json["Tipus"]) : null,
|
||||
description: json["Tema"] ?? "",
|
||||
room: ((json["TeremNeve"] ?? "").split("_").join(" ") as String)
|
||||
.replaceAll(RegExp(r" ?terem ?", caseSensitive: false), ""),
|
||||
groupName: json["OsztalyCsoport"] != null
|
||||
? json["OsztalyCsoport"]["Nev"] ?? ""
|
||||
: "",
|
||||
name: json["Nev"] ?? "",
|
||||
online: json["IsDigitalisOra"] ?? false,
|
||||
isEmpty: json['isEmpty'] ?? false,
|
||||
json: json,
|
||||
isSeen: false
|
||||
);
|
||||
id: json["Uid"] ?? "",
|
||||
status:
|
||||
json["Allapot"] != null ? Category.fromJson(json["Allapot"]) : null,
|
||||
date: json["Datum"] != null
|
||||
? DateTime.parse(json["Datum"]).toLocal()
|
||||
: DateTime(0),
|
||||
subject: Subject.fromJson(json["Tantargy"] ?? {}),
|
||||
lessonIndex: json["Oraszam"] != null ? json["Oraszam"].toString() : "+",
|
||||
lessonYearIndex: json["OraEvesSorszama"],
|
||||
substituteTeacher: json["HelyettesTanarNeve"] != null
|
||||
? Teacher.fromString((json["HelyettesTanarNeve"]).trim())
|
||||
: null,
|
||||
teacher: Teacher.fromString((json["TanarNeve"] ?? "").trim()),
|
||||
homeworkEnabled: json["IsTanuloHaziFeladatEnabled"] ?? false,
|
||||
start: json["KezdetIdopont"] != null
|
||||
? DateTime.parse(json["KezdetIdopont"]).toLocal()
|
||||
: DateTime(0),
|
||||
studentPresence: json["TanuloJelenlet"] != null
|
||||
? (json["TanuloJelenlet"]["Nev"] ?? "") == "Hianyzas"
|
||||
? false
|
||||
: true
|
||||
: true,
|
||||
end: json["VegIdopont"] != null
|
||||
? DateTime.parse(json["VegIdopont"]).toLocal()
|
||||
: DateTime(0),
|
||||
homeworkId: json["HaziFeladatUid"] ?? "",
|
||||
exam: json["BejelentettSzamonkeresUid"] ?? "",
|
||||
type: json["Tipus"] != null ? Category.fromJson(json["Tipus"]) : null,
|
||||
description: json["Tema"] ?? "",
|
||||
room: ((json["TeremNeve"] ?? "").split("_").join(" ") as String)
|
||||
.replaceAll(RegExp(r" ?terem ?", caseSensitive: false), ""),
|
||||
groupName: json["OsztalyCsoport"] != null
|
||||
? json["OsztalyCsoport"]["Nev"] ?? ""
|
||||
: "",
|
||||
name: json["Nev"] ?? "",
|
||||
online: json["IsDigitalisOra"] ?? false,
|
||||
isEmpty: json['isEmpty'] ?? false,
|
||||
json: json,
|
||||
isSeen: false);
|
||||
}
|
||||
|
||||
int? getFloor() {
|
||||
|
@ -22,7 +22,8 @@ class LessonView extends StatelessWidget {
|
||||
|
||||
if (RegExp(r'\d').hasMatch(lesson.lessonIndex)) lessonIndexTrailing = ".";
|
||||
|
||||
if (lesson.substituteTeacher?.name != "") {
|
||||
if (lesson.substituteTeacher != null &&
|
||||
lesson.substituteTeacher?.name != "") {
|
||||
accent = AppColors.of(context).yellow;
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// import 'dart:async';
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:filcnaplo/api/client.dart';
|
||||
@ -42,6 +43,8 @@ class _LoginScreenState extends State<LoginScreen> {
|
||||
stops: [-1.0, 0.0, 1.0],
|
||||
);
|
||||
|
||||
late String tempUsername = '';
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
@ -250,7 +253,7 @@ class _LoginScreenState extends State<LoginScreen> {
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 15.0,
|
||||
)),
|
||||
onPressed: () => _loginApi(context: context),
|
||||
onPressed: () => _loginAPI(context: context),
|
||||
),
|
||||
visible: _loginState != LoginState.inProgress,
|
||||
replacement: const Padding(
|
||||
@ -275,7 +278,10 @@ class _LoginScreenState extends State<LoginScreen> {
|
||||
][_loginState.index]
|
||||
.i18n,
|
||||
style: const TextStyle(
|
||||
color: Colors.red, fontWeight: FontWeight.w500),
|
||||
color: Colors.red,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
const Spacer()
|
||||
@ -288,35 +294,54 @@ class _LoginScreenState extends State<LoginScreen> {
|
||||
);
|
||||
}
|
||||
|
||||
void _loginApi({required BuildContext context}) {
|
||||
void _loginAPI({required BuildContext context}) {
|
||||
String username = usernameController.text;
|
||||
String password = passwordController.text;
|
||||
|
||||
tempUsername = username;
|
||||
|
||||
if (username == "" ||
|
||||
password == "" ||
|
||||
schoolController.selectedSchool == null) {
|
||||
return setState(() => _loginState = LoginState.missingFields);
|
||||
}
|
||||
|
||||
setState(() => _loginState = LoginState.inProgress);
|
||||
void _callAPI() {
|
||||
loginAPI(
|
||||
username: username,
|
||||
password: password,
|
||||
instituteCode: schoolController.selectedSchool!.instituteCode,
|
||||
context: context,
|
||||
onLogin: (user) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(CustomSnackBar(
|
||||
context: context,
|
||||
brightness: Brightness.light,
|
||||
content: Text("welcome".i18n.fill([user.name]),
|
||||
overflow: TextOverflow.ellipsis),
|
||||
));
|
||||
},
|
||||
onSuccess: () {
|
||||
ScaffoldMessenger.of(context).hideCurrentSnackBar();
|
||||
setSystemChrome(context);
|
||||
Navigator.of(context).pushReplacementNamed("login_to_navigation");
|
||||
}).then(
|
||||
(res) => setState(() {
|
||||
// if (res == LoginState.invalidGrant &&
|
||||
// tempUsername.replaceAll(username, '').length <= 3) {
|
||||
// tempUsername = username + ' ';
|
||||
// Timer(
|
||||
// const Duration(milliseconds: 500),
|
||||
// () => _loginAPI(context: context),
|
||||
// );
|
||||
// // _loginAPI(context: context);
|
||||
// } else {
|
||||
_loginState = res;
|
||||
// }
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
loginApi(
|
||||
username: username,
|
||||
password: password,
|
||||
instituteCode: schoolController.selectedSchool!.instituteCode,
|
||||
context: context,
|
||||
onLogin: (user) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(CustomSnackBar(
|
||||
context: context,
|
||||
brightness: Brightness.light,
|
||||
content: Text("welcome".i18n.fill([user.name]),
|
||||
overflow: TextOverflow.ellipsis),
|
||||
));
|
||||
},
|
||||
onSuccess: () {
|
||||
ScaffoldMessenger.of(context).hideCurrentSnackBar();
|
||||
setSystemChrome(context);
|
||||
Navigator.of(context).pushReplacementNamed("login_to_navigation");
|
||||
}).then((res) => setState(() => _loginState = res));
|
||||
setState(() => _loginState = LoginState.inProgress);
|
||||
_callAPI();
|
||||
}
|
||||
}
|
||||
|
@ -12,7 +12,8 @@ extension Localization on String {
|
||||
"login": "Log in",
|
||||
"welcome": "Welcome, %s!",
|
||||
"missing_fields": "Missing Fields!",
|
||||
"invalid_grant": "Invalid Username/Password!",
|
||||
"invalid_grant":
|
||||
"Invalid Username/Password! (Try adding spaces after Username)",
|
||||
"error": "Failed to log in.",
|
||||
"schools_error": "Failed to get schools."
|
||||
},
|
||||
@ -25,7 +26,8 @@ extension Localization on String {
|
||||
"login": "Belépés",
|
||||
"welcome": "Üdv, %s!",
|
||||
"missing_fields": "Hiányzó adatok!",
|
||||
"invalid_grant": "Helytelen Felhasználónév/Jelszó!",
|
||||
"invalid_grant":
|
||||
"Helytelen Felhasználónév/Jelszó! (Próbálj szóközöket írni a Felhasználónév után)",
|
||||
"error": "Sikertelen bejelentkezés.",
|
||||
"schools_error": "Nem sikerült lekérni az iskolákat."
|
||||
},
|
||||
|
@ -12,51 +12,48 @@ class SchoolInputTile extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(4.0),
|
||||
child: GestureDetector(
|
||||
onPanDown: (e) {
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
onTap!();
|
||||
},
|
||||
child: InkWell(
|
||||
onTapDown: (e) {},
|
||||
borderRadius: BorderRadius.circular(6.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(6.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// School name
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(bottom: 4.0),
|
||||
child: Text(
|
||||
school.name,
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: const TextStyle(fontWeight: FontWeight.w600),
|
||||
borderRadius: BorderRadius.circular(6.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(6.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// School name
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(bottom: 4.0),
|
||||
child: Text(
|
||||
school.name,
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: const TextStyle(fontWeight: FontWeight.w600),
|
||||
),
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
// School id
|
||||
Expanded(
|
||||
child: Text(
|
||||
school.instituteCode,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
// School id
|
||||
Expanded(
|
||||
child: Text(
|
||||
school.instituteCode,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
// School city
|
||||
Expanded(
|
||||
child: Text(
|
||||
school.city,
|
||||
textAlign: TextAlign.right,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
// School city
|
||||
Expanded(
|
||||
child: Text(
|
||||
school.city,
|
||||
textAlign: TextAlign.right,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -1,5 +1,6 @@
|
||||
import 'package:filcnaplo/api/providers/database_provider.dart';
|
||||
import 'package:filcnaplo/api/providers/user_provider.dart';
|
||||
import 'package:filcnaplo/theme/colors/colors.dart';
|
||||
import 'package:filcnaplo_kreta_api/models/subject.dart';
|
||||
import 'package:filcnaplo_mobile_ui/common/average_display.dart';
|
||||
import 'package:filcnaplo_premium/ui/mobile/goal_planner/goal_state_screen.i18n.dart';
|
||||
@ -33,7 +34,7 @@ class GoalCompleteModal extends StatelessWidget {
|
||||
child: Container(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
color: Theme.of(context).colorScheme.background,
|
||||
borderRadius: BorderRadius.circular(20.0),
|
||||
),
|
||||
child: Column(
|
||||
@ -79,19 +80,21 @@ class GoalCompleteModal extends StatelessWidget {
|
||||
Text(
|
||||
'congrats_title'.i18n,
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
fontSize: 27.0,
|
||||
fontWeight: FontWeight.w700,
|
||||
height: 1.1,
|
||||
height: 1.2,
|
||||
color: AppColors.of(context).text,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'goal_reached'.i18n.fill(['20']),
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
fontSize: 15.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
height: 1.1,
|
||||
color: AppColors.of(context).text,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 18.0),
|
||||
@ -103,9 +106,10 @@ class GoalCompleteModal extends StatelessWidget {
|
||||
Text(
|
||||
'started_at'.i18n,
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
fontSize: 17.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: AppColors.of(context).text,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 5.0),
|
||||
@ -119,9 +123,10 @@ class GoalCompleteModal extends StatelessWidget {
|
||||
averageDifference.toStringAsFixed(2) + '%',
|
||||
]),
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
fontSize: 17.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: AppColors.of(context).text,
|
||||
),
|
||||
),
|
||||
],
|
||||
@ -173,17 +178,17 @@ class GoalCompleteModal extends StatelessWidget {
|
||||
width: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
color: const Color(0xFFF5FAF9),
|
||||
color: const Color.fromARGB(38, 131, 131, 131),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 8.0),
|
||||
child: Text(
|
||||
'later'.i18n,
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
fontSize: 18.0,
|
||||
fontWeight: FontWeight.w700,
|
||||
color: Color(0xFF01342D),
|
||||
color: AppColors.of(context).text,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
Loading…
x
Reference in New Issue
Block a user