Files
friflex_flutter_starter/lib/features/debug/debug_screen.dart
Yuri Petrov 933c1a0f0f feat(debug): Удалить Talker (#2)
Co-authored-by: petrovyuri <y.petrov@friflex.com>
2025-02-04 10:18:41 +03:00

46 lines
1.4 KiB
Dart

import 'package:flutter/material.dart';
import 'package:friflex_starter/app/app_context_ext.dart';
class DebugScreen extends StatelessWidget {
const DebugScreen({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text('Debug Screen')),
body: Center(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
ElevatedButton(
onPressed: () {
throw Exception(
'Тестовая ошибка Exception для отладки FlutterError',);
},
child: const Text('Вызывать ошибку FlutterError'),
),
const SizedBox(height: 16),
ElevatedButton(
onPressed: () async {
await callError();
},
child: const Text('Вызывать ошибку PlatformDispatcher'),
),
const SizedBox(height: 16),
ElevatedButton(
onPressed: () async {
await context.di.debugService.openDebugScreen(context);
},
child: const Text('Вызывать Экран отладки'),
),
],
),
),
);
}
Future<void> callError() async {
throw Exception('Тестовая ошибка Exception для отладки PlatformDispatcher');
}
}