template list
This commit is contained in:
parent
b55b908f42
commit
9caf98de7c
66
lib/Screens/myTemplates/templatesList.dart
Normal file
66
lib/Screens/myTemplates/templatesList.dart
Normal file
@ -0,0 +1,66 @@
|
||||
import 'dart:convert';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:frontend/utils/auth_utils.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'package:responsive_builder/responsive_builder.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
import '../../config/apiUrl.dart';
|
||||
import '../../routes/custom_appBar.dart';
|
||||
import '../../routes/custom_drawer.dart';
|
||||
import '../../services/apiService.dart';
|
||||
import '../../utils/pagination.dart';
|
||||
import '../../widgets/custom_popup.dart';
|
||||
import '../../widgets/popup_userList_action.dart';
|
||||
|
||||
class templatesList extends StatefulWidget {
|
||||
@override
|
||||
_templatesListState createState() => _templatesListState();
|
||||
}
|
||||
|
||||
class _templatesListState extends State<templatesList> {
|
||||
final ApiService apiService = ApiService();
|
||||
|
||||
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ResponsiveBuilder(builder: (context, sizingInfo) {
|
||||
bool isDesktop = sizingInfo.deviceScreenType == DeviceScreenType.desktop;
|
||||
|
||||
return Scaffold(
|
||||
backgroundColor: Color(0xFFf5f5f5),
|
||||
appBar: CustomAppBar(isDesktop: isDesktop),
|
||||
drawer: CustomDrawer(isDesktop: false),
|
||||
body: Padding(
|
||||
padding: isDesktop
|
||||
? EdgeInsets.symmetric(
|
||||
horizontal: MediaQuery.of(context).size.width *
|
||||
0.1, // 30% of screen width as horizontal padding
|
||||
vertical: MediaQuery.of(context).size.height *
|
||||
0, // 5% of screen height as vertical padding
|
||||
)
|
||||
: EdgeInsets.all(0),
|
||||
child: Row(
|
||||
children: [
|
||||
|
||||
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -368,6 +368,8 @@ class _CustomAppBarState extends State<CustomAppBar> {
|
||||
break;
|
||||
case '/PolicyList':
|
||||
context.go('/PolicyList');
|
||||
case '/templatesList':
|
||||
context.go('/templatesList');
|
||||
case '/CreateUserDetails':
|
||||
context.go(
|
||||
"/CreateUserDetails",
|
||||
@ -509,6 +511,11 @@ final List<Map<String, dynamic>> menuItems = [
|
||||
'icon': Icons.account_circle,
|
||||
'label': 'My Profile'
|
||||
},
|
||||
{
|
||||
'value': '/templatesList',
|
||||
'icon': Icons.temple_buddhist_outlined,
|
||||
'label': 'My Templates'
|
||||
},
|
||||
{'value': '/logout', 'icon': Icons.login_outlined, 'label': 'Logout'},
|
||||
];
|
||||
|
||||
|
||||
@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:frontend/Screens/authentication/login/login_page.dart';
|
||||
import 'package:frontend/Screens/authentication/loginPage1.dart';
|
||||
import 'package:frontend/Screens/dashboard/home_page.dart';
|
||||
import 'package:frontend/Screens/myTemplates/templatesList.dart';
|
||||
import 'package:frontend/Screens/organization/orgSetup.dart';
|
||||
import 'package:frontend/Screens/organization/org_List.dart';
|
||||
import 'package:frontend/Screens/plans/create_plans.dart';
|
||||
@ -43,6 +44,10 @@ final GoRouter router = GoRouter(
|
||||
path: '/listPlan',
|
||||
builder: (context, state) => ListPlans(),
|
||||
),
|
||||
GoRoute(
|
||||
path: '/templatesList',
|
||||
builder: (context, state) => templatesList(),
|
||||
),
|
||||
GoRoute(
|
||||
path: '/createPlan',
|
||||
builder: (context, state) => CreatePlan(),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user