Files
friflex_flutter_starter/lib/features/debug/screens/components_screen.dart
2025-06-06 16:45:40 +03:00

53 lines
1.8 KiB
Dart
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import 'package:flutter/material.dart';
import 'package:friflex_starter/app/ui_kit/app_box.dart';
import 'package:friflex_starter/app/ui_kit/app_snackbar.dart';
/// {@template ComponentsScreen}
/// Экран для демонстрации компонентов приложения.
/// {@endtemplate}
class ComponentsScreen extends StatefulWidget {
/// {@macro ComponentsScreen}
const ComponentsScreen({super.key});
@override
State<ComponentsScreen> createState() => _ComponentsScreenState();
}
class _ComponentsScreenState extends State<ComponentsScreen> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text('Компоненты')),
body: Center(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
const HBox(16),
ElevatedButton(
onPressed: () {
AppSnackBar.showError(
context,
message:
'Произошла ошибка, это просто длинное сообщение, для проверки, которое занимает 3 строчки',
);
},
child: const Text('Показать снекбар с ошибкой'),
),
const HBox(16),
ElevatedButton(
onPressed: () {
AppSnackBar.showSuccess(
context: context,
message:
'Все супер, это просто длинное сообщение, для проверки, которое занимает 3 строчки',
);
},
child: const Text('Показать снекбар с успехом'),
),
],
),
),
);
}
}