feat(frontend): add student identification screen as entry point
This commit is contained in:
@@ -2,21 +2,27 @@ import "package:flutter/material.dart";
|
||||
import "package:google_fonts/google_fonts.dart";
|
||||
import "../theme/ensup_colors.dart";
|
||||
|
||||
/// Barre supérieure ENSUP : marque EME, campus et utilisateur connecté.
|
||||
/// Barre supérieure ENSUP. L'utilisateur est optionnel (absent sur l'écran
|
||||
/// d'identification, présent une fois l'étudiant connecté).
|
||||
class EnsupTopBar extends StatelessWidget {
|
||||
const EnsupTopBar({
|
||||
super.key,
|
||||
this.brandText = "EME",
|
||||
required this.campusTag,
|
||||
required this.userName,
|
||||
required this.userInitials,
|
||||
this.userName,
|
||||
this.userInitials,
|
||||
});
|
||||
|
||||
final String brandText;
|
||||
final String campusTag;
|
||||
final String userName;
|
||||
final String userInitials;
|
||||
final String? userName;
|
||||
final String? userInitials;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final name = userName;
|
||||
final initials = userInitials;
|
||||
|
||||
return Container(
|
||||
height: 56,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 28),
|
||||
@@ -26,10 +32,10 @@ class EnsupTopBar extends StatelessWidget {
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
const Icon(Icons.devices_other, color: Colors.white, size: 18),
|
||||
const Icon(Icons.badge_outlined, color: Colors.white, size: 18),
|
||||
const SizedBox(width: 10),
|
||||
Text(
|
||||
"EME",
|
||||
brandText,
|
||||
style: GoogleFonts.darkerGrotesque(
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w900,
|
||||
@@ -57,17 +63,19 @@ class EnsupTopBar extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
_Avatar(initials: userInitials),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
userName,
|
||||
style: GoogleFonts.titilliumWeb(
|
||||
color: Colors.white,
|
||||
fontSize: 13,
|
||||
fontWeight: FontWeight.w600,
|
||||
if (name != null && initials != null) ...[
|
||||
const SizedBox(width: 12),
|
||||
_Avatar(initials: initials),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
name,
|
||||
style: GoogleFonts.titilliumWeb(
|
||||
color: Colors.white,
|
||||
fontSize: 13,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user