103 lines
3.0 KiB
Dart
103 lines
3.0 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_svg/svg.dart';
|
|
import 'package:material_symbols_icons/material_symbols_icons.dart';
|
|
import 'package:url_launcher/url_launcher.dart';
|
|
|
|
class EnquiryScreen extends StatefulWidget {
|
|
const EnquiryScreen({super.key});
|
|
|
|
@override
|
|
State<EnquiryScreen> createState() => _EnquiryScreen();
|
|
}
|
|
|
|
class _EnquiryScreen extends State<EnquiryScreen> {
|
|
Future<void> _launchEmail() async {
|
|
final Uri emailUri = Uri(
|
|
scheme: 'mailto',
|
|
path: 'helpdesk@kccb.in',
|
|
);
|
|
if (await canLaunchUrl(emailUri)) {
|
|
await launchUrl(emailUri);
|
|
} else {
|
|
debugPrint('Could not launch email client');
|
|
}
|
|
}
|
|
|
|
Future<void> _launchPhone() async {
|
|
final Uri phoneUri = Uri(scheme: 'tel', path: '0651-312861');
|
|
if (await canLaunchUrl(phoneUri)) {
|
|
await launchUrl(phoneUri);
|
|
} else {
|
|
debugPrint('Could not launch phone dialer');
|
|
}
|
|
}
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
appBar: AppBar(
|
|
leading: IconButton(
|
|
icon: const Icon(Symbols.arrow_back_ios_new),
|
|
onPressed: () {
|
|
Navigator.pop(context);
|
|
},
|
|
),
|
|
title: const Text(
|
|
'Enquiry',
|
|
style: TextStyle(color: Colors.black, fontWeight: FontWeight.w500),
|
|
),
|
|
centerTitle: false,
|
|
actions: [
|
|
Padding(
|
|
padding: const EdgeInsets.only(right: 10.0),
|
|
child: CircleAvatar(
|
|
backgroundColor: Colors.grey[200],
|
|
radius: 20,
|
|
child: SvgPicture.asset(
|
|
'assets/images/avatar_male.svg',
|
|
width: 40,
|
|
height: 40,
|
|
fit: BoxFit.cover,
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
body: Padding(
|
|
padding: const EdgeInsets.all(16.0),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
const Text("Mail us at", style: TextStyle(color: Colors.grey)),
|
|
const SizedBox(height: 4),
|
|
GestureDetector(
|
|
onTap: _launchEmail,
|
|
child: const Text(
|
|
"helpdesk@kccb.in",
|
|
style: TextStyle(color: Colors.blue),
|
|
),
|
|
),
|
|
const SizedBox(height: 20),
|
|
const Text("Call us at", style: TextStyle(color: Colors.grey)),
|
|
const SizedBox(height: 4),
|
|
GestureDetector(
|
|
onTap: _launchPhone,
|
|
child: const Text(
|
|
"0651-312861",
|
|
style: TextStyle(color: Colors.blue),
|
|
),
|
|
),
|
|
const SizedBox(height: 20),
|
|
const Text("Write to us", style: TextStyle(color: Colors.grey)),
|
|
const SizedBox(height: 4),
|
|
const Text(
|
|
"101 Street, Some Street, Some Address\nSome Address",
|
|
style: TextStyle(color: Colors.blue),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|