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,38 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:get_storage/get_storage.dart';
void main() async {
await GetStorage.init();
runApp(App());
}
class Controller extends GetxController {
final box = GetStorage();
bool get isDark => box.read('darkmode') ?? false;
ThemeData get theme => isDark ? ThemeData.dark() : ThemeData.light();
void changeTheme(bool val) => box.write('darkmode', val);
}
class App extends StatelessWidget {
@override
Widget build(BuildContext context) {
final controller = Get.put(Controller());
return Obx(() {
return MaterialApp(
theme: controller.theme,
home: Scaffold(
appBar: AppBar(title: Text("Get Storage")),
body: Center(
child: SwitchListTile(
value: controller.isDark,
title: Text("Touch to change ThemeMode"),
onChanged: controller.changeTheme,
),
),
),
);
});
}
}