add test block
This commit is contained in:
@@ -22,6 +22,43 @@ class PhoneScreen extends StatefulWidget {
|
||||
class _PhoneScreenState extends State<PhoneScreen> {
|
||||
final TextEditingController _phoneController = TextEditingController();
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
// Вызываем диалог сразу после отрисовки первого кадра экрана
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
_showTestModeDialog();
|
||||
});
|
||||
}
|
||||
|
||||
// Метод для отображения диалогового окна
|
||||
void _showTestModeDialog() {
|
||||
showDialog(
|
||||
context: context,
|
||||
barrierDismissible: false, // Запрещает закрывать окно кликом по фону
|
||||
builder: (BuildContext context) {
|
||||
return AlertDialog(
|
||||
title: const Text(
|
||||
'Внимание!',
|
||||
style: TextStyle(fontWeight: FontWeight.bold),
|
||||
),
|
||||
content: const Text('Приложение находится в тестовом режиме!'),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop(); // Закрывает диалоговое окно
|
||||
},
|
||||
child: const Text(
|
||||
'Продолжить',
|
||||
style: TextStyle(color: Colors.blueAccent),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_phoneController.dispose();
|
||||
@@ -219,7 +256,6 @@ class _PhoneScreenState extends State<PhoneScreen> {
|
||||
}
|
||||
}
|
||||
|
||||
// 🔹 Кликабельный текст для политики
|
||||
class ClickableText extends StatelessWidget {
|
||||
final String text;
|
||||
final VoidCallback onTap;
|
||||
@@ -237,12 +273,12 @@ class ClickableText extends StatelessWidget {
|
||||
child: Text(
|
||||
text,
|
||||
style: const TextStyle(
|
||||
color: Colors.blueAccent,
|
||||
decorationColor: Colors.blueAccent,
|
||||
decoration: TextDecoration.underline,
|
||||
fontSize: 12
|
||||
color: Colors.blueAccent,
|
||||
decorationColor: Colors.blueAccent,
|
||||
decoration: TextDecoration.underline,
|
||||
fontSize: 12
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -47,7 +47,7 @@ class SupportScreen extends StatelessWidget {
|
||||
LinkRow(
|
||||
icon: 'assets/icons/call.png',
|
||||
title: 'Позвонить',
|
||||
onTap: () => openLink('tel:+375000000000'),
|
||||
onTap: () => openLink('tel:+375257110909'),
|
||||
),
|
||||
const Divider(height: 1, color: Colors.white24),
|
||||
const SizedBox(height: 12),
|
||||
|
||||
Reference in New Issue
Block a user