Connect Flutter phone auth and Android platform
This commit is contained in:
@@ -4,7 +4,9 @@ import '../controllers/workout_controller.dart';
|
||||
import '../models/workout.dart';
|
||||
import '../screens/history_screen.dart';
|
||||
import '../services/sync_service.dart';
|
||||
import '../services/auth_service.dart';
|
||||
import '../utils/formatters.dart';
|
||||
import 'phone_login_screen.dart';
|
||||
|
||||
const _ink = Color(0xFF17251E);
|
||||
const _green = Color(0xFF456C52);
|
||||
@@ -73,6 +75,23 @@ class HomeScreen extends StatelessWidget {
|
||||
const TextStyle(color: _ink, fontSize: 11)),
|
||||
]),
|
||||
)),
|
||||
PopupMenuButton<String>(
|
||||
tooltip: 'الحساب',
|
||||
icon: const Icon(Icons.account_circle_outlined,
|
||||
color: _green, size: 25),
|
||||
onSelected: (value) async {
|
||||
if (value == 'logout') {
|
||||
await Get.find<AuthService>().logout();
|
||||
Get.offAll(() => const PhoneLoginScreen());
|
||||
}
|
||||
},
|
||||
itemBuilder: (context) => const [
|
||||
PopupMenuItem(
|
||||
value: 'logout',
|
||||
child: Text('تسجيل الخروج'),
|
||||
),
|
||||
],
|
||||
),
|
||||
]),
|
||||
const SizedBox(height: 34),
|
||||
Text(_arabicToday(),
|
||||
|
||||
Reference in New Issue
Block a user