This commit is contained in:
Venba 2024-07-17 15:43:12 +05:30
parent 76ba68f022
commit f7edbd6a99
4 changed files with 4166 additions and 3772 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,3 @@
import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_image_slideshow/flutter_image_slideshow.dart';
@ -39,6 +38,7 @@ class _MyAppState extends State<MyApp> {
dynamic client_branch_id;
List<String> advertisementImages = [];
bool isLoading = true;
dynamic policyCount;
void _onTabChanged(int index) {
setState(() {
@ -98,7 +98,12 @@ class _MyAppState extends State<MyApp> {
if (response['status'] == 'success') {
setState(() {
policyList = response['data'];
print('policyList $policyList');
emp_name = response['emp_name'];
if (status == 'Active') {
policyCount = policyList.length;
print('policyCount : $policyCount');
}
});
print(policyList);
} else {
@ -217,6 +222,73 @@ class _MyAppState extends State<MyApp> {
),
),
SizedBox(height: 15),
Card(
elevation: 2,
color: Color(0xFFDDF3FF),
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(10), // Set the border radius here
),
child: ClipRRect(
borderRadius: BorderRadius.circular(
10), // Apply border radius to the container
child: Column(
children: [
Container(
decoration: BoxDecoration(
color: Color(
0xFFDDF3FF), // Set background color for the container
borderRadius: BorderRadius.circular(
10), // Set border radius for the container
),
padding: Responsive.isDesktop(context)
? EdgeInsets.only(
top: 10, bottom: 10, left: 10, right: 10)
: EdgeInsets.only(
top: 10, bottom: 10, left: 10, right: 10),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(
flex: 7,
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text(
'Policies for enrollment : $policyCount',
textAlign: TextAlign.center,
style: GoogleFonts.poppins(
fontSize:
Responsive.isDesktop(context) ? 18 : 14,
fontWeight: FontWeight.w500,
color: Color(0xFF404040),
),
),
],
),
),
Expanded(
flex: 5,
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
ElevatedButton(
onPressed: () {
Navigator.pushNamed(context, 'empDetails');
},
child: Text('View Details'),
),
],
),
),
],
),
),
],
),
),
),
SizedBox(height: 15),
if (advertisementImages != null)
Container(
child: Row(