mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-06-25 03:42:55 +10:00
cba1e5950c
- Implemented contactTypeIcon and contactTypeColor functions for better UI representation of contact types. - Created colorForName and firstCharacterOrEmoji functions to enhance contact display. - Developed PathEditorSheet widget for managing contact paths with a user-friendly interface. - Introduced RoutingSheet for managing contact routing modes and displaying path history. - Added a script for generating proof of concept (PoC) payloads for clipboard contact import validation.
81 lines
2.8 KiB
Dart
81 lines
2.8 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,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|