Skip to content

Commit

Permalink
Merge pull request #41 from B3-3iL-DLW/feat/create-profil-page
Browse files Browse the repository at this point in the history
Feat/create profil page
  • Loading branch information
julesartd authored Mar 14, 2024
2 parents 0fe2bc6 + a5dbc93 commit ffd9dad
Show file tree
Hide file tree
Showing 5 changed files with 115 additions and 2 deletions.
1 change: 1 addition & 0 deletions frontend/app_student/assets/images/student-info.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions frontend/app_student/assets/images/user.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions frontend/app_student/lib/main_prod.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:app_student/config/prod_config.dart';
import 'package:app_student/login/views/login_page.dart';
import 'package:app_student/profils/views/profil_page.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';

Expand All @@ -25,7 +25,7 @@ class MyApp extends StatelessWidget {
primarySwatch: Colors.blue,
focusColor: const Color(0xffE84E0F),
),
home: const LoginPage(),
home: const ProfilPage(),
);
}
}
67 changes: 67 additions & 0 deletions frontend/app_student/lib/profils/views/profil_page.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
import 'package:app_student/class_groups/views/widgets/header/header_text.dart';
import 'package:app_student/profils/views/widgets/class_group_button.dart';
import 'package:flutter/material.dart';
import 'package:app_student/login/widgets/header/header_logo.dart';
import 'package:flutter_svg/svg.dart';

class ProfilPage extends StatelessWidget {
const ProfilPage({super.key});

@override
Widget build(BuildContext context) {
return Scaffold(
body: Column(
children: <Widget>[
const HeaderLogo(),
const Padding(
padding: EdgeInsets.all(15.0),
child: HeaderText('Quel beau profil ####### !'),
),
Padding(
padding: const EdgeInsets.all(30.0),
child: Card(
child: ListTile(
leading: SizedBox(
width: 50,
child: ColorFiltered(
colorFilter: const ColorFilter.mode(
Color(0xFF005067), BlendMode.srcIn),
child: SvgPicture.asset(
'assets/images/user.svg',
width: 30,
height: 30,
),
),
),
title: const Text('Classe'),
subtitle: const Text('Nom du user'),
),
),
),
Padding(
padding: const EdgeInsets.all(30.0),
child: Card(
child: ListTile(
leading: SizedBox(
width: 50,
child: ColorFiltered(
colorFilter: const ColorFilter.mode(
Color(0xFF005067), BlendMode.srcIn),
child: SvgPicture.asset(
'assets/images/student-info.svg',
width: 30,
height: 30,
),
),
),
title: const Text('ISBN'),
subtitle: const Text('dd/mm/yyyy'),
),
),
),
const ClassGroupButton(),
],
),
);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';

class ClassGroupButton extends StatelessWidget {
const ClassGroupButton({super.key});

@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.only(left: 25.0, top: 80.0, right: 25.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
width: double.infinity,
height: 50.0,
child: ElevatedButton(
style: ButtonStyle(
textStyle: MaterialStateProperty.all<TextStyle>(
const TextStyle(
fontSize: 16.0,
fontWeight: FontWeight.bold,
),
),
backgroundColor: MaterialStateProperty.all<Color>(
Theme.of(context).focusColor),
foregroundColor: MaterialStateProperty.all<Color>(Colors.white),
shape: MaterialStateProperty.all<RoundedRectangleBorder>(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(3.0),
),
),
),
onPressed: () {
GoRouter.of(context).go('/class-list');
},
child: const Text('Changer de classe'),
),
),
],
),
);
}
}

0 comments on commit ffd9dad

Please sign in to comment.