Quick Links added

This commit is contained in:
2025-11-14 15:24:02 +05:30
parent 3135116f26
commit 43d92d799b
4 changed files with 257 additions and 88 deletions

View File

@@ -1,6 +1,14 @@
import 'package:flutter/material.dart';
import 'package:kmobile/l10n/app_localizations.dart';
// Data model for a single FAQ item
class FaqItem {
final String question;
final String answer;
FaqItem({required this.question, required this.answer});
}
class FaqsScreen extends StatefulWidget {
const FaqsScreen({super.key});
@@ -9,55 +17,95 @@ class FaqsScreen extends StatefulWidget {
}
class _FaqsScreenState extends State<FaqsScreen> {
@override
void initState() {
super.initState();
_getFaqs();
}
// A placeholder for your future API call
Future<void> _getFaqs() async {
// TODO: Implement API call to fetch FAQs data
// For now, simulating a network call with a delay
await Future.delayed(const Duration(seconds: 1));
// In a real implementation, you would process the API response here
}
// List of FAQs
final List<FaqItem> _faqs = [
FaqItem(
question: "How do I log in to the mobile banking app?",
answer:
"You can log in using your customer number and password. Biometric login (fingerprint) and MPIN is also available for supported devices.",
),
FaqItem(
question: "Is my banking information secure on this app?",
answer:
"Yes. We use industry-standard encryption and multi-factor authentication to ensure your data is safe.",
),
FaqItem(
question: "How can I check my account balance?",
answer:
"Once logged in, your account balance will be displayed on the home screen. You can also view detailed balances under the “Accounts” section.",
),
FaqItem(
question: "Can I transfer money to other bank accounts?",
answer:
"Yes. You can use NEFT, RTGS or IMPS to transfer funds to any bank account in India.",
),
FaqItem(
question: "How do I view my transaction history?",
answer:
"Click on the “Account Statement” icon under the Home Screen to view recent and past transactions.",
),
];
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Row(
children: [
Flexible(
child: Text(
AppLocalizations.of(context).faq,
softWrap: true,
style: const TextStyle(
fontSize: 16.5,
),
textAlign: TextAlign.left,
),
),
],
),
title: Text(AppLocalizations.of(context).faq),
),
body: Stack(
children: [
// Background logo
IgnorePointer(
child: Center(
child: Opacity(
opacity: 0.1, // Low opacity
opacity: 0.1,
child: Image.asset(
'assets/images/logo.png',
width: 200, // Adjust size as needed
height: 200, // Adjust size as needed
width: 200,
height: 200,
),
),
),
),
// FAQ List
ListView.builder(
padding: const EdgeInsets.all(8.0),
itemCount: _faqs.length,
itemBuilder: (context, index) {
final faq = _faqs[index];
return Card(
margin:
const EdgeInsets.symmetric(vertical: 8.0, horizontal: 4.0),
elevation: 2.0,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12.0),
),
child: ExpansionTile(
title: Text(
faq.question,
style: const TextStyle(
fontWeight: FontWeight.w600,
),
),
children: <Widget>[
Padding(
padding: const EdgeInsets.fromLTRB(16.0, 0, 16.0, 16.0),
child: Text(
faq.answer,
style: TextStyle(
fontSize: 14,
color: Colors.grey[700],
height: 1.5,
),
),
),
],
),
);
},
),
],
),
);
}
}
}