Merge branch 'dev' of github.com:refilc/naplo into dev
This commit is contained in:
commit
ca177ad69f
@ -83,8 +83,7 @@ class AppTheme {
|
||||
accentColor == AccentColor.ogfilc) ||
|
||||
!settings.newColors
|
||||
? accent
|
||||
: ColorsUtils().darken(accent,
|
||||
amount: 0.4); // white mode: same tertiary as secondary
|
||||
: ColorsUtils().darken(accent, amount: 0.5);
|
||||
|
||||
return ThemeData(
|
||||
brightness: Brightness.light,
|
||||
@ -187,15 +186,14 @@ class AppTheme {
|
||||
accentColor == AccentColor.ogfilc) ||
|
||||
!settings.newColors
|
||||
? accent
|
||||
: ColorsUtils().lighten(accent, amount: 0.3);
|
||||
: ColorsUtils().lighten(accent, amount: 0.1);
|
||||
// Color newScaffoldBg = ColorsUtils().lighten(accent, amount: 0.4);
|
||||
Color newTertiary = (accentColor == AccentColor.adaptive ||
|
||||
accentColor == AccentColor.custom ||
|
||||
accentColor == AccentColor.ogfilc) ||
|
||||
!settings.newColors
|
||||
? accent
|
||||
: ColorsUtils().darken(accent,
|
||||
amount: 0.1); // dark mode: tertiary is way darker than secondary
|
||||
: ColorsUtils().lighten(accent, amount: 0.4);
|
||||
|
||||
return ThemeData(
|
||||
brightness: Brightness.dark,
|
||||
|
@ -81,6 +81,7 @@ dependencies:
|
||||
get_it: ^7.6.7
|
||||
xml: ^6.5.0
|
||||
carousel_slider: ^4.2.1
|
||||
flutter_portal: ^1.1.4
|
||||
|
||||
dev_dependencies:
|
||||
flutter_lints: ^3.0.1
|
||||
|
@ -61,7 +61,7 @@ class _FilterBarState extends State<FilterBar> {
|
||||
indicatorSize: TabBarIndicatorSize.tab,
|
||||
indicatorPadding: const EdgeInsets.symmetric(vertical: 8.0),
|
||||
indicator: BoxDecoration(
|
||||
color: Theme.of(context).colorScheme.tertiary.withOpacity(.2),
|
||||
color: Theme.of(context).colorScheme.secondary.withOpacity(.2),
|
||||
borderRadius: BorderRadius.circular(45.0),
|
||||
),
|
||||
overlayColor: MaterialStateProperty.all(const Color(0x00000000)),
|
||||
|
@ -58,7 +58,7 @@ class ProfileButton extends StatelessWidget {
|
||||
return ProfileImage(
|
||||
backgroundColor: !pMode
|
||||
? child.backgroundColor
|
||||
: Theme.of(context).colorScheme.tertiary,
|
||||
: Theme.of(context).colorScheme.secondary,
|
||||
heroTag: child.heroTag,
|
||||
key: child.key,
|
||||
name: !pMode ? child.name : "János",
|
||||
|
@ -165,7 +165,7 @@ class AbsencesPageState extends State<AbsencesPage>
|
||||
name: firstName,
|
||||
backgroundColor: Theme.of(context)
|
||||
.colorScheme
|
||||
.tertiary, //ColorUtils.stringToColor(user.displayName ?? "?"),
|
||||
.secondary, //ColorUtils.stringToColor(user.displayName ?? "?"),
|
||||
badge: updateProvider.available,
|
||||
role: user.role,
|
||||
profilePictureString: user.picture,
|
||||
|
@ -147,8 +147,8 @@ class _GradeSubjectViewState extends State<GradeSubjectView>
|
||||
),
|
||||
));
|
||||
|
||||
if (!gradeCalcMode) {
|
||||
tiles.addAll([
|
||||
tiles.addAll(
|
||||
[
|
||||
const SizedBox(
|
||||
height: 5.0,
|
||||
),
|
||||
@ -162,8 +162,8 @@ class _GradeSubjectViewState extends State<GradeSubjectView>
|
||||
controller: _tabController,
|
||||
disableFading: true,
|
||||
),
|
||||
]);
|
||||
}
|
||||
],
|
||||
);
|
||||
|
||||
if (showGraph(subjectGrades) && _tabController.index == 0) {
|
||||
tiles.add(gradeGraph);
|
||||
@ -380,31 +380,13 @@ class _GradeSubjectViewState extends State<GradeSubjectView>
|
||||
.where((e) => e.type == GradeType.midYear)
|
||||
.isNotEmpty,
|
||||
child: ExpandableFab(
|
||||
openButtonBuilder: FloatingActionButtonBuilder(
|
||||
size: 20.0,
|
||||
builder: (context, onPressed, progress) =>
|
||||
FloatingActionButton.small(
|
||||
onPressed: onPressed,
|
||||
backgroundColor: Theme.of(context).colorScheme.tertiary,
|
||||
child: const Icon(Icons.more_horiz_outlined),
|
||||
),
|
||||
),
|
||||
closeButtonBuilder: FloatingActionButtonBuilder(
|
||||
size: 20.0,
|
||||
builder: (context, onPressed, progress) =>
|
||||
FloatingActionButton.small(
|
||||
onPressed: onPressed,
|
||||
backgroundColor: Theme.of(context).colorScheme.tertiary,
|
||||
child: const Icon(Icons.close),
|
||||
),
|
||||
),
|
||||
type: ExpandableFabType.up,
|
||||
distance: 50,
|
||||
// childrenOffset: const Offset(-8.8, 0.0),
|
||||
childrenOffset: const Offset(-3.8, 0.0),
|
||||
children: [
|
||||
FloatingActionButton.small(
|
||||
heroTag: "btn_ghost_grades",
|
||||
backgroundColor: Theme.of(context).colorScheme.tertiary,
|
||||
backgroundColor: Theme.of(context).colorScheme.secondary,
|
||||
onPressed: () {
|
||||
gradeCalc(context);
|
||||
},
|
||||
@ -412,7 +394,7 @@ class _GradeSubjectViewState extends State<GradeSubjectView>
|
||||
),
|
||||
FloatingActionButton.small(
|
||||
heroTag: "btn_goal_planner",
|
||||
backgroundColor: Theme.of(context).colorScheme.tertiary,
|
||||
backgroundColor: Theme.of(context).colorScheme.secondary,
|
||||
onPressed: () {
|
||||
// if (!Provider.of<PlusProvider>(context, listen: false)
|
||||
// .hasScope(PremiumScopes.goalPlanner)) {
|
||||
@ -551,10 +533,6 @@ class _GradeSubjectViewState extends State<GradeSubjectView>
|
||||
elevation: 12.0,
|
||||
);
|
||||
|
||||
// set tab
|
||||
int tabIndex = _tabController.index;
|
||||
_tabController.animateTo(0);
|
||||
|
||||
// Hide the fab and grades
|
||||
setState(() {
|
||||
gradeCalcMode = true;
|
||||
@ -563,9 +541,6 @@ class _GradeSubjectViewState extends State<GradeSubjectView>
|
||||
_sheetController!.closed.then((value) {
|
||||
// Show fab and grades
|
||||
if (mounted) {
|
||||
// set tab
|
||||
_tabController.animateTo(tabIndex);
|
||||
|
||||
setState(() {
|
||||
gradeCalcMode = false;
|
||||
});
|
||||
|
@ -546,7 +546,7 @@ class GradesPageState extends State<GradesPage> {
|
||||
name: firstName,
|
||||
backgroundColor: Theme.of(context)
|
||||
.colorScheme
|
||||
.tertiary, //ColorUtils.stringToColor(user.displayName ?? "?"),
|
||||
.secondary, //ColorUtils.stringToColor(user.displayName ?? "?"),
|
||||
badge: updateProvider.available,
|
||||
role: user.role,
|
||||
profilePictureString: user.picture,
|
||||
|
@ -307,7 +307,7 @@ class HomePageState extends State<HomePage> with TickerProviderStateMixin {
|
||||
name: firstName,
|
||||
backgroundColor: Theme.of(context)
|
||||
.colorScheme
|
||||
.tertiary, //!settings.presentationMode
|
||||
.secondary, //!settings.presentationMode
|
||||
//? ColorUtils.stringToColor(user.displayName ?? "?")
|
||||
//: Theme.of(context).colorScheme.secondary,
|
||||
badge: updateProvider.available,
|
||||
|
@ -105,7 +105,7 @@ class MessagesPageState extends State<MessagesPage>
|
||||
name: firstName,
|
||||
backgroundColor: Theme.of(context)
|
||||
.colorScheme
|
||||
.tertiary, //ColorUtils.stringToColor(user.displayName ?? "?"),
|
||||
.secondary, //ColorUtils.stringToColor(user.displayName ?? "?"),
|
||||
badge: updateProvider.available,
|
||||
role: user.role,
|
||||
profilePictureString: user.picture,
|
||||
|
@ -251,7 +251,7 @@ class NotesPageState extends State<NotesPage> with TickerProviderStateMixin {
|
||||
name: firstName,
|
||||
backgroundColor: Theme.of(context)
|
||||
.colorScheme
|
||||
.tertiary, //ColorUtils.stringToColor(user.displayName ?? "?"),
|
||||
.secondary, //ColorUtils.stringToColor(user.displayName ?? "?"),
|
||||
badge: updateProvider.available,
|
||||
role: user.role,
|
||||
profilePictureString: user.picture,
|
||||
|
@ -283,7 +283,7 @@ class TimetablePageState extends State<TimetablePage>
|
||||
name: firstName,
|
||||
backgroundColor: Theme.of(context)
|
||||
.colorScheme
|
||||
.tertiary, //ColorUtils.stringToColor(user.displayName ?? "?"),
|
||||
.secondary, //ColorUtils.stringToColor(user.displayName ?? "?"),
|
||||
badge: updateProvider.available,
|
||||
role: user.role,
|
||||
profilePictureString: user.picture,
|
||||
|
@ -15,6 +15,7 @@ import 'package:flutter/services.dart';
|
||||
import 'login_screen.i18n.dart';
|
||||
import 'package:carousel_slider/carousel_slider.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:flutter_portal/flutter_portal.dart';
|
||||
|
||||
class LoginScreen extends StatefulWidget {
|
||||
const LoginScreen({super.key, this.back = false});
|
||||
@ -78,7 +79,13 @@ class LoginScreenState extends State<LoginScreen> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
precacheImage(const AssetImage('assets/images/showcase1.png'), context);
|
||||
precacheImage(const AssetImage('assets/images/showcase2.png'), context);
|
||||
precacheImage(const AssetImage('assets/images/showcase3.png'), context);
|
||||
precacheImage(const AssetImage('assets/images/showcase4.png'), context);
|
||||
|
||||
return Portal(
|
||||
child: Scaffold(
|
||||
body: Container(
|
||||
decoration: const BoxDecoration(color: Color(0xFFDAE4F7)),
|
||||
child: SingleChildScrollView(
|
||||
@ -103,10 +110,10 @@ class LoginScreenState extends State<LoginScreen> {
|
||||
width: 30.0,
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
const Text(
|
||||
'reFilc',
|
||||
style: TextStyle(
|
||||
color: AppColors.of(context).loginPrimary,
|
||||
color: Color(0xFF050B15),
|
||||
fontSize: 18.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontFamily: 'Montserrat'),
|
||||
@ -130,7 +137,7 @@ class LoginScreenState extends State<LoginScreen> {
|
||||
height: MediaQuery.of(context).size.height,
|
||||
viewportFraction: 1,
|
||||
autoPlay: true,
|
||||
autoPlayInterval: const Duration(seconds: 4),
|
||||
autoPlayInterval: const Duration(seconds: 6),
|
||||
pauseAutoPlayOnTouch: true),
|
||||
items: [1, 2, 3, 4].map((i) {
|
||||
return Builder(
|
||||
@ -140,7 +147,8 @@ class LoginScreenState extends State<LoginScreen> {
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 24),
|
||||
padding:
|
||||
const EdgeInsets.only(left: 24),
|
||||
child: Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
@ -149,24 +157,25 @@ class LoginScreenState extends State<LoginScreen> {
|
||||
children: [
|
||||
Text(
|
||||
"welcome_title_$i".i18n,
|
||||
style: TextStyle(
|
||||
color: AppColors.of(context)
|
||||
.loginPrimary,
|
||||
fontSize: 20,
|
||||
style: const TextStyle(
|
||||
color: Color(0xFF050B15),
|
||||
fontSize: 19,
|
||||
fontFamily: 'Montserrat',
|
||||
fontWeight: FontWeight.w700,
|
||||
height: 1.3),
|
||||
),
|
||||
const SizedBox(height: 14.375), //meth
|
||||
const SizedBox(
|
||||
height: 14.375), //meth
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(
|
||||
right: 20),
|
||||
child: Text(
|
||||
"welcome_text_$i".i18n,
|
||||
style: const TextStyle(
|
||||
color: Color(0xFF050B15),
|
||||
fontFamily: 'FigTree',
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 18,
|
||||
fontSize: 17,
|
||||
height: 1.3),
|
||||
),
|
||||
),
|
||||
@ -177,7 +186,8 @@ class LoginScreenState extends State<LoginScreen> {
|
||||
padding: const EdgeInsets.only(
|
||||
left: 16, right: 16),
|
||||
child: Image.asset(
|
||||
'assets/images/showcase$i.png', fit: BoxFit.fitWidth)),
|
||||
'assets/images/showcase$i.png',
|
||||
fit: BoxFit.fitWidth)),
|
||||
],
|
||||
);
|
||||
},
|
||||
@ -186,7 +196,6 @@ class LoginScreenState extends State<LoginScreen> {
|
||||
),
|
||||
],
|
||||
)
|
||||
|
||||
// // inputs
|
||||
// Padding(
|
||||
// padding: const EdgeInsets.only(
|
||||
@ -375,6 +384,7 @@ class LoginScreenState extends State<LoginScreen> {
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -60,7 +60,7 @@ extension Localization on String {
|
||||
"welcome_title_3":
|
||||
"Kövesd a céljaidat, és legyen a matek egyesből matek ötös.",
|
||||
"welcome_text_3":
|
||||
"Állítsd be a célodat, és mi megmondjuk, hányas jegyet kell szerezned. Még konfetti is van a cél elérésekor.",
|
||||
"Állítsd be a célodat, és mi megmondjuk, hány jegyet kell szerezned. Még konfetti is van a cél elérésekor.",
|
||||
"welcome_title_4": "Füzetelj annyit, amennyit csak szeretnél.",
|
||||
"welcome_text_4":
|
||||
"A beépített jegyzetfüzetbe órák szerint is rendezheted a jegyzeteidet, így mindent megtalálsz egy appban.",
|
||||
|
@ -34,7 +34,7 @@ class NavbarItem extends StatelessWidget {
|
||||
padding: const EdgeInsets.all(12.0),
|
||||
decoration: BoxDecoration(
|
||||
color: active
|
||||
? Theme.of(context).colorScheme.tertiary.withOpacity(.2)
|
||||
? Theme.of(context).colorScheme.secondary.withOpacity(.2)
|
||||
: null,
|
||||
borderRadius: BorderRadius.circular(14.0),
|
||||
),
|
||||
|
@ -30,7 +30,7 @@ class AccountView extends StatelessWidget {
|
||||
AccountTile(
|
||||
profileImage: ProfileImage(
|
||||
name: _firstName,
|
||||
backgroundColor: Theme.of(context).colorScheme.tertiary,
|
||||
backgroundColor: Theme.of(context).colorScheme.secondary,
|
||||
role: user.role,
|
||||
),
|
||||
name: SelectableText(
|
||||
|
@ -136,7 +136,7 @@ class SettingsScreenState extends State<SettingsScreen>
|
||||
profilePictureString: account.picture,
|
||||
backgroundColor: Theme.of(context)
|
||||
.colorScheme
|
||||
.tertiary, //!settings.presentationMode
|
||||
.secondary, //!settings.presentationMode
|
||||
//? ColorUtils.stringToColor(account.name)
|
||||
//: Theme.of(context).colorScheme.secondary,
|
||||
),
|
||||
|
@ -70,6 +70,7 @@ dependencies:
|
||||
xml: ^6.5.0
|
||||
markdown: ^7.2.2
|
||||
carousel_slider: ^4.2.1
|
||||
flutter_portal: ^1.1.4
|
||||
|
||||
dev_dependencies:
|
||||
flutter_lints: ^3.0.1
|
||||
|
Loading…
x
Reference in New Issue
Block a user