new change to use intaleq_map sdk 04-16-4

This commit is contained in:
Hamza-Ayed
2026-04-16 19:45:03 +03:00
parent 0aa1f15f25
commit a54a7a4189
850 changed files with 83282 additions and 3075 deletions

View File

@@ -0,0 +1,12 @@
import 'package:get/get.dart';
import '../controllers/root_controller.dart';
class RootBinding extends Bindings {
@override
void dependencies() {
Get.lazyPut<RootController>(
() => RootController(),
);
}
}

View File

@@ -0,0 +1,20 @@
import 'package:get/get.dart';
class RootController extends GetxController {
//TODO: Implement RootController
final count = 0.obs;
@override
void onInit() {
super.onInit();
}
@override
void onReady() {
super.onReady();
}
@override
void onClose() {}
void increment() => count.value++;
}

View File

@@ -0,0 +1,74 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import '../../../../services/auth_service.dart';
import '../../../routes/app_pages.dart';
class DrawerWidget extends StatelessWidget {
const DrawerWidget({
Key? key,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return Drawer(
child: Column(
children: [
Container(
height: 100,
color: Colors.red,
),
ListTile(
title: Text('Home'),
onTap: () {
Get.rootDelegate.toNamed(Routes.HOME);
//to close the drawer
Navigator.of(context).pop();
},
),
ListTile(
title: Text('Settings'),
onTap: () {
Get.rootDelegate.toNamed(Routes.SETTINGS);
//to close the drawer
Navigator.of(context).pop();
},
),
if (AuthService.to.isLoggedInValue)
ListTile(
title: Text(
'Logout',
style: TextStyle(
color: Colors.red,
),
),
onTap: () {
AuthService.to.logout();
Get.rootDelegate.toNamed(Routes.LOGIN);
//to close the drawer
Navigator.of(context).pop();
},
),
if (!AuthService.to.isLoggedInValue)
ListTile(
title: Text(
'Login',
style: TextStyle(
color: Colors.blue,
),
),
onTap: () {
Get.rootDelegate.toNamed(Routes.LOGIN);
//to close the drawer
Navigator.of(context).pop();
},
),
],
),
);
}
}

View File

@@ -0,0 +1,31 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import '../../../routes/app_pages.dart';
import '../controllers/root_controller.dart';
import 'drawer.dart';
class RootView extends GetView<RootController> {
@override
Widget build(BuildContext context) {
return GetRouterOutlet.builder(
builder: (context, delegate, current) {
final title = current?.location;
return Scaffold(
drawer: DrawerWidget(),
appBar: AppBar(
title: Text(title ?? ''),
centerTitle: true,
),
body: GetRouterOutlet(
initialRoute: Routes.HOME,
// anchorRoute: '/',
// filterPages: (afterAnchor) {
// return afterAnchor.take(1);
// },
),
);
},
);
}
}