3ec580c2d9
Servers become rows with a selection mark, addresses as subtitles and a Use/Edit/Remove menu plus an Add server row; the connection is a status row with address and Reconnect/Disconnect rows; Templates and Schedules are chevron rows in a Library group. Material groups are flat surfaceContainer surfaces with primary titleSmall headers (no Cards); Cupertino uses inset-grouped sections on the grouped background, switches for the ntfy choices. The trust warning is a footer, helper copy is shortened, Save workspace is a legible tonal/plain button, and the column starts at the bar's inset (max 720) instead of being centred. The page pads by the top media padding instead of a top SafeArea.
41 lines
1.3 KiB
Dart
41 lines
1.3 KiB
Dart
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: <Widget>[
|
|
Icon(icon, color: error, semanticLabel: 'Warning'),
|
|
const SizedBox(width: settingsControlGap),
|
|
Expanded(
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: <Widget>[
|
|
Text(
|
|
trustTitle,
|
|
style: TextStyle(color: error, fontWeight: FontWeight.w600),
|
|
),
|
|
const Text(trustBody),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
);
|
|
}
|
|
}
|