Files
pipelines/app/lib/features/settings/settings_trust_warning.dart
T
alan abd696b0d9 feat(app): add native Settings connection and workspace screen
Add the Settings destination under lib/features/settings with an editable
websocket endpoint, truthful connection states, one ping per connect/mount,
workspace validation and persistence under new feature-owned keys. Material
and Cupertino controls, wrapping copy at large text, pending ping state, and
isolated probe tools plus widget/unit coverage.
2026-10-21 17:39:18 +01:00

50 lines
1.5 KiB
Dart

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'settings_controls.dart';
import 'settings_copy.dart';
import 'settings_layout.dart';
/// The trusted-network warning, using the app's exact web/Android copy. It is a
/// card, not a dialog: no confirmation is required to read it.
class SettingsTrustWarning extends StatelessWidget {
const SettingsTrustWarning({super.key});
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
final icon = usesCupertinoControls(context)
? CupertinoIcons.exclamationmark_triangle
: Icons.warning_amber_rounded;
return SettingsCard(
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Icon(icon, color: theme.colorScheme.error),
const SizedBox(width: settingsControlGap),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
trustTitle,
style: theme.textTheme.titleSmall?.copyWith(
color: theme.colorScheme.error,
),
),
const SizedBox(height: settingsFieldGap),
Text(
trustBody,
style: theme.textTheme.bodyMedium?.copyWith(
color: theme.colorScheme.onSurfaceVariant,
),
),
],
),
),
],
),
);
}
}