first commit

This commit is contained in:
Anbarasu
2026-05-26 18:01:57 +05:30
commit 6d59c8daf6
297 changed files with 35238 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
import 'dart:ui';
import 'package:get/get.dart';
import 'package:webview_flutter/webview_flutter.dart';
class FaqController extends GetxController {
WebViewController? webViewController;
var isLoading = true.obs;
@override
void onInit() {
super.onInit();
initializeWebView();
}
void initializeWebView() {
webViewController = WebViewController()
..setJavaScriptMode(JavaScriptMode.unrestricted)
..setBackgroundColor(const Color(0x00000000))
..setNavigationDelegate(
NavigationDelegate(
onPageStarted: (url) {
isLoading.value = true;
print('Started loading: $url');
},
onPageFinished: (url) {
isLoading.value = false;
print('Finished loading: $url');
},
onWebResourceError: (error) {
isLoading.value = false;
print('WebView error: ${error.description}');
},
),
);
loadFaqUrl();
}
Future<void> loadFaqUrl() async {
if (webViewController != null) {
try {
await webViewController!.loadRequest(Uri.parse('https://nearle.in/faq'));
} catch (e) {
print('Error loading URL: $e');
}
}
}
}