new UI + new targets.

This commit is contained in:
Jan Pleterski
2026-11-27 14:37:44 +01:00
parent 5f9e2a3b86
commit 2fc741a9f6
113 changed files with 6861 additions and 7381 deletions
+10 -46
View File
@@ -1,57 +1,21 @@
import 'package:flutter/material.dart';
import 'ui.dart';
/// Help bottom sheet: one icon + sentence per control, close button at the end.
/// Help bottom sheet: one icon + sentence per control.
/// Shared by Knjiga, camera and stream so their info buttons look the same.
void showHelpSheet(
BuildContext context, {
required List<(IconData, String)> items,
required Color accent,
required String Function(String) t,
bool clearBarrier = false,
}) {
showModalBottomSheet(
context: context,
isScrollControlled: true,
builder: (sheet) => SafeArea(
child: SingleChildScrollView(
padding: const EdgeInsets.fromLTRB(24, 8, 24, 16),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(t('Help'),
style: const TextStyle(
color: Colors.white,
fontSize: 20,
fontWeight: FontWeight.bold)),
const SizedBox(height: 16),
for (final (icon, text) in items)
Padding(
padding: const EdgeInsets.only(bottom: 14),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Icon(icon, color: accent, size: 20),
const SizedBox(width: 12),
Expanded(
child: Text(t(text),
style: const TextStyle(
color: Colors.white, fontSize: 14, height: 1.3)),
),
],
),
),
const SizedBox(height: 4),
SizedBox(
width: double.infinity,
child: FilledButton(
style: FilledButton.styleFrom(backgroundColor: accent),
onPressed: () => Navigator.pop(sheet),
child: Text(t('Close')),
),
),
],
),
),
showAppSheet(
context,
title: t('Help'),
clearBarrier: clearBarrier,
builder: (sheet) => Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [for (final (icon, text) in items) HelpRow(icon, t(text))],
),
);
}