45 lines
1.4 KiB
Dart
45 lines
1.4 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 icon = usesCupertinoControls(context)
|
|
? CupertinoIcons.exclamationmark_triangle
|
|
: Icons.warning_amber_rounded;
|
|
return SettingsCard(
|
|
child: Row(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: <Widget>[
|
|
Icon(icon, color: settingsErrorColor(context)),
|
|
const SizedBox(width: settingsControlGap),
|
|
Expanded(
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: <Widget>[
|
|
Text(
|
|
trustTitle,
|
|
style: settingsTextStyle(context, title: true, error: true),
|
|
),
|
|
const SizedBox(height: settingsFieldGap),
|
|
Text(
|
|
trustBody,
|
|
style: settingsTextStyle(context, secondary: true),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|