Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/create profil page #41

Merged
merged 2 commits into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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'),
),
),
],
),
);
}
}
Loading