69 lines
2.3 KiB
Dart
69 lines
2.3 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:kmobile/api/services/branch_service.dart';
|
|
|
|
class BranchDetailsScreen extends StatelessWidget {
|
|
final Branch branch;
|
|
|
|
const BranchDetailsScreen({super.key, required this.branch});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
appBar: AppBar(
|
|
title: Text(branch.branch_name),
|
|
),
|
|
body: SingleChildScrollView(
|
|
padding: const EdgeInsets.all(16.0),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
_buildDetailRow("Branch Name", branch.branch_name),
|
|
_buildDetailRow("Branch Code", branch.branch_code),
|
|
_buildDetailRow("Zone", branch.zone),
|
|
_buildDetailRow("Tehsil", branch.tehsil),
|
|
_buildDetailRow("Block", branch.block),
|
|
_buildDetailRow("District", branch.distt_name),
|
|
_buildDetailRow("Pincode", branch.pincode),
|
|
_buildDetailRow("Post Office", branch.post_office),
|
|
_buildDetailRow("Date of Opening", branch.date_of_opening),
|
|
_buildDetailRow("Branch Type", branch.type_of_branch),
|
|
_buildDetailRow("Telephone No.", branch.telephone_no),
|
|
_buildDetailRow("RTGS Account No.", branch.rtgs_acct_no),
|
|
_buildDetailRow("RBI Code 1", branch.rbi_code_1),
|
|
_buildDetailRow("RBI Code 2", branch.rbi_code_2),
|
|
_buildDetailRow("Latitude", branch.br_lattitude),
|
|
_buildDetailRow("Longitude", branch.br_longitude),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
|
|
Widget _buildDetailRow(String label, String value) {
|
|
return Padding(
|
|
padding: const EdgeInsets.symmetric(vertical: 8.0),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Text(
|
|
label,
|
|
style: TextStyle(
|
|
fontSize: 14,
|
|
color: Colors.grey[600],
|
|
),
|
|
),
|
|
const SizedBox(height: 4),
|
|
Text(
|
|
value,
|
|
style: const TextStyle(
|
|
fontSize: 16,
|
|
fontWeight: FontWeight.w500,
|
|
),
|
|
),
|
|
const Divider(height: 16),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|