mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-06-22 02:14:28 +10:00
26fdf74d69
- Improved formatting of ListTile icons and text styles in settings_screen.dart, telemetry_screen.dart, usb_screen.dart, gif_picker.dart, path_editor_sheet.dart, repeater_login_dialog.dart, and room_login_dialog.dart for better readability. - Consolidated TextStyle definitions into single lines where applicable. - Updated notification_service.dart to enhance readability of notification ID assignment. - Simplified function signatures in routing_sheet.dart for clarity. - Cleaned up test assertions in usb_flow_test.dart for conciseness. - Removed unused translations in untranslated.json to streamline localization files.
87 lines
2.9 KiB
Dart
87 lines
2.9 KiB
Dart
import 'package:flutter/material.dart';
|
|
import '../l10n/l10n.dart';
|
|
|
|
class ChromeRequiredScreen extends StatelessWidget {
|
|
const ChromeRequiredScreen({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final l10n = context.l10n;
|
|
final theme = Theme.of(context);
|
|
final colorScheme = theme.colorScheme;
|
|
return Scaffold(
|
|
body: Container(
|
|
width: double.infinity,
|
|
padding: const EdgeInsets.symmetric(horizontal: 32),
|
|
color: colorScheme.surface,
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: [
|
|
Container(
|
|
padding: const EdgeInsets.all(24),
|
|
decoration: BoxDecoration(
|
|
color: colorScheme.tertiaryContainer.withValues(alpha: 0.4),
|
|
shape: BoxShape.circle,
|
|
),
|
|
child: Icon(
|
|
Icons.browser_not_supported_rounded,
|
|
size: 80,
|
|
color: colorScheme.tertiary,
|
|
),
|
|
),
|
|
const SizedBox(height: 32),
|
|
Text(
|
|
l10n.scanner_chromeRequired,
|
|
textAlign: TextAlign.center,
|
|
style: theme.textTheme.headlineMedium?.copyWith(
|
|
fontWeight: FontWeight.bold,
|
|
color: colorScheme.onSurface,
|
|
),
|
|
),
|
|
const SizedBox(height: 16),
|
|
Text(
|
|
l10n.scanner_chromeRequiredMessage,
|
|
textAlign: TextAlign.center,
|
|
style: theme.textTheme.bodyLarge?.copyWith(
|
|
color: colorScheme.onSurfaceVariant,
|
|
height: 1.5,
|
|
),
|
|
),
|
|
const SizedBox(height: 48),
|
|
// We can't really "fix" it for them other than telling them to use Chrome
|
|
// but we can provide a nice visual.
|
|
Container(
|
|
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 12),
|
|
decoration: BoxDecoration(
|
|
color: colorScheme.secondaryContainer.withValues(alpha: 0.4),
|
|
borderRadius: BorderRadius.circular(30),
|
|
border: Border.all(
|
|
color: colorScheme.outline.withValues(alpha: 0.4),
|
|
),
|
|
),
|
|
child: Row(
|
|
mainAxisSize: MainAxisSize.min,
|
|
children: [
|
|
Icon(
|
|
Icons.info_outline,
|
|
size: 20,
|
|
color: colorScheme.secondary,
|
|
),
|
|
const SizedBox(width: 12),
|
|
Text(
|
|
l10n.chrome_bluetoothRequiresChromium,
|
|
style: theme.textTheme.bodyMedium?.copyWith(
|
|
color: colorScheme.onSecondaryContainer,
|
|
fontWeight: FontWeight.w500,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|