feat(plantare): usable UI — commitments screen, add sheet, entry points

The reproduction-commitment (Plantare) UI, local-first and plain-spoken:
- A Plantares screen (drawer entry, /plantares) listing your commitments,
  grouped Open / Done, with a big 'mark returned', a menu (let it go / reopen
  / remove) and an empty-state that explains what a Plantare is.
- An add sheet (scrollable): a two-choice 'who reproduces & returns' (I return
  / owed to me), an optional 'with whom', an optional 'what comes back' in the
  grower's own words, and a note. No sale, no currency — a promise.
- Reachable from a seed too: an 'Add a commitment' action on the variety
  detail, pre-attached to that variety.
- i18n en/es/pt/ast (human words: 'Plantare' + a plain explanation).

Added the Plantares screen to the small-phone overflow guard (18 cases green).
This commit is contained in:
vjrj 2026-07-11 02:11:57 +02:00
parent 81094f25a8
commit de6938d5d7
15 changed files with 730 additions and 2 deletions

View file

@ -16,6 +16,7 @@ import '../i18n/strings.g.dart';
import '../state/variety_detail_cubit.dart';
import 'harvest_date_picker.dart';
import 'photo_pick.dart';
import 'plantare_sheet.dart';
import 'quantity_kind_l10n.dart';
import 'quantity_picker.dart';
import 'seed_glyph.dart';
@ -108,6 +109,21 @@ class _DetailView extends StatelessWidget {
),
],
),
const SizedBox(height: 16),
_SectionTitle(t.plantare.title),
Align(
alignment: AlignmentDirectional.centerStart,
child: OutlinedButton.icon(
key: const Key('detail.addPlantare'),
icon: const Icon(Icons.volunteer_activism_outlined, size: 18),
onPressed: () => showPlantareSheet(
context,
repository: context.read<VarietyRepository>(),
varietyId: detail.id,
),
label: Text(t.plantare.add),
),
),
if (detail.notes != null && detail.notes!.trim().isNotEmpty) ...[
const SizedBox(height: 16),
_SectionTitle(t.detail.notes),