feat(ui): Material 3 redesign, cover-photo viewer, About screen
Apply a Material 3 seed-green palette and rounded components across the home, inventory, quick-add, quantity picker and variety-detail screens. The full-screen photo viewer can now set any photo as the cover (via attachment sort order) and delete after confirmation. Lot forms and packaging surface as choice chips. Extract About out of Settings into its own screen (app version via package_info_plus, website link). Add es/en strings for the new lot types, presentation, home tagline and About. Update Seedees v2 mockups.
This commit is contained in:
parent
f5c36f2369
commit
42c16c0e3f
24 changed files with 1960 additions and 416 deletions
|
|
@ -2,6 +2,8 @@ import 'package:commons_core/commons_core.dart';
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:material_symbols_icons/symbols.dart';
|
||||
|
||||
import '../db/enums.dart';
|
||||
|
||||
/// Renders a glyph from the bundled `seedks` icon font, whose characters `a`–`k`
|
||||
/// map to seed-themed pictograms (jar, packet, spoon…). See
|
||||
/// docs/mockups/seedks-glyphs.png.
|
||||
|
|
@ -61,18 +63,36 @@ String? seedGlyphForKind(QuantityKind kind) => switch (kind) {
|
|||
IconData _materialIconForKind(QuantityKind kind) => switch (kind) {
|
||||
QuantityKind.grams => Icons.scale_outlined,
|
||||
QuantityKind.count => Icons.tag,
|
||||
QuantityKind.cob || QuantityKind.ear => Icons.grass,
|
||||
QuantityKind.head || QuantityKind.seedHead => Icons.filter_vintage_outlined,
|
||||
QuantityKind.fruit => Icons.local_florist_outlined,
|
||||
QuantityKind.plant => Symbols.potted_plant,
|
||||
QuantityKind.pot => Icons.yard_outlined,
|
||||
QuantityKind.tray => Icons.grid_on_outlined,
|
||||
QuantityKind.bulb ||
|
||||
QuantityKind.tuber ||
|
||||
QuantityKind.bunch => Icons.spa_outlined,
|
||||
// Seed/fruit forms — each a distinct icon so they're told apart at a glance.
|
||||
QuantityKind.cob => Symbols.grass, // mazorca
|
||||
QuantityKind.ear => Symbols.grain, // espiga
|
||||
QuantityKind.head => Symbols.filter_vintage, // cabezuela
|
||||
QuantityKind.seedHead => Symbols.spa,
|
||||
QuantityKind.fruit => Symbols.nutrition, // fruto (apple)
|
||||
QuantityKind.bulb => Symbols.spa, // bulbo
|
||||
QuantityKind.tuber => Symbols.egg, // tubérculo
|
||||
QuantityKind.bunch => Symbols.local_florist, // manojo
|
||||
// Living material counted as individuals.
|
||||
QuantityKind.seedling => Symbols.potted_plant,
|
||||
QuantityKind.plant => Symbols.yard,
|
||||
QuantityKind.tree => Symbols.park,
|
||||
QuantityKind.cutting => Symbols.content_cut,
|
||||
QuantityKind.pot => Symbols.yard,
|
||||
QuantityKind.tray => Symbols.grid_on,
|
||||
_ => Icons.eco_outlined,
|
||||
};
|
||||
|
||||
/// The icon for a lot's [LotType] form (used in the form selector and lot chip),
|
||||
/// distinct across all forms so the selector reads clearly.
|
||||
IconData iconForLotType(LotType type) => switch (type) {
|
||||
LotType.seed => Symbols.eco, // overridden by a seed glyph where shown
|
||||
LotType.seedling => Symbols.potted_plant,
|
||||
LotType.plant => Symbols.local_florist,
|
||||
LotType.tree => Symbols.park,
|
||||
LotType.bulb => Symbols.spa,
|
||||
LotType.cutting => Symbols.content_cut,
|
||||
};
|
||||
|
||||
/// A consistent icon for a [QuantityKind]: the seed glyph where one exists,
|
||||
/// otherwise a Material fallback.
|
||||
class QuantityKindIcon extends StatelessWidget {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue