3933ff980c
Keep the Material settings implementation while preserving public Cupertino parameters for later cleanup. Narrow settings tests to the Material-only behavior.
31 lines
1010 B
Dart
31 lines
1010 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
import 'settings_keys.dart';
|
|
import 'settings_row.dart';
|
|
|
|
/// The Settings entry to the Templates gallery.
|
|
///
|
|
/// The row wording matches the web Settings page: `Browse templates` with the
|
|
/// server-catalogue secondary line. It only opens the route; loading the
|
|
/// catalogue is the gallery's own read.
|
|
const String settingsTemplatesLabel = 'Browse templates';
|
|
const String settingsTemplatesSecondary =
|
|
'Reusable pipeline definitions offered by the server.';
|
|
|
|
/// A navigation row (chevron) for a Settings group.
|
|
class SettingsTemplatesSection extends StatelessWidget {
|
|
const SettingsTemplatesSection({super.key, required this.onOpen});
|
|
|
|
final VoidCallback onOpen;
|
|
|
|
@override
|
|
Widget build(BuildContext context) => SettingsRow(
|
|
key: SettingsKeys.templates,
|
|
leading: const Icon(Icons.widgets_outlined),
|
|
title: const Text(settingsTemplatesLabel),
|
|
subtitle: const Text(settingsTemplatesSecondary),
|
|
chevron: true,
|
|
onTap: onOpen,
|
|
);
|
|
}
|