feat(verify): phone

This commit is contained in:
mso7nueh
2025-05-21 17:42:43 +03:00
parent cb9fff9327
commit 067e0929ed
98 changed files with 821 additions and 760 deletions

View File

@@ -5,7 +5,7 @@ part 'location_model.freezed.dart';
part 'location_model.g.dart';
@freezed
class LocationModel with _$LocationModel {
abstract class LocationModel with _$LocationModel {
const factory LocationModel({
required List<String> locations,
@JsonKey(name: 'response_body') required String responseBody,

View File

@@ -5,7 +5,7 @@ part 'user_registration_model.freezed.dart';
part 'user_registration_model.g.dart';
@freezed
class UserRegistrationSheet with _$UserRegistrationSheet {
abstract class UserRegistrationSheet with _$UserRegistrationSheet {
const factory UserRegistrationSheet({
@JsonKey(name: 'first_name') required String firstName,
@JsonKey(name: 'last_name') required String lastName,

View File

@@ -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;

View File

@@ -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),
),
);
}
}