sc-android-app/lib/screens/profile_screen.dart
2024-08-28 19:07:03 +05:30

101 lines
3.4 KiB
Dart

import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:cheminova/widgets/common_app_bar.dart';
import 'package:cheminova/widgets/common_background.dart';
import 'package:cheminova/widgets/common_drawer.dart';
class ProfileScreen extends StatelessWidget {
const ProfileScreen({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Stack(
children: [
CommonBackground(
isFullWidth: true,
child: Scaffold(
drawer: const CommonDrawer(),
backgroundColor: Colors.transparent,
appBar: CommonAppBar(
title: const Text('Profile'),
backgroundColor: Colors.transparent,
elevation: 0,
actions: [
IconButton(
onPressed: () {
Navigator.pop(context);
},
icon: Image.asset('assets/Back_attendance.png'),
padding: const EdgeInsets.only(right: 20),
),
],
),
body: SingleChildScrollView(
child: Column(
children: [
Container(
padding: const EdgeInsets.all(20.0).copyWith(top: 15, bottom: 30),
margin: const EdgeInsets.symmetric(horizontal: 30.0, vertical: 20.0),
decoration: BoxDecoration(
border: Border.all(color: Colors.white),
color: const Color(0xffB4D1E5).withOpacity(0.9),
borderRadius: BorderRadius.circular(26.0),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// const Text(
// 'User Profile',
// style: TextStyle(
// fontSize: 30,
// color: Colors.black,
// fontWeight: FontWeight.w500,
// fontFamily: 'Roboto',
// ),
// ),
const SizedBox(height: 20),
_buildProfileItem('Name', 'Vaibhav Gurjar'),
_buildProfileItem('ID', 'EMP001'),
_buildProfileItem('Designation', 'Sales Cordinator'),
_buildProfileItem('Email ID', 'vaibhav.gurjar20001@gmail.com'),
_buildProfileItem('Mobile Number', '8839033630'),
],
),
),
],
),
),
),
),
],
);
}
Widget _buildProfileItem(String label, String value) {
return Padding(
padding: const EdgeInsets.symmetric(vertical: 10),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
label,
style: const TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
color: Color(0xff004791),
),
),
const SizedBox(height: 5),
Text(
value,
style: const TextStyle(
fontSize: 18,
color: Colors.black,
),
),
const Divider(color: Colors.grey),
],
),
);
}
}