130 lines
3.7 KiB
Dart
130 lines
3.7 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'channel_list_screen.dart';
|
|
|
|
class HomeScreen extends StatelessWidget {
|
|
const HomeScreen({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
backgroundColor: Colors.black,
|
|
body: SafeArea(
|
|
child: Center(
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: [
|
|
const Text(
|
|
'برنامهها',
|
|
style: TextStyle(
|
|
color: Colors.white38,
|
|
fontSize: 9,
|
|
letterSpacing: 0.5,
|
|
),
|
|
),
|
|
const SizedBox(height: 16),
|
|
Row(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: [
|
|
_AppIcon(
|
|
icon: Icons.radio,
|
|
label: 'بیسیم',
|
|
color: const Color(0xFF00C853),
|
|
onTap: () {
|
|
Navigator.push(
|
|
context,
|
|
MaterialPageRoute(
|
|
builder: (_) => const ChannelListScreen(),
|
|
),
|
|
);
|
|
},
|
|
),
|
|
const SizedBox(width: 20),
|
|
_AppIcon(
|
|
icon: Icons.phone,
|
|
label: 'تلفن',
|
|
color: const Color(0xFF2979FF),
|
|
onTap: () {
|
|
ScaffoldMessenger.of(context).showSnackBar(
|
|
const SnackBar(
|
|
content: Text(
|
|
'به زودی',
|
|
textAlign: TextAlign.center,
|
|
style: TextStyle(
|
|
fontSize: 11,
|
|
color: Colors.white,
|
|
),
|
|
),
|
|
duration: Duration(seconds: 1),
|
|
backgroundColor: Color(0xFF2C2C2E),
|
|
behavior: SnackBarBehavior.floating,
|
|
margin: EdgeInsets.symmetric(
|
|
horizontal: 24, vertical: 40),
|
|
),
|
|
);
|
|
},
|
|
),
|
|
],
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|
|
class _AppIcon extends StatelessWidget {
|
|
final IconData icon;
|
|
final String label;
|
|
final Color color;
|
|
final VoidCallback onTap;
|
|
|
|
const _AppIcon({
|
|
required this.icon,
|
|
required this.label,
|
|
required this.color,
|
|
required this.onTap,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return GestureDetector(
|
|
onTap: onTap,
|
|
child: Column(
|
|
mainAxisSize: MainAxisSize.min,
|
|
children: [
|
|
Container(
|
|
width: 58,
|
|
height: 58,
|
|
decoration: BoxDecoration(
|
|
color: color.withValues(alpha: 0.13),
|
|
shape: BoxShape.circle,
|
|
border: Border.all(
|
|
color: color.withValues(alpha: 0.45),
|
|
width: 1.5,
|
|
),
|
|
boxShadow: [
|
|
BoxShadow(
|
|
color: color.withValues(alpha: 0.18),
|
|
blurRadius: 12,
|
|
spreadRadius: 1,
|
|
),
|
|
],
|
|
),
|
|
child: Icon(icon, color: color, size: 28),
|
|
),
|
|
const SizedBox(height: 7),
|
|
Text(
|
|
label,
|
|
style: const TextStyle(
|
|
color: Colors.white,
|
|
fontSize: 11,
|
|
fontWeight: FontWeight.w500,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|