72 lines
1.9 KiB
Dart
72 lines
1.9 KiB
Dart
import 'package:flutter/material.dart';
|
|
import '../colors/app_colors.dart';
|
|
import '../strings/privacy_strings.dart';
|
|
|
|
const Color kPrivacyTeal = AppColors.teal;
|
|
|
|
/// Um dos itens de consentimento mostrados no ecrã de privacidade. Itens
|
|
/// com [required] a false (ex.: recolha de dados técnicos de utilização)
|
|
/// não bloqueiam o avanço se não forem marcados.
|
|
class PrivacyConsentItem {
|
|
const PrivacyConsentItem({
|
|
required this.id,
|
|
required this.text,
|
|
this.required = true,
|
|
});
|
|
|
|
final String id;
|
|
final String text;
|
|
final bool required;
|
|
}
|
|
|
|
/// Texto fixo dos consentimentos de privacidade, mostrado no cadastro.
|
|
const List<PrivacyConsentItem> kPrivacyConsentItems = [
|
|
PrivacyConsentItem(id: 'health_data', text: PrivacyStrings.healthDataConsent),
|
|
PrivacyConsentItem(
|
|
id: 'privacy_policy',
|
|
text: PrivacyStrings.privacyPolicyConsent,
|
|
),
|
|
PrivacyConsentItem(
|
|
id: 'tracking',
|
|
text: PrivacyStrings.trackingConsent,
|
|
required: false,
|
|
),
|
|
];
|
|
|
|
/// Emblema circular + título "Política de Privacidade", reutilizado onde
|
|
/// este conteúdo for mostrado.
|
|
class PrivacyHeader extends StatelessWidget {
|
|
const PrivacyHeader({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Column(
|
|
children: [
|
|
Container(
|
|
width: 76,
|
|
height: 76,
|
|
decoration: BoxDecoration(
|
|
color: kPrivacyTeal.withValues(alpha: 0.12),
|
|
shape: BoxShape.circle,
|
|
),
|
|
child: const Icon(
|
|
Icons.privacy_tip_rounded,
|
|
color: kPrivacyTeal,
|
|
size: 36,
|
|
),
|
|
),
|
|
const SizedBox(height: 16),
|
|
const Text(
|
|
PrivacyStrings.headerTitle,
|
|
textAlign: TextAlign.center,
|
|
style: TextStyle(
|
|
fontSize: 20,
|
|
fontWeight: FontWeight.w900,
|
|
color: Colors.black,
|
|
),
|
|
),
|
|
],
|
|
);
|
|
}
|
|
}
|