enquiry-screen
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:kmobile/features/enquiry/screens/enquiry_screen.dart';
|
||||
import 'package:material_symbols_icons/material_symbols_icons.dart';
|
||||
|
||||
class ChequeManagementScreen extends StatefulWidget {
|
||||
@@ -50,8 +50,8 @@ class _ChequeManagementScreen extends State<ChequeManagementScreen>{
|
||||
icon: Symbols.data_alert,
|
||||
label: 'Enquiry',
|
||||
onTap: () {
|
||||
// Navigator.push(context, MaterialPageRoute(
|
||||
// builder: (context) => const BlockCardScreen()));
|
||||
Navigator.push(context, MaterialPageRoute(
|
||||
builder: (context) => const EnquiryScreen()));
|
||||
},
|
||||
),
|
||||
|
||||
|
@@ -4,6 +4,7 @@ import 'package:kmobile/features/accounts/screens/account_statement_screen.dart'
|
||||
import 'package:kmobile/features/cheque/screens/cheque_management_screen.dart';
|
||||
import 'package:kmobile/features/customer_info/screens/customer_info_screen.dart';
|
||||
import 'package:kmobile/features/beneficiaries/screens/manage_beneficiaries_screen.dart';
|
||||
import 'package:kmobile/features/enquiry/screens/enquiry_screen.dart';
|
||||
import 'package:material_symbols_icons/material_symbols_icons.dart';
|
||||
|
||||
class DashboardScreen extends StatefulWidget {
|
||||
@@ -136,7 +137,10 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
||||
builder: (context) => const ManageBeneficiariesScreen()));
|
||||
}),
|
||||
_buildQuickLink(Symbols.support_agent, "Contact \n Us",
|
||||
() => print("")),
|
||||
() {
|
||||
Navigator.push(context, MaterialPageRoute(
|
||||
builder: (context) => const EnquiryScreen()));
|
||||
}),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
|
93
lib/features/enquiry/screens/enquiry_screen.dart
Normal file
93
lib/features/enquiry/screens/enquiry_screen.dart
Normal file
@@ -0,0 +1,93 @@
|
||||
import 'package:flutter/material.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: const [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(right: 10.0),
|
||||
child: CircleAvatar(
|
||||
backgroundImage: AssetImage('assets/images/avatar.jpg'), // Replace with your image
|
||||
radius: 20,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
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),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user