Fees
Get Fee Details
GET /parent/fee/fees?studentId={id}&academicYearId={yearId}
{
"data": {
"studentId": "uuid",
"academicYear": "2024-25",
"totalFee": 60000,
"paid": 40000,
"pending": 20000,
"nextDueDate": "2024-05-15",
"heads": [
{ "name": "Tuition Fee", "total": 36000, "paid": 24000, "pending": 12000 },
{ "name": "Transport Fee", "total": 18000, "paid": 12000, "pending": 6000 },
{ "name": "Lab Fee", "total": 6000, "paid": 4000, "pending": 2000 }
]
}
}
UI — Fee Summary
class FeeCard extends StatelessWidget {
@override
Widget build(BuildContext context) {
final feeVM = context.watch<FeeViewModel>();
final balance = feeVM.balance;
return Card(
child: Padding(
padding: const EdgeInsets.all(16),
child: Column(
children: [
Text(
'₹${balance.pending}',
style: const TextStyle(fontSize: 32, fontWeight: FontWeight.bold, color: Colors.red),
),
const Text('Amount Pending'),
const SizedBox(height: 16),
LinearProgressIndicator(
value: balance.paid / balance.totalFee,
backgroundColor: Colors.red.shade100,
valueColor: AlwaysStoppedAnimation(Colors.green),
),
const SizedBox(height: 8),
Text('₹${balance.paid} of ₹${balance.totalFee} paid'),
if (balance.nextDueDate != null)
Text('Next due: ${balance.nextDueDate}', style: const TextStyle(color: Colors.grey)),
],
),
),
);
}
}