chore: Add documentation and improve UI styles in settings

Added doc comments to widget build methods and constructors for better code clarity. Updated text styles in SettingsProfileHeader to use textPrimary and headline1m for improved UI consistency.
This commit is contained in:
Achintha Isuru
2026-01-22 14:57:37 -05:00
parent df52c12aa4
commit 772a1ba53f
4 changed files with 15 additions and 6 deletions

View File

@@ -17,6 +17,7 @@ class ClientSettingsPage extends StatelessWidget {
const ClientSettingsPage({super.key});
@override
/// Builds the client settings page UI.
Widget build(BuildContext context) {
return BlocProvider<ClientSettingsBloc>(
create: (context) => Modular.get<ClientSettingsBloc>(),

View File

@@ -12,6 +12,7 @@ class SettingsActions extends StatelessWidget {
const SettingsActions({super.key});
@override
/// Builds the settings actions UI.
Widget build(BuildContext context) {
// Get the translations for the client settings profile.
final TranslationsClientSettingsProfileEn labels =

View File

@@ -9,6 +9,7 @@ class SettingsProfileHeader extends StatelessWidget {
const SettingsProfileHeader({super.key});
@override
/// Builds the profile header UI.
Widget build(BuildContext context) {
final labels = t.client_settings.profile;
@@ -39,12 +40,10 @@ class SettingsProfileHeader extends StatelessWidget {
border: Border.all(color: UiColors.border, width: 2),
color: UiColors.white,
),
child: const Center(
child: Center(
child: Text(
'C',
style: TextStyle(
fontSize: 24,
fontWeight: FontWeight.bold,
style: UiTypography.headline1m.copyWith(
color: UiColors.primary,
),
),
@@ -54,7 +53,7 @@ class SettingsProfileHeader extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text('Your Company', style: UiTypography.body1b),
Text('Your Company', style: UiTypography.body1b.textPrimary),
const SizedBox(height: UiConstants.space1),
Row(
mainAxisAlignment: MainAxisAlignment.start,
@@ -77,7 +76,7 @@ class SettingsProfileHeader extends StatelessWidget {
),
),
),
title: Text(labels.title, style: UiTypography.body1b),
title: Text(labels.title, style: UiTypography.body1b.textPrimary),
);
}
}

View File

@@ -10,6 +10,7 @@ class SettingsQuickLinks extends StatelessWidget {
const SettingsQuickLinks({super.key});
@override
/// Builds the quick links UI.
Widget build(BuildContext context) {
final labels = t.client_settings.profile;
@@ -54,10 +55,16 @@ class SettingsQuickLinks extends StatelessWidget {
/// Internal widget for a single quick link item.
class _QuickLinkItem extends StatelessWidget {
/// The icon to display.
final IconData icon;
/// The title of the link.
final String title;
/// Callback when the link is tapped.
final VoidCallback onTap;
/// Creates a [_QuickLinkItem].
const _QuickLinkItem({
required this.icon,
required this.title,
@@ -65,6 +72,7 @@ class _QuickLinkItem extends StatelessWidget {
});
@override
/// Builds the quick link item UI.
Widget build(BuildContext context) {
return InkWell(
onTap: onTap,