150 lines
4.1 KiB
Dart
150 lines
4.1 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_svg/svg.dart';
|
|
import 'package:fluttericon/font_awesome5_icons.dart';
|
|
import 'package:fluttericon/web_symbols_icons.dart';
|
|
import 'package:go_router/go_router.dart';
|
|
import 'package:qr_flutter/qr_flutter.dart';
|
|
import 'package:unit2/test_data.dart';
|
|
import 'package:unit2/theme-data.dart/btn-style.dart';
|
|
import 'package:unit2/utils/global.dart';
|
|
import '../../../theme-data.dart/colors.dart';
|
|
import './components/cover-image.dart';
|
|
|
|
class Profile extends StatelessWidget {
|
|
const Profile({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return WillPopScope(
|
|
onWillPop: () async {
|
|
return Future.value(true);
|
|
},
|
|
child: SafeArea(
|
|
child: Scaffold(
|
|
body: SizedBox(
|
|
width: screenWidth,
|
|
child: Stack(
|
|
clipBehavior: Clip.none,
|
|
alignment: Alignment.center,
|
|
children: [
|
|
const CoverImage(),
|
|
const Positioned(top: 125, child: BuildProfileImage()),
|
|
Positioned(
|
|
top: 10,
|
|
left: 20,
|
|
child: IconButton(
|
|
onPressed: () {
|
|
context.go(context.namedLocation('home'));
|
|
},
|
|
icon: const Icon(
|
|
FontAwesome5.arrow_left,
|
|
size: 24,
|
|
color: Colors.white,
|
|
),
|
|
)),
|
|
Positioned(
|
|
top: 10,
|
|
right: 20,
|
|
child: IconButton(
|
|
onPressed: () {},
|
|
icon: const Icon(
|
|
Icons.edit,
|
|
size: 24,
|
|
color: Colors.white,
|
|
),
|
|
)),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|
|
class BuildInformation extends StatelessWidget {
|
|
const BuildInformation({super.key});
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Container(
|
|
padding: const EdgeInsets.symmetric(horizontal: 25),
|
|
width: screenWidth,
|
|
child: Column(
|
|
children: [
|
|
const SizedBox(
|
|
height: 25,
|
|
),
|
|
Text(
|
|
"Rodolfo Bernales Acuin",
|
|
style: Theme.of(context)
|
|
.textTheme
|
|
.headline5!
|
|
.copyWith(fontWeight: FontWeight.bold),
|
|
),
|
|
const SizedBox(
|
|
height: 10,
|
|
),
|
|
Text(
|
|
"july 14, 1994 | Male",
|
|
style: Theme.of(context).textTheme.caption!.copyWith(fontSize: 18),
|
|
),
|
|
const SizedBox(
|
|
height: 15,
|
|
),
|
|
QrImage(
|
|
data: uuid,
|
|
size: blockSizeVertical * 30,
|
|
),
|
|
SizedBox(
|
|
height: 25,
|
|
),
|
|
SizedBox(
|
|
height: blockSizeVertical * 6,
|
|
width: screenWidth * .60,
|
|
child: ElevatedButton.icon(
|
|
label: const Text("Signature pad"),
|
|
icon: const Icon(
|
|
FontAwesome5.signature,
|
|
),
|
|
style: mainBtnStyle(third, Colors.transparent, Colors.white54),
|
|
onPressed: () {},
|
|
),
|
|
),
|
|
const SizedBox(
|
|
height: 5,
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|
|
class BuildProfileImage extends StatelessWidget {
|
|
const BuildProfileImage({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Column(
|
|
children: [
|
|
Stack(
|
|
alignment: Alignment.center,
|
|
children: [
|
|
const CircleAvatar(
|
|
radius: 72,
|
|
backgroundColor: Colors.white,
|
|
),
|
|
CircleAvatar(
|
|
radius: 69,
|
|
backgroundColor: Colors.grey.shade800,
|
|
child: SvgPicture.asset(
|
|
'assets/svgs/male.svg',
|
|
),
|
|
),
|
|
],
|
|
),
|
|
BuildInformation(),
|
|
],
|
|
);
|
|
}
|
|
}
|