import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import '../services/lenormand_pairs_repository.dart'; import 'lenormand_station_screen.dart'; class LenormandExtrasScreen extends StatelessWidget { const LenormandExtrasScreen({super.key}); @override Widget build(BuildContext context) { final repo = LenormandPairsRepository(); return Scaffold( backgroundColor: const Color(0xFF0C0E1A), appBar: AppBar(title: const Text('Ленорман · триады и слои')), body: ListView( padding: const EdgeInsets.fromLTRB(16, 8, 16, 32), children: [ const Text( 'Триады', style: TextStyle(color: Color(0xFFFFD54F), fontWeight: FontWeight.w900, fontSize: 16), ), const SizedBox(height: 6), const Text( 'Тройные сочетания с Карусели (порядок карт в раскладе подряд).', style: TextStyle(color: Color(0x8AFFFFFF), fontSize: 12, height: 1.4), ), const SizedBox(height: 10), for (final t in repo.triads) Container( margin: const EdgeInsets.only(bottom: 10), padding: const EdgeInsets.all(12), decoration: BoxDecoration( color: const Color(0xFF151829), borderRadius: BorderRadius.circular(12), border: Border.all(color: const Color(0x1AFFFFFF)), ), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Wrap( spacing: 6, children: [ for (var i = 0; i < t.cards.length; i++) ActionChip( label: Text('${t.cards[i]}. ${t.names[i]}'), onPressed: () { HapticFeedback.selectionClick(); Navigator.push( context, MaterialPageRoute( builder: (_) => LenormandStationScreen(number: t.cards[i]), ), ); }, ), ], ), const SizedBox(height: 8), Text( t.text, style: const TextStyle(color: Color(0xFFE8EAF6), fontSize: 13, height: 1.45), ), ], ), ), const SizedBox(height: 16), const Text( 'Дополнительные разделы', style: TextStyle(color: Color(0xFFFFD54F), fontWeight: FontWeight.w900, fontSize: 16), ), const SizedBox(height: 10), for (final e in repo.extras) Theme( data: Theme.of(context).copyWith(dividerColor: Colors.transparent), child: ExpansionTile( collapsedBackgroundColor: const Color(0xFF151829), backgroundColor: const Color(0xFF151829), collapsedShape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(12), side: const BorderSide(color: Color(0x1AFFFFFF)), ), shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(12), side: const BorderSide(color: Color(0x4DFFD54F)), ), title: Text( e.title.isEmpty ? e.source : e.title, style: const TextStyle( color: Color(0xFFFFF9C4), fontWeight: FontWeight.w800, fontSize: 14, ), ), children: [ Padding( padding: const EdgeInsets.fromLTRB(14, 0, 14, 14), child: Text( e.text, style: const TextStyle(color: Color(0xFFD1D5DB), fontSize: 13, height: 1.5), ), ), ], ), ), ], ), ); } }