style(frontend): polish student workspace

This commit is contained in:
SaidSoighiri94
2026-07-23 10:27:27 +02:00
parent 1c8ed77ebf
commit 695b0d3965
12 changed files with 1162 additions and 484 deletions
+76 -39
View File
@@ -46,60 +46,97 @@ class HomeScreen extends StatelessWidget {
),
Expanded(
child: SingleChildScrollView(
padding: const EdgeInsets.symmetric(horizontal: 32, vertical: 28),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const ProfileCard(
name: DemoIdentity.userName,
subtitle: DemoIdentity.userSubtitle,
initials: DemoIdentity.userInitials,
),
const SizedBox(height: 24),
Text(
"Que souhaitez-vous faire ?",
style: GoogleFonts.darkerGrotesque(
fontSize: 28,
fontWeight: FontWeight.w900,
color: EnsupColors.text,
),
),
const SizedBox(height: 18),
IntrinsicHeight(
child: Row(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Expanded(
child: ActionCard(
padding: const EdgeInsets.symmetric(
horizontal: 28,
vertical: 26,
),
child: Center(
child: ConstrainedBox(
constraints: const BoxConstraints(maxWidth: 1040),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const ProfileCard(
name: DemoIdentity.userName,
subtitle: DemoIdentity.userSubtitle,
initials: DemoIdentity.userInitials,
),
const SizedBox(height: 28),
Text(
"Que souhaitez-vous faire ?",
style: GoogleFonts.darkerGrotesque(
fontSize: 30,
height: 1,
fontWeight: FontWeight.w900,
color: EnsupColors.text,
),
),
const SizedBox(height: 6),
Text(
"Choisissez lopération à réaliser sur ce poste.",
style: GoogleFonts.titilliumWeb(
fontSize: 14,
color: EnsupColors.muted,
),
),
const SizedBox(height: 20),
LayoutBuilder(
builder: (context, constraints) {
final emprunter = ActionCard(
icon: Icons.inventory_2_outlined,
title: "EMPRUNTER",
description:
"Accéder au catalogue et emprunter du matériel éducatif",
"Consulter les équipements disponibles et démarrer un nouvel emprunt.",
color: EnsupColors.cyan,
onTap: () => Navigator.of(context).push(
MaterialPageRoute(builder: (_) => const CatalogueScreen()),
MaterialPageRoute(
builder: (_) =>
const CatalogueScreen(),
),
),
),
),
const SizedBox(width: 16),
Expanded(
child: ActionCard(
);
final restituer = ActionCard(
icon: Icons.assignment_return_outlined,
title: "RESTITUER",
description:
"Restituer un matériel que vous avez emprunté",
"Sélectionner un emprunt en cours et contrôler le matériel rendu.",
color: EnsupColors.teal,
onTap: () => Navigator.of(context).push(
MaterialPageRoute(
builder: (_) => const RestitutionSelectScreen(),
builder: (_) =>
const RestitutionSelectScreen(),
),
),
),
),
],
),
);
if (constraints.maxWidth < 720) {
return Column(
crossAxisAlignment:
CrossAxisAlignment.stretch,
children: [
emprunter,
const SizedBox(height: 14),
restituer,
],
);
}
return IntrinsicHeight(
child: Row(
crossAxisAlignment:
CrossAxisAlignment.stretch,
children: [
Expanded(child: emprunter),
const SizedBox(width: 16),
Expanded(child: restituer),
],
),
);
},
),
],
),
],
),
),
),
),