forked from firka/student-legacy
better rename func
This commit is contained in:
parent
6dc0168ec4
commit
26071db351
@ -23,7 +23,7 @@ class GradeTile extends StatelessWidget {
|
|||||||
String subtitle;
|
String subtitle;
|
||||||
EdgeInsets leadingPadding = EdgeInsets.zero;
|
EdgeInsets leadingPadding = EdgeInsets.zero;
|
||||||
bool isSubjectView = SubjectGradesContainer.of(context) != null;
|
bool isSubjectView = SubjectGradesContainer.of(context) != null;
|
||||||
String subjectName = grade.subject.renamedTo != null ? grade.subject.renamedTo! : grade.subject.name.capital();
|
String subjectName = grade.subject.renamedTo ?? grade.subject.name.capital();
|
||||||
String modeDescription = grade.mode.description.capital();
|
String modeDescription = grade.mode.description.capital();
|
||||||
String description = grade.description.capital();
|
String description = grade.description.capital();
|
||||||
|
|
||||||
@ -112,7 +112,7 @@ class GradeTile extends StatelessWidget {
|
|||||||
title,
|
title,
|
||||||
maxLines: 2,
|
maxLines: 2,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
style: TextStyle(fontWeight: FontWeight.w600, fontStyle: grade.subject.renamedTo != null ? FontStyle.italic : null),
|
style: TextStyle(fontWeight: FontWeight.w600, fontStyle: grade.subject.isRenamed ? FontStyle.italic : null),
|
||||||
),
|
),
|
||||||
subtitle: subtitle != ""
|
subtitle: subtitle != ""
|
||||||
? censored
|
? censored
|
||||||
|
@ -133,18 +133,14 @@ class LessonTile extends StatelessWidget {
|
|||||||
contentPadding: const EdgeInsets.symmetric(horizontal: 4.0),
|
contentPadding: const EdgeInsets.symmetric(horizontal: 4.0),
|
||||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12.0)),
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12.0)),
|
||||||
title: Text(
|
title: Text(
|
||||||
!lesson.isEmpty
|
!lesson.isEmpty ? lesson.subject.renamedTo ?? lesson.subject.name.capital() : "empty".i18n,
|
||||||
? lesson.subject.renamedTo != null
|
|
||||||
? lesson.subject.renamedTo!
|
|
||||||
: lesson.subject.name.capital()
|
|
||||||
: "empty".i18n,
|
|
||||||
maxLines: 2,
|
maxLines: 2,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
fontSize: 15.5,
|
fontSize: 15.5,
|
||||||
color: AppColors.of(context).text.withOpacity(!lesson.isEmpty ? 1.0 : 0.5),
|
color: AppColors.of(context).text.withOpacity(!lesson.isEmpty ? 1.0 : 0.5),
|
||||||
fontStyle: lesson.subject.renamedTo != null ? FontStyle.italic : null),
|
fontStyle: lesson.subject.isRenamed ? FontStyle.italic : null),
|
||||||
),
|
),
|
||||||
subtitle: description != ""
|
subtitle: description != ""
|
||||||
? Text(
|
? Text(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user