forked from firka/student-legacy
fixed final grades ugly ui
This commit is contained in:
parent
796b35e27c
commit
d4df0170a3
@ -13,13 +13,21 @@ class CertificationView extends StatelessWidget {
|
|||||||
final List<Grade> grades;
|
final List<Grade> grades;
|
||||||
final GradeType gradeType;
|
final GradeType gradeType;
|
||||||
|
|
||||||
static show(List<Grade> grades, {required BuildContext context, required GradeType gradeType}) =>
|
static show(List<Grade> grades,
|
||||||
Navigator.of(context, rootNavigator: true).push(CupertinoPageRoute(builder: (context) => CertificationView(grades, gradeType: gradeType)));
|
{required BuildContext context, required GradeType gradeType}) =>
|
||||||
|
Navigator.of(context, rootNavigator: true).push(CupertinoPageRoute(
|
||||||
|
builder: (context) =>
|
||||||
|
CertificationView(grades, gradeType: gradeType)));
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
grades.sort((a, b) => a.subject.name.compareTo(b.subject.name));
|
grades.sort((a, b) => a.subject.name.compareTo(b.subject.name));
|
||||||
List<Widget> tiles = grades.map((e) => CertificationTile(e)).toList();
|
List<Widget> tiles = grades
|
||||||
|
.map((e) => CertificationTile(
|
||||||
|
e,
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 8.0, vertical: 5.0),
|
||||||
|
))
|
||||||
|
.toList();
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
body: HeroScrollView(
|
body: HeroScrollView(
|
||||||
title: getGradeTypeTitle(gradeType),
|
title: getGradeTypeTitle(gradeType),
|
||||||
@ -32,12 +40,16 @@ class CertificationView extends StatelessWidget {
|
|||||||
children: [
|
children: [
|
||||||
SafeArea(
|
SafeArea(
|
||||||
child: Panel(
|
child: Panel(
|
||||||
|
padding:
|
||||||
|
const EdgeInsets.symmetric(vertical: 8.0, horizontal: 4.0),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: tiles,
|
children: tiles,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
)));
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user