import 'package:flutter/material.dart'; import '../../../../l10n/app_localizations.dart'; import '../models/legal_document_type.dart'; IconData legalDocumentIcon(LegalDocumentType type) { return switch (type) { LegalDocumentType.aboutUs => Icons.info_outline_rounded, LegalDocumentType.privacyPolicy => Icons.security_rounded, LegalDocumentType.termsOfService => Icons.description_outlined, }; } String legalDocumentAssetPath(Locale locale, LegalDocumentType type) { final localeFolder = locale.languageCode == 'en' ? 'en' : 'zh'; final fileName = switch (type) { LegalDocumentType.aboutUs => 'about_us.md', LegalDocumentType.privacyPolicy => 'privacy_policy.md', LegalDocumentType.termsOfService => 'terms_of_service.md', }; return 'assets/legal/$localeFolder/$fileName'; } String legalDocumentTitle(AppLocalizations l10n, LegalDocumentType type) { return switch (type) { LegalDocumentType.aboutUs => l10n.aboutUs, LegalDocumentType.privacyPolicy => l10n.privacyPolicy, LegalDocumentType.termsOfService => l10n.termsOfService, }; } String legalDocumentSubtitle(AppLocalizations l10n, LegalDocumentType type) { return switch (type) { LegalDocumentType.aboutUs => l10n.aboutUsSubtitle, LegalDocumentType.privacyPolicy => l10n.privacyPolicySubtitle, LegalDocumentType.termsOfService => l10n.termsOfServiceSubtitle, }; }