Frontend first draft
This commit is contained in:
53
frontend/pweb/lib/pages/settings/profile/page.dart
Normal file
53
frontend/pweb/lib/pages/settings/profile/page.dart
Normal file
@@ -0,0 +1,53 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:pweb/pages/settings/profile/account/avatar.dart';
|
||||
import 'package:pweb/pages/settings/profile/account/locale.dart';
|
||||
import 'package:pweb/pages/settings/profile/account/name.dart';
|
||||
|
||||
import 'package:pweb/generated/i18n/app_localizations.dart';
|
||||
|
||||
|
||||
class ProfileSettingsPage extends StatelessWidget {
|
||||
const ProfileSettingsPage({super.key});
|
||||
|
||||
static const _cardPadding = EdgeInsets.symmetric(vertical: 32, horizontal: 16);
|
||||
static const _cardRadius = 16.0;
|
||||
static const _itemSpacing = 12.0;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final loc = AppLocalizations.of(context)!;
|
||||
final theme = Theme.of(context);
|
||||
|
||||
return Material(
|
||||
elevation: 4,
|
||||
borderRadius: BorderRadius.circular(_cardRadius),
|
||||
clipBehavior: Clip.antiAlias,
|
||||
color: theme.colorScheme.onSecondary,
|
||||
child: Padding(
|
||||
padding: _cardPadding,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
spacing: _itemSpacing,
|
||||
children: [
|
||||
AvatarTile(
|
||||
avatarUrl: 'https://avatars.githubusercontent.com/u/65651201',
|
||||
title: loc.avatar,
|
||||
description: loc.avatarHint,
|
||||
errorText: loc.avatarUpdateError,
|
||||
),
|
||||
AccountName(
|
||||
name: 'User Name',
|
||||
title: loc.accountName,
|
||||
hintText: loc.accountNameHint,
|
||||
errorText: loc.accountNameUpdateError,
|
||||
),
|
||||
LocalePicker(
|
||||
title: loc.language,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user