forked from eatvio/eatvio_app
feat(verify): phone
This commit is contained in:
@@ -4,7 +4,7 @@ import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
part 'registration_state.freezed.dart';
|
||||
|
||||
@freezed
|
||||
class RegistrationState with _$RegistrationState {
|
||||
abstract class RegistrationState with _$RegistrationState {
|
||||
const factory RegistrationState({
|
||||
required UserRegistrationSheet sheet,
|
||||
}) = _RegistrationState;
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
import 'package:eatvio_app/core/const.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:webview_flutter/webview_flutter.dart';
|
||||
|
||||
class VerifyScreen extends StatefulWidget {
|
||||
final String passKey;
|
||||
|
||||
const VerifyScreen({
|
||||
super.key,
|
||||
required this.passKey,
|
||||
});
|
||||
|
||||
@override
|
||||
State<VerifyScreen> createState() => _VerifyScreenState();
|
||||
}
|
||||
|
||||
class _VerifyScreenState extends State<VerifyScreen> {
|
||||
late final WebViewController _controller;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
print('$baseUrl/login_with_pass_key?id=${widget.passKey}');
|
||||
_controller = WebViewController()
|
||||
..setJavaScriptMode(JavaScriptMode.unrestricted)
|
||||
..loadRequest(Uri.parse('$baseUrl/login_with_pass_key?id=${widget.passKey}'));
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
toolbarHeight: 0,
|
||||
),
|
||||
body: SafeArea(
|
||||
child: WebViewWidget(controller: _controller),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user