import 'package:flutter_intro/flutter_intro.dart'; import 'package:get/get.dart'; import 'package:get_storage/get_storage.dart'; class NoviceGuideService extends GetxService { final GetStorage _storage = GetStorage(); bool isHomeGuide = true; bool isAIGuide = true; @override void onInit() { super.onInit(); // isHomeGuide = _storage.read('home_guide') ?? false; // isAIGuide = _storage.read('ai_guide') ?? false; } void startHomeGuide() { if (!isHomeGuide) { isHomeGuide = true; _storage.write('home_guide', true); Intro.of(Get.context!).start(group: 'home'); } } void startAIGuide() async { if (!isAIGuide) { await Future.delayed(const Duration(milliseconds: 200)); isAIGuide = true; _storage.write('ai_guide', true); Intro.of(Get.context!).start(group: 'ai'); } } }