import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'settings_copy.dart'; import 'settings_layout.dart'; import 'settings_theme.dart'; /// The trusted-network warning, shown as the Connection group's footer: a /// warning icon, the title in the error colour and the short body. It is not a /// dialog: no confirmation is required to read it. class SettingsTrustWarning extends StatelessWidget { const SettingsTrustWarning({super.key}); @override Widget build(BuildContext context) { final icon = usesCupertinoControls(context) ? CupertinoIcons.exclamationmark_triangle : Icons.warning_amber_rounded; final error = settingsErrorColor(context); return Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ Icon(icon, color: error, semanticLabel: 'Warning'), const SizedBox(width: settingsControlGap), Expanded( child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( trustTitle, style: TextStyle(color: error, fontWeight: FontWeight.w600), ), const Text(trustBody), ], ), ), ], ); } }