👽 Update API to microservices
♻️ Refactor router pushes
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:island/pods/config.dart';
|
||||
import 'package:island/screens/auth/captcha.config.dart';
|
||||
import 'package:island/widgets/app_scaffold.dart';
|
||||
|
||||
class CaptchaScreen extends ConsumerWidget {
|
||||
@@ -9,13 +9,15 @@ class CaptchaScreen extends ConsumerWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final serverUrl = ref.watch(serverUrlProvider);
|
||||
final captchaUrl = ref.watch(captchaUrlProvider);
|
||||
|
||||
if (!captchaUrl.hasValue) return Center(child: CircularProgressIndicator());
|
||||
|
||||
return AppScaffold(
|
||||
appBar: AppBar(title: Text("Anti-Robot")),
|
||||
body: InAppWebView(
|
||||
initialUrlRequest: URLRequest(
|
||||
url: WebUri('$serverUrl/auth/captcha?redirect_uri=solink://captcha'),
|
||||
url: WebUri('${captchaUrl.value}?redirect_uri=solian://captcha'),
|
||||
),
|
||||
shouldOverrideUrlLoading: (controller, navigationAction) async {
|
||||
Uri? url = navigationAction.request.url;
|
||||
|
Reference in New Issue
Block a user