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:
parent
81094f25a8
commit
de6938d5d7
15 changed files with 730 additions and 2 deletions
|
|
@ -15,6 +15,7 @@ import 'package:tane/ui/home_screen.dart';
|
|||
import 'package:tane/ui/intro_screen.dart';
|
||||
import 'package:tane/ui/inventory_list_screen.dart';
|
||||
import 'package:tane/ui/market_screen.dart';
|
||||
import 'package:tane/ui/plantares_screen.dart';
|
||||
import 'package:tane/ui/profile_screen.dart';
|
||||
import 'package:tane/ui/settings_screen.dart';
|
||||
|
||||
|
|
@ -236,6 +237,27 @@ void main() {
|
|||
await disposeTree(tester);
|
||||
});
|
||||
|
||||
testWidgets('the Plantares screen (with a commitment) fits a small screen',
|
||||
(tester) async {
|
||||
final db = newTestDatabase();
|
||||
addTearDown(db.close);
|
||||
final repo = newTestRepository(db);
|
||||
await repo.createPlantare(
|
||||
direction: PlantareDirection.iReturn,
|
||||
counterparty: 'Colectivo semillero de la comarca',
|
||||
owedDescription: 'un puñado la próxima temporada, si germina bien',
|
||||
);
|
||||
await pumpSmall(
|
||||
tester,
|
||||
wrapScreen(
|
||||
repository: repo,
|
||||
locale: AppLocale.es,
|
||||
child: const PlantaresScreen(),
|
||||
),
|
||||
);
|
||||
await disposeTree(tester);
|
||||
});
|
||||
|
||||
// NOTE: the variety-detail screen is deliberately NOT overflow-checked here.
|
||||
// It reports a ~2px overflow on a RenderFlex that is already DISPOSED/DEFUNCT
|
||||
// — a transient stale frame while its cubit's Drift stream rebuilds during
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue