Files
CityCards_Customer_Flutter/lib/home/widgets/e_sim_offer_section.dart
2025-11-11 14:18:35 +05:30

158 lines
5.0 KiB
Dart

import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import '../../core/route_constants.dart';
class ESimOfferSection extends StatelessWidget {
const ESimOfferSection({super.key});
@override
Widget build(BuildContext context) {
return Container(
margin: const EdgeInsets.symmetric(horizontal: 16, vertical: 0),
padding: const EdgeInsets.all(10),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20),
gradient: const LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
Color(0xFF2A2B7B), // deep navy blue
Color(0xFF9E1E2E), // rich red tone
],
),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
// ===== HEADER LINE =====
RichText(
text: TextSpan(
children: [
TextSpan(
text: "Explore ",
style: GoogleFonts.poppins(
color: const Color(0xFFF95F62),
fontSize: 14,
fontWeight: FontWeight.w600,
),
),
TextSpan(
text: "More Cities.",
style: GoogleFonts.poppins(
color: Colors.white.withOpacity(0.9),
fontSize: 14,
fontWeight: FontWeight.w400,
),
),
],
),
),
const SizedBox(height: 10),
// ===== MAIN HEADING =====
Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
// Stay Connected
Text.rich(
TextSpan(
children: [
TextSpan(
text: "Stay ",
style: GoogleFonts.poppins(
color: Colors.white,
fontSize: 28,
fontWeight: FontWeight.w500,
),
),
TextSpan(
text: "Connected",
style: GoogleFonts.poppins(
color: const Color(0xFFF95F62),
fontSize: 28,
fontWeight: FontWeight.w600,
),
),
],
),
),
const SizedBox(height: 2),
// Everywhere (centered)
Center(
child: Text(
"Everywhere",
style: GoogleFonts.poppins(
color: Colors.white,
fontSize: 28,
fontWeight: FontWeight.w500,
),
),
),
],
),
const SizedBox(height: 20),
// ===== SUB CARD =====
Container(
width: double.infinity,
padding: const EdgeInsets.all(10),
decoration: BoxDecoration(
color: const Color(0xFFF95F62),
borderRadius: BorderRadius.circular(16),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
"Claim e-Sim offers with\nCityCard",
style: GoogleFonts.poppins(
color: Colors.white,
fontSize: 16,
fontWeight: FontWeight.w600,
),
),
InkWell(
onTap: (){
Navigator.of(context, rootNavigator: true)
.pushNamed(RouteConstants.esimOffer);
},
child: Container(
decoration: const BoxDecoration(
color: Colors.white,
shape: BoxShape.circle,
),
padding: const EdgeInsets.all(12),
child: Image.asset(
"assets/icons/arrow_angle_up.png",
color: Color(0xFFF95F62),
scale: 4,
),
),
)
],
),
const SizedBox(height: 4),
Text(
"Lorem ipsum dolor sit amet...",
style: GoogleFonts.poppins(
color: Colors.white.withOpacity(0.85),
fontSize: 13,
fontWeight: FontWeight.w400,
),
),
],
),
),
],
),
);
}
}