148 lines
5.2 KiB
Dart
148 lines
5.2 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:kmobile/l10n/app_localizations.dart';
|
|
|
|
class PMMainScreen extends StatefulWidget {
|
|
const PMMainScreen({super.key});
|
|
|
|
@override
|
|
State<PMMainScreen> createState() => _PMMainScreenState();
|
|
}
|
|
|
|
class _PMMainScreenState extends State<PMMainScreen> {
|
|
final TextEditingController _accountController = TextEditingController();
|
|
String? _selectedScheme;
|
|
|
|
final List<String> _schemes = [
|
|
'Pradhan Mantri Jeevan Jyoti Bima Yojana (PMJJBY)',
|
|
'Pradhan Mantri Suraksha Bima Yojana (PMSBY)',
|
|
];
|
|
|
|
@override
|
|
void dispose() {
|
|
_accountController.dispose();
|
|
super.dispose();
|
|
}
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
appBar: AppBar(
|
|
title: const Text('Pradhan Mantri Yojana'),
|
|
centerTitle: false,
|
|
),
|
|
body: SingleChildScrollView(
|
|
padding: const EdgeInsets.all(16.0),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
|
children: [
|
|
Card(
|
|
elevation: 2,
|
|
child: Padding(
|
|
padding: const EdgeInsets.all(16.0),
|
|
child: Text(
|
|
"Create and Enquire about your Pradhan Mantri Jeevan Jyoti Bima Yojana (PMJJBY) and Pradhan Mantri Suraksha Bima Yojana(PMSBY) schemes.",
|
|
style: Theme.of(context).textTheme.titleMedium,
|
|
),
|
|
),
|
|
),
|
|
const SizedBox(height: 16),
|
|
Card(
|
|
elevation: 2,
|
|
child: Padding(
|
|
padding: const EdgeInsets.all(16.0),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
TextField(
|
|
controller: _accountController,
|
|
decoration: const InputDecoration(
|
|
labelText: 'Account Number',
|
|
border: OutlineInputBorder(),
|
|
),
|
|
keyboardType: TextInputType.number,
|
|
),
|
|
const SizedBox(height: 16),
|
|
DropdownButtonFormField<String>(
|
|
value: _selectedScheme,
|
|
decoration: const InputDecoration(
|
|
labelText: 'Scheme',
|
|
border: OutlineInputBorder(),
|
|
),
|
|
items: _schemes.map((String scheme) {
|
|
return DropdownMenuItem<String>(
|
|
value: scheme,
|
|
child: Text(
|
|
scheme,
|
|
style: const TextStyle(fontSize: 12),
|
|
overflow: TextOverflow.ellipsis,
|
|
),
|
|
);
|
|
}).toList(),
|
|
onChanged: (String? newValue) {
|
|
setState(() {
|
|
_selectedScheme = newValue;
|
|
});
|
|
},
|
|
isExpanded: true,
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
const SizedBox(height: 24),
|
|
Row(
|
|
children: [
|
|
Expanded(
|
|
child: ElevatedButton(
|
|
onPressed: () {
|
|
// Action for Create button
|
|
},
|
|
style: ElevatedButton.styleFrom(
|
|
backgroundColor:
|
|
Theme.of(context).colorScheme.primaryContainer,
|
|
foregroundColor:
|
|
Theme.of(context).colorScheme.onPrimaryContainer,
|
|
padding: const EdgeInsets.symmetric(vertical: 16),
|
|
elevation: 4,
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(8),
|
|
),
|
|
),
|
|
child: const Text(
|
|
"Create",
|
|
style: TextStyle(fontWeight: FontWeight.bold),
|
|
),
|
|
),
|
|
),
|
|
const SizedBox(width: 16),
|
|
Expanded(
|
|
child: ElevatedButton(
|
|
onPressed: () {
|
|
// Action for Enquiry button
|
|
},
|
|
style: ElevatedButton.styleFrom(
|
|
backgroundColor:
|
|
Theme.of(context).colorScheme.primaryContainer,
|
|
foregroundColor:
|
|
Theme.of(context).colorScheme.onPrimaryContainer,
|
|
padding: const EdgeInsets.symmetric(vertical: 16),
|
|
elevation: 4,
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(8),
|
|
),
|
|
),
|
|
child: Text(
|
|
AppLocalizations.of(context).enquiry,
|
|
style: const TextStyle(fontWeight: FontWeight.bold),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|