188 lines
7.5 KiB
Dart
188 lines
7.5 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:proxibuy/core/utils/empty_space.dart';
|
|
import 'package:proxibuy/presentation/ui/theme/responsive.dart';
|
|
import 'package:proxibuy/presentation/ui/theme/theme.dart';
|
|
import 'package:proxibuy/presentation/ui/widgets/dialog/dialog_manager.dart';
|
|
|
|
class EditProfilePage extends StatelessWidget {
|
|
const EditProfilePage({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
appBar: AppBar(
|
|
title: Text(
|
|
'Edit Profile',
|
|
style: Theme.of(context)
|
|
.textTheme
|
|
.titleLarge
|
|
?.copyWith(color: Theme.of(context).colorScheme.onSurface),
|
|
),
|
|
),
|
|
body: Responsive(context).builder(
|
|
mobile: Form(
|
|
child: Padding(
|
|
padding: const EdgeInsets.all(16.0).copyWith(bottom: 32),
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
Column(
|
|
children: [
|
|
Center(
|
|
child: SizedBox(
|
|
width: 64, height: 64, child: CircleAvatar())),
|
|
16.h,
|
|
Text(
|
|
'Username',
|
|
style: Theme.of(context).textTheme.titleMedium,
|
|
),
|
|
32.h,
|
|
TextFormField(
|
|
decoration: defaultInputDecoration(context).copyWith(
|
|
labelText: 'First Name',
|
|
)),
|
|
16.h,
|
|
TextFormField(
|
|
decoration: defaultInputDecoration(context).copyWith(
|
|
labelText: 'Last Name',
|
|
)),
|
|
16.h,
|
|
TextFormField(
|
|
decoration: defaultInputDecoration(context).copyWith(
|
|
labelText: 'Phone',
|
|
)),
|
|
16.h,
|
|
TextFormField(
|
|
decoration: defaultInputDecoration(context).copyWith(
|
|
labelText: 'Email',
|
|
)),
|
|
16.h,
|
|
SwitchListTile.adaptive(
|
|
title: Text(
|
|
'Login with Password',
|
|
style: Theme.of(context).textTheme.titleLarge,
|
|
),
|
|
subtitle: Text('Change Password'),
|
|
value: false,
|
|
onChanged: (value) {
|
|
DialogManager(context).changePasswordBS();
|
|
},
|
|
),
|
|
],
|
|
),
|
|
SizedBox(
|
|
width: double.infinity,
|
|
height: 46,
|
|
child: ElevatedButton(
|
|
onPressed: () {},
|
|
child: Text(
|
|
'Confirm Changes',
|
|
style: Theme.of(context)
|
|
.textTheme
|
|
.labelLarge
|
|
?.copyWith(color: Colors.white),
|
|
)),
|
|
)
|
|
],
|
|
),
|
|
),
|
|
),
|
|
desktop: Responsive(context).maxWidthInDesktop(
|
|
maxWidth: 800,
|
|
child: (context, mw) {
|
|
return Form(
|
|
child: Padding(
|
|
padding: const EdgeInsets.all(16.0).copyWith(bottom: 32),
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
Column(
|
|
children: [
|
|
Center(
|
|
child: SizedBox(
|
|
width: 128,
|
|
height: 128,
|
|
child: CircleAvatar())),
|
|
16.h,
|
|
Text(
|
|
'Username',
|
|
style: Theme.of(context).textTheme.titleLarge,
|
|
),
|
|
32.h,
|
|
Row(
|
|
children: [
|
|
Expanded(
|
|
child: TextFormField(
|
|
decoration:
|
|
defaultInputDecoration(context)
|
|
.copyWith(
|
|
labelText: 'First Name',
|
|
)),
|
|
),
|
|
16.w,
|
|
Expanded(
|
|
child: TextFormField(
|
|
decoration:
|
|
defaultInputDecoration(context)
|
|
.copyWith(
|
|
labelText: 'Last Name',
|
|
)),
|
|
),
|
|
],
|
|
),
|
|
16.h,
|
|
Row(
|
|
children: [
|
|
Expanded(
|
|
child: TextFormField(
|
|
decoration:
|
|
defaultInputDecoration(context)
|
|
.copyWith(
|
|
labelText: 'Phone',
|
|
)),
|
|
),
|
|
16.w,
|
|
Expanded(
|
|
child: TextFormField(
|
|
decoration:
|
|
defaultInputDecoration(context)
|
|
.copyWith(
|
|
labelText: 'Email',
|
|
)),
|
|
),
|
|
],
|
|
),
|
|
16.h,
|
|
SwitchListTile.adaptive(
|
|
title: Text(
|
|
'Login with Password Only',
|
|
style: Theme.of(context).textTheme.titleLarge,
|
|
),
|
|
subtitle: Text('Change Password'),
|
|
value: false,
|
|
onChanged: (value) {},
|
|
),
|
|
],
|
|
),
|
|
SizedBox(
|
|
width: double.infinity,
|
|
height: 46,
|
|
child: ElevatedButton(
|
|
onPressed: () {},
|
|
child: Text(
|
|
'Confirm Changes',
|
|
style: Theme.of(context)
|
|
.textTheme
|
|
.labelLarge
|
|
?.copyWith(color: Colors.white),
|
|
)),
|
|
)
|
|
],
|
|
),
|
|
),
|
|
);
|
|
})),
|
|
);
|
|
}
|
|
}
|