feat: Implement legal sections for Terms of Service and Privacy Policy, including navigation and content loading

This commit is contained in:
Achintha Isuru
2026-02-18 14:40:38 -05:00
parent 369151ee29
commit abf50796fa
17 changed files with 567 additions and 113 deletions

View File

@@ -71,7 +71,9 @@ class UiTheme {
),
maximumSize: const Size(double.infinity, 54),
).copyWith(
side: WidgetStateProperty.resolveWith<BorderSide?>((Set<WidgetState> states) {
side: WidgetStateProperty.resolveWith<BorderSide?>((
Set<WidgetState> states,
) {
if (states.contains(WidgetState.disabled)) {
return const BorderSide(
color: UiColors.borderPrimary,
@@ -80,7 +82,9 @@ class UiTheme {
}
return null;
}),
overlayColor: WidgetStateProperty.resolveWith((Set<WidgetState> states) {
overlayColor: WidgetStateProperty.resolveWith((
Set<WidgetState> states,
) {
if (states.contains(WidgetState.hovered))
return UiColors.buttonPrimaryHover;
return null;
@@ -239,7 +243,9 @@ class UiTheme {
navigationBarTheme: NavigationBarThemeData(
backgroundColor: UiColors.white,
indicatorColor: UiColors.primaryInverse.withAlpha(51), // 20% of 255
labelTextStyle: WidgetStateProperty.resolveWith((Set<WidgetState> states) {
labelTextStyle: WidgetStateProperty.resolveWith((
Set<WidgetState> states,
) {
if (states.contains(WidgetState.selected)) {
return UiTypography.footnote2m.textPrimary;
}
@@ -249,13 +255,38 @@ class UiTheme {
// Switch Theme
switchTheme: SwitchThemeData(
trackColor: WidgetStateProperty.resolveWith<Color>((Set<WidgetState> states) {
trackColor: WidgetStateProperty.resolveWith<Color>((
Set<WidgetState> states,
) {
if (states.contains(WidgetState.selected)) {
return UiColors.switchActive;
return UiColors.primary.withAlpha(60);
}
return UiColors.switchInactive;
}),
thumbColor: const WidgetStatePropertyAll<Color>(UiColors.white),
thumbColor: WidgetStateProperty.resolveWith<Color>((
Set<WidgetState> states,
) {
if (states.contains(WidgetState.selected)) {
return UiColors.primary;
}
return UiColors.white;
}),
trackOutlineColor: WidgetStateProperty.resolveWith<Color?>((
Set<WidgetState> states,
) {
if (states.contains(WidgetState.selected)) {
return UiColors.primary;
}
return UiColors.transparent;
}),
trackOutlineWidth: WidgetStateProperty.resolveWith<double?>((
Set<WidgetState> states,
) {
if (states.contains(WidgetState.selected)) {
return 1.0;
}
return 0.0;
}),
),
// Checkbox Theme