inou/app/lib/features/static/faq_page.dart

188 lines
6.6 KiB
Dart

import 'package:flutter/material.dart';
import 'package:inou_app/design/inou_theme.dart';
import 'package:inou_app/design/inou_text.dart';
import 'package:inou_app/design/widgets/widgets.dart';
/// FAQ page
class FaqPage extends StatelessWidget {
const FaqPage({super.key});
@override
Widget build(BuildContext context) {
return InouPage(
currentRoute: '/faq',
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const SizedBox(height: 48),
Text(
'Frequently Asked Questions',
style: InouText.pageTitle,
),
const SizedBox(height: 16),
Text(
'Everything you need to know about inou.',
style: InouText.body.copyWith(
color: InouTheme.textMuted,
fontWeight: FontWeight.w300,
),
),
const SizedBox(height: 48),
..._buildFaqItems(),
const SizedBox(height: 48),
// Contact CTA
Container(
padding: const EdgeInsets.all(24),
decoration: BoxDecoration(
color: InouTheme.bgCard,
borderRadius: InouTheme.borderRadiusLg,
border: Border.all(color: InouTheme.border),
),
child: Row(
children: [
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'Still have questions?',
style: InouText.h3,
),
const SizedBox(height: 4),
Text(
'We\'re here to help.',
style: InouText.body.copyWith(
color: InouTheme.textMuted,
),
),
],
),
),
InouButton(
text: 'Contact us',
variant: ButtonVariant.secondary,
onPressed: () => Navigator.pushNamed(context, '/connect'),
),
],
),
),
const SizedBox(height: 48),
],
),
);
}
List<Widget> _buildFaqItems() {
final faqs = [
_FaqItem(
question: 'What is inou?',
answer: 'inou is a secure platform that organizes all your health data — medical images, lab results, genetic information, vitals, and more — in one place. It then connects securely with AI to help you understand your health better than ever before.',
),
_FaqItem(
question: 'Is my data safe?',
answer: 'Absolutely. Your data is encrypted with FIPS 140-3 compliant encryption at rest and in transit. We run on dedicated hardware (not shared cloud), and we never sell, share, or use your data to train AI models. See our Security page for complete details.',
),
_FaqItem(
question: 'What file formats do you support?',
answer: 'We support DICOM files (medical imaging), PDF (lab reports, medical records), CSV (lab data, health exports), VCF (genetic data from 23andMe, Ancestry, etc.), and common image formats for documents.',
),
_FaqItem(
question: 'How does the AI integration work?',
answer: 'You control when and how your data is shared with AI. When you choose to connect, your data is transmitted securely to the AI provider you select. The AI can then analyze your complete health picture and provide insights no single specialist could.',
),
_FaqItem(
question: 'Can I share my data with my doctor?',
answer: 'Yes. You can generate secure, time-limited sharing links for any part of your health dossier. Your doctor gets read-only access to exactly what you choose to share.',
),
_FaqItem(
question: 'What does it cost?',
answer: 'Basic storage and organization is free. Premium features like advanced AI analysis, family accounts, and priority support are available with a subscription. See our pricing page for current plans.',
),
_FaqItem(
question: 'Can I delete my data?',
answer: 'Yes, completely. You can delete individual files or your entire account at any time. When you delete, the data is permanently removed from our systems — no backups retained, no recovery possible.',
),
_FaqItem(
question: 'Do you support family accounts?',
answer: 'Yes. You can create dossiers for family members you care for — children, elderly parents, anyone who needs an advocate. Each dossier is separate and secure.',
),
];
return faqs.map((faq) => _FaqExpansionTile(faq: faq)).toList();
}
}
class _FaqItem {
final String question;
final String answer;
const _FaqItem({
required this.question,
required this.answer,
});
}
class _FaqExpansionTile extends StatefulWidget {
final _FaqItem faq;
const _FaqExpansionTile({required this.faq});
@override
State<_FaqExpansionTile> createState() => _FaqExpansionTileState();
}
class _FaqExpansionTileState extends State<_FaqExpansionTile> {
bool _isExpanded = false;
@override
Widget build(BuildContext context) {
return Container(
margin: const EdgeInsets.only(bottom: 12),
decoration: BoxDecoration(
color: InouTheme.bgCard,
borderRadius: InouTheme.borderRadiusLg,
border: Border.all(color: InouTheme.border),
),
child: Theme(
data: Theme.of(context).copyWith(dividerColor: Colors.transparent),
child: ExpansionTile(
tilePadding: const EdgeInsets.symmetric(horizontal: 20, vertical: 4),
childrenPadding: const EdgeInsets.fromLTRB(20, 0, 20, 20),
title: Text(
widget.faq.question,
style: InouText.body.copyWith(
fontWeight: FontWeight.w500,
),
),
trailing: AnimatedRotation(
turns: _isExpanded ? 0.5 : 0,
duration: const Duration(milliseconds: 200),
child: Icon(
Icons.keyboard_arrow_down,
color: InouTheme.textMuted,
),
),
onExpansionChanged: (expanded) {
setState(() => _isExpanded = expanded);
},
children: [
Text(
widget.faq.answer,
style: InouText.body.copyWith(
color: InouTheme.textMuted,
height: 1.7,
),
),
],
),
),
);
}
}