Files
meezi/mobile/meezi_pos/lib/features/auth/login_screen.dart
T

43 lines
1.3 KiB
Dart
Raw Normal View History

import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
/// Phase 1: online-only OTP login (wire Dio to /api/auth/*).
class LoginScreen extends StatefulWidget {
const LoginScreen({super.key});
@override
State<LoginScreen> createState() => _LoginScreenState();
}
class _LoginScreenState extends State<LoginScreen> {
final _phone = TextEditingController(text: '09121234567');
@override
Widget build(BuildContext context) {
return Scaffold(
body: SafeArea(
child: Padding(
padding: const EdgeInsets.all(24),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
const Text('میزی — صندوق', style: TextStyle(fontSize: 22, fontWeight: FontWeight.bold)),
const SizedBox(height: 24),
TextField(
controller: _phone,
keyboardType: TextInputType.phone,
decoration: const InputDecoration(labelText: 'موبایل', border: OutlineInputBorder()),
),
const SizedBox(height: 16),
FilledButton(
onPressed: () => context.go('/pos'),
child: const Text('ورود (دمو)'),
),
],
),
),
),
);
}
}