90 lines
2.9 KiB
Dart
90 lines
2.9 KiB
Dart
import 'package:flutter/material.dart';
|
||
import 'package:youtube_player_flutter/youtube_player_flutter.dart';
|
||
|
||
import '../theme/gradient_scaffold.dart';
|
||
|
||
class HelpScreen extends StatelessWidget {
|
||
final bool isPremiumUser;
|
||
|
||
HelpScreen({super.key, this.isPremiumUser = false});
|
||
|
||
final String video1Id =
|
||
YoutubePlayer.convertUrlToId(
|
||
'https://www.youtube.com/watch?v=dQw4w9WgXcQ',
|
||
) ??
|
||
'';
|
||
final String video2Id =
|
||
YoutubePlayer.convertUrlToId(
|
||
'https://www.youtube.com/watch?v=oHg5SJYRHA0',
|
||
) ??
|
||
'';
|
||
|
||
@override
|
||
Widget build(BuildContext context) {
|
||
return GradientScaffold(
|
||
appBar: AppBar(title: Text('Aide et Ressources')),
|
||
body: ListView(
|
||
padding: const EdgeInsets.all(16),
|
||
children: [
|
||
const Text(
|
||
'Maîtrise la bureautique comme un chef',
|
||
style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold),
|
||
),
|
||
const SizedBox(height: 8),
|
||
YoutubePlayer(
|
||
controller: YoutubePlayerController(
|
||
initialVideoId: video1Id,
|
||
flags: const YoutubePlayerFlags(autoPlay: false),
|
||
),
|
||
showVideoProgressIndicator: true,
|
||
),
|
||
const SizedBox(height: 24),
|
||
const Text(
|
||
"Les 5 essentiels de la conduite d'entretien",
|
||
style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold),
|
||
),
|
||
const SizedBox(height: 8),
|
||
YoutubePlayer(
|
||
controller: YoutubePlayerController(
|
||
initialVideoId: video2Id,
|
||
flags: const YoutubePlayerFlags(autoPlay: false),
|
||
),
|
||
showVideoProgressIndicator: true,
|
||
),
|
||
const SizedBox(height: 24),
|
||
const ListTile(
|
||
leading: Icon(Icons.quiz, color: Colors.deepPurple),
|
||
title: Text('Teste tes connaissances'),
|
||
),
|
||
const ListTile(
|
||
leading: Icon(Icons.chat_bubble_outline, color: Colors.deepPurple),
|
||
title: Text('Des questions ? Utilise notre chatbot'),
|
||
),
|
||
const Divider(height: 32),
|
||
_premiumSection(
|
||
title: 'Comment faire un CV qui se démarque ?',
|
||
isPremium: isPremiumUser,
|
||
),
|
||
const SizedBox(height: 12),
|
||
_premiumSection(
|
||
title: 'Les clés d’un bilan de compétences réussi',
|
||
isPremium: isPremiumUser,
|
||
),
|
||
],
|
||
),
|
||
);
|
||
}
|
||
|
||
Widget _premiumSection({required String title, required bool isPremium}) {
|
||
return Opacity(
|
||
opacity: isPremium ? 1.0 : 0.5,
|
||
child: ListTile(
|
||
leading: const Icon(Icons.star, color: Colors.amber),
|
||
title: Text(title),
|
||
trailing: !isPremium ? const Icon(Icons.lock_outline) : null,
|
||
tileColor: isPremium ? Colors.white : Colors.grey[200],
|
||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
|
||
),
|
||
);
|
||
}
|
||
}
|