// main.dart
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:flutter_colorpicker/flutter_colorpicker.dart';
import 'package:animated_text_kit/animated_text_kit.dart';
void main() => runApp(const VipeRoomApp());
class VipeRoomApp extends StatelessWidget {
const VipeRoomApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'VipeRoom',
theme: ThemeData(
primarySwatch: Colors.blue,
fontFamily: GoogleFonts.pressStart2p().fontFamily, // Fuente retro
),
home: const MainMenu(),
);
}
}
// --------------------------
// Pantalla Principal
// --------------------------
class MainMenu extends StatelessWidget {
const MainMenu({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.black,
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
AnimatedTextKit(
animatedTexts: [
ColorizeAnimatedText(
'VIPEROOM',
textStyle: const TextStyle(fontSize: 40.0),
colors: [Colors.purple, Colors.cyan, Colors.pink],
),
],
),
const SizedBox(height: 30),
_buildNeonButton('Crear Perfil', () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => const ProfileEditor()),
);
}),
_buildNeonButton('Explorar Salas', () {}),
],
),
),
);
}
Widget _buildNeonButton(String text, VoidCallback onPressed) {
return Container(
margin: const EdgeInsets.all(10),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
gradient: const LinearGradient(
colors: [Colors.purple, Colors.cyan],
),
boxShadow: [
BoxShadow(
color: Colors.cyan.withOpacity(0.5),
blurRadius: 10,
),
],
),
child: ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: Colors.transparent,
shadowColor: Colors.transparent,
),
onPressed: onPressed,
child: Padding(
padding: const EdgeInsets.all(15.0),
child: Text(
text,
style: TextStyle(
fontFamily: GoogleFonts.pressStart2p().fontFamily,
color: Colors.white,
),
),
),
),
);
}
}
// --------------------------
// Editor de Perfil
// --------------------------
class ProfileEditor extends StatefulWidget {
const ProfileEditor({super.key});
@override
_ProfileEditorState createState() => _ProfileEditorState();
}
class _ProfileEditorState extends State<ProfileEditor> {
Color _backgroundColor = Colors.black;
String _selectedMusic = 'Synthwave_Theme.mp3';
void _changeBackgroundColor() {
showDialog(
context: context,
builder: (BuildContext context) {
return AlertDialog(
title: const Text('Elige un color'),
content: SingleChildScrollView(
child: ColorPicker(
pickerColor: _backgroundColor,
onColorChanged: (color) {
setState(() => _backgroundColor = color);
},
),
),
);
},
);
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Personaliza tu VipeRoom'),
backgroundColor: Colors.black,
),
body: Stack(
children: [
Container(color: _backgroundColor),
Positioned(
top: 20,
right: 20,
child: Column(
children: [
_buildControlButton('Color', _changeBackgroundColor),
_buildControlButton('Música', () {}),
_buildControlButton('Plantillas', () {}),
],
),
),
// Vista previa del perfil
Center(
child: Container(
width: 300,
height: 500,
decoration: BoxDecoration(
border: Border.all(color: Colors.cyan, width: 3),
borderRadius: BorderRadius.circular(20),
),
child: const Center(child: Text('Previsualización')),
),
],
),
floatingActionButton: FloatingActionButton(
onPressed: () {},
backgroundColor: Colors.purple,
child: const Icon(Icons.check, color: Colors.white),
),
);
}
Widget _buildControlButton(String label, VoidCallback onPressed) {
return Container(
margin: const EdgeInsets.all(5),
decoration: BoxDecoration(
color: Colors.black.withOpacity(0.7),
borderRadius: BorderRadius.circular(10),
),
child: IconButton(
icon: Text(label, style: const TextStyle(color: Colors.cyan)),
onPressed: onPressed,
),
);
}
}