neumorphicInventory top-level property

DesignInventory neumorphicInventory
final

Neumorphism's inventory: every row of the shared component list, answered.

Implementation

final DesignInventory neumorphicInventory = DesignInventory(
  look: 'Neumorphism',
  entries: [
    // Actions
    DesignInventoryEntry.present(
      'Button',
      // The row names four kinds (filled, outlined, text, danger): one of each.
      (_) => const Wrap(
        spacing: 12,
        runSpacing: 12,
        crossAxisAlignment: WrapCrossAlignment.center,
        children: [
          NeumorphicButton.filled('Save', onPressed: _none),
          NeumorphicButton('Preview', onPressed: _none),
          NeumorphicButton.text('Later', onPressed: _none),
          NeumorphicButton(
            'Delete',
            isDestructiveAction: true,
            onPressed: _none,
          ),
        ],
      ),
    ),
    DesignInventoryEntry.present(
      'IconButton',
      (_) => const NeumorphicIconButton(
        NeumorphicGlyphs.share2,
        label: 'Share',
        onPressed: _none,
      ),
    ),
    const DesignInventoryEntry.absent(
      'FloatingActionButton',
      'a button floating over the page would stack one raised part on others; give the page\'s main action its own place instead, at the end of its column, the foot of the screen or the side bar',
    ),
    DesignInventoryEntry.present(
      'ButtonGroup',
      (_) => const NeumorphicButtonGroup(
        label: 'Week',
        items: [
          NeumorphicButtonGroupItem('Previous', onPressed: _none),
          NeumorphicButtonGroupItem('Today', onPressed: _none),
          NeumorphicButtonGroupItem('Next', onPressed: _none),
        ],
      ),
    ),
    DesignInventoryEntry.present(
      'ToggleGroup',
      (_) => const NeumorphicToggleGroup<String>(
        label: 'Rooms',
        selected: {'bed'},
        onChanged: _drop,
        items: [
          NeumorphicButtonSegment('bed', 'Bedroom'),
          NeumorphicButtonSegment('kitchen', 'Kitchen'),
          NeumorphicButtonSegment('study', 'Study'),
        ],
      ),
    ),
    DesignInventoryEntry.present(
      'SplitButton',
      (_) => const NeumorphicSplitButton(
        'Start',
        onPressed: _none,
        actions: [NeumorphicSplitAction('Start at dusk', onPressed: _none)],
      ),
    ),
    DesignInventoryEntry.present(
      'Link',
      (_) => const NeumorphicLink('View details', onPressed: _none),
    ),
    DesignInventoryEntry.present(
      'Kbd',
      (_) => const NeumorphicKbd(['Ctrl', 'K']),
    ),
    // Inputs
    DesignInventoryEntry.present(
      'TextField',
      (_) => const NeumorphicTextField(label: 'Name', initialValue: 'Marta'),
    ),
    DesignInventoryEntry.present(
      'TextArea',
      (_) => const NeumorphicTextArea(label: 'Notes'),
    ),
    DesignInventoryEntry.present(
      'SearchField',
      (_) => const NeumorphicSearchField(hint: 'Find a room'),
    ),
    DesignInventoryEntry.present(
      'PasswordField',
      (_) => const NeumorphicPasswordField(label: 'Password'),
    ),
    DesignInventoryEntry.present(
      'InputGroup',
      (_) => const NeumorphicInputGroup(
        label: 'Website',
        prefix: 'https://',
        keyboardType: TextInputType.url,
        suffix: '.com',
      ),
    ),
    DesignInventoryEntry.present(
      'InputOtp',
      (_) => const NeumorphicInputOtp(label: 'Code', length: 6),
    ),
    DesignInventoryEntry.present(
      'NumberField',
      (_) => const NeumorphicNumberField(
        value: 2,
        unit: 'Lamps',
        onChanged: _drop,
      ),
    ),
    DesignInventoryEntry.present(
      'Select',
      (_) => const NeumorphicSelect<String>(
        label: 'Room',
        value: 'bed',
        options: [
          NeumorphicMenuItem('bed', 'Bedroom'),
          NeumorphicMenuItem('study', 'Study'),
        ],
        onChanged: _drop,
      ),
    ),
    DesignInventoryEntry.present(
      'Combobox',
      (_) => const NeumorphicCombobox<String>(
        label: 'Room',
        hint: 'Type or choose a room',
        options: ['Bedroom', 'Kitchen', 'Study', 'Hall'],
      ),
    ),
    DesignInventoryEntry.present(
      'MultiSelect',
      (_) => const NeumorphicMultiSelect<String>(
        label: 'Rooms',
        values: ['Bedroom'],
        onChanged: _drop,
        options: ['Bedroom', 'Kitchen', 'Study'],
      ),
    ),
    DesignInventoryEntry.present(
      'Checkbox',
      (_) => const NeumorphicCheckbox(
        label: 'Dim at dusk',
        value: true,
        onChanged: _drop,
      ),
    ),
    DesignInventoryEntry.present(
      'RadioGroup',
      (_) => const NeumorphicRadioGroup<String>(
        label: 'Room',
        value: 'bed',
        options: [
          NeumorphicRadio('bed', 'Bedroom'),
          NeumorphicRadio('study', 'Study'),
        ],
        onChanged: _drop,
      ),
    ),
    DesignInventoryEntry.present(
      'Switch',
      (_) => const NeumorphicSwitch(
        label: 'Night light',
        value: true,
        onChanged: _drop,
      ),
    ),
    DesignInventoryEntry.present(
      'Slider',
      (_) =>
          const NeumorphicSlider(label: 'Warmth', value: .5, onChanged: _drop),
    ),
    DesignInventoryEntry.present(
      'RangeSlider',
      (_) => const NeumorphicRangeSlider(
        label: 'Comfort',
        values: DesignRangeValues(18, 22),
        min: 12,
        max: 28,
        onChanged: _drop,
      ),
    ),
    DesignInventoryEntry.present(
      'SegmentedButton',
      (_) => const NeumorphicSegmentedButton<String>(
        label: 'View',
        value: 'day',
        segments: [
          NeumorphicButtonSegment('day', 'Day'),
          NeumorphicButtonSegment('week', 'Week'),
        ],
        onChanged: _drop,
      ),
    ),
    DesignInventoryEntry.present(
      'Chip',
      (_) => const NeumorphicChip('Warm white', onPressed: _none),
    ),
    DesignInventoryEntry.present(
      'Rating',
      (_) => const NeumorphicRating(label: 'Sleep', value: 4, onChanged: _drop),
    ),
    DesignInventoryEntry.present(
      'FileUpload',
      (_) => const NeumorphicFileUpload(onPressed: _none, hint: 'PDF or JPG'),
    ),
    DesignInventoryEntry.present(
      'DatePicker',
      (_) =>
          NeumorphicDatePicker(value: DateTime(2026, 6, 14), onChanged: _drop),
    ),
    DesignInventoryEntry.present(
      'DateRangePicker',
      (_) => _Owns(
        _stay,
        (context, stay) => NeumorphicDateRangePicker(controller: stay),
      ),
    ),
    DesignInventoryEntry.present(
      'TimePicker',
      (_) => const NeumorphicTimePicker(onChanged: _drop),
    ),
    DesignInventoryEntry.present(
      'Calendar',
      (_) => _Owns(_day, (context, day) => NeumorphicCalendar(controller: day)),
    ),
    DesignInventoryEntry.present(
      'WheelPicker',
      (_) => const NeumorphicWheelPicker<int>(
        label: 'Lamps',
        items: [1, 2, 3, 4, 5, 6],
        value: 2,
        onChanged: _drop,
        rows: 3,
      ),
    ),
    DesignInventoryEntry.present(
      'ColorPicker',
      (_) => _Owns(
        _colour,
        (context, colour) => NeumorphicColorPicker(controller: colour),
      ),
    ),
    DesignInventoryEntry.present(
      'FormField',
      (_) => const NeumorphicFormField(
        label: 'Email',
        help: 'The receipt goes here',
        required: true,
        child: NeumorphicTextField(hint: 'name@example.com'),
      ),
    ),
    // Navigation
    DesignInventoryEntry.present(
      'AppBar',
      (_) => const NeumorphicAppBar(title: 'Tonight'),
    ),
    DesignInventoryEntry.present(
      'NavigationBar',
      (_) => const NeumorphicNavigationBar(
        items: [_home, _rooms, _sleep],
        onDestinationSelected: _drop,
      ),
    ),
    DesignInventoryEntry.present(
      'NavigationRail',
      (_) => const NeumorphicNavigationRail(
        items: [_home, _rooms, _sleep],
        onDestinationSelected: _drop,
      ),
    ),
    DesignInventoryEntry.present(
      'NavigationDrawer',
      (_) => const NeumorphicNavigationDrawer(
        items: [_home, _rooms, _sleep],
        onDestinationSelected: _drop,
      ),
    ),
    DesignInventoryEntry.present(
      'TabBar',
      (_) => NeumorphicTabBar(
        tabs: const ['Day', 'Week', 'Month'],
        label: 'Span',
        onChanged: _drop,
      ),
    ),
    DesignInventoryEntry.present(
      'Breadcrumb',
      (_) => NeumorphicBreadcrumb(
        crumbs: const [
          NeumorphicCrumb('Home', onPressed: _none),
          NeumorphicCrumb('Upstairs', onPressed: _none),
          NeumorphicCrumb('Bedroom'),
        ],
      ),
    ),
    DesignInventoryEntry.present(
      'Pagination',
      (_) => const NeumorphicPagination(count: 12, page: 4, onChanged: _drop),
    ),
    DesignInventoryEntry.present(
      'StepProgress',
      (_) =>
          const NeumorphicStepProgress(count: 3, currentStep: 1, name: 'Setup'),
    ),
    DesignInventoryEntry.present(
      'PageDots',
      (_) => const NeumorphicPageDots(
        count: 4,
        selectedIndex: 1,
        label: 'Rooms',
        onChanged: _drop,
      ),
    ),
    DesignInventoryEntry.present(
      'MenuBar',
      (context) => NeumorphicMenuBar(
        menus: [
          DesignMenuEntry(
            label: 'Scene',
            children: [
              DesignMenuEntry(
                label: 'New scene',
                shortcut: _primaryKeys(context, LogicalKeyboardKey.keyN),
                onPressed: _none,
              ),
              const DesignMenuEntry(label: 'Print', onPressed: _none),
            ],
          ),
          const DesignMenuEntry(
            label: 'View',
            children: [
              DesignMenuEntry(label: 'Rooms', checked: true, onPressed: _none),
            ],
          ),
        ],
      ),
    ),
    DesignInventoryEntry.present(
      'Command',
      (context) => NeumorphicCommand(
        maxHeight: 200,
        commands: [
          DesignCommand(
            label: 'New scene',
            group: 'Scenes',
            shortcut: _primaryKeys(context, LogicalKeyboardKey.keyN),
          ),
          const DesignCommand(label: 'Find a room', group: 'Rooms'),
        ],
      ),
    ),
    DesignInventoryEntry.present(
      'Scaffold',
      (_) => const NeumorphicScaffold(
        scroll: false,
        topBar: NeumorphicAppBar(title: 'Tonight'),
        body: Text('Two lamps on'),
      ),
    ),
    // Containers
    DesignInventoryEntry.present(
      'Card',
      (_) => const NeumorphicCard(
        title: 'Bedroom',
        children: [Text('19 degrees, two lamps')],
      ),
    ),
    DesignInventoryEntry.present(
      'ListTile',
      (_) => const NeumorphicListTile(
        title: 'Bedroom',
        subtitle: 'Two lamps',
        onPressed: _none,
      ),
    ),
    DesignInventoryEntry.present(
      'ListSection',
      (_) => const NeumorphicListSection(
        label: 'Rooms',
        children: [
          NeumorphicListTile(title: 'Bedroom', isFirst: true),
          NeumorphicListTile(title: 'Study'),
        ],
      ),
    ),
    DesignInventoryEntry.present(
      'SectionHeader',
      (_) => const NeumorphicSectionHeader(title: 'Tonight'),
    ),
    DesignInventoryEntry.present(
      'Disclosure',
      (_) => const NeumorphicDisclosure(
        title: 'House rules',
        child: Text('Quiet after ten'),
      ),
    ),
    DesignInventoryEntry.present(
      'Table',
      (_) => const NeumorphicTable(
        columns: [
          NeumorphicTableColumn('Room'),
          NeumorphicTableColumn('Heat', numeric: true),
        ],
        rows: [
          NeumorphicTableRow(['Bedroom', '19']),
          NeumorphicTableRow(['Study', '21']),
        ],
      ),
    ),
    DesignInventoryEntry.present(
      'DataTable',
      (_) => _Owns(
        _table,
        (context, table) => NeumorphicDataTable<_Room>(
          label: 'Rooms',
          controller: table,
          cell: (r, column) => column.id == 'room' ? r.name : '${r.heat}',
        ),
      ),
    ),
    DesignInventoryEntry.present('Divider', (_) => const NeumorphicDivider()),
    DesignInventoryEntry.present(
      'ScrollArea',
      (_) => _Owns(
        _scroll,
        (context, scroll) => NeumorphicScrollArea(
          controller: scroll,
          label: 'Rooms',
          child: ListView(
            controller: scroll,
            children: [
              for (final r in const [
                'Bedroom',
                'Study',
                'Kitchen',
                'Hall',
                'Attic',
                'Cellar',
                'Porch',
              ])
                Padding(padding: const EdgeInsets.all(8), child: Text(r)),
            ],
          ),
        ),
      ),
    ),
    DesignInventoryEntry.present(
      'Resizable',
      (_) => const NeumorphicResizable(
        first: Text('Rooms'),
        second: Text('Bedroom'),
      ),
    ),
    DesignInventoryEntry.present('CarouselView', (context) {
      final c = NeumorphicTheme.of(context).colors;
      // Each slide is its room by its mark, on the one material: tinted in hues of their own the slides wore colours
      // the theme does not hold.
      Widget slide(String title, String line, IconData glyph) => NeumorphicCard(
        title: title,
        trailing: Icon(glyph, size: 20, color: c.inkSecondary),
        children: [Text(line)],
      );
      return NeumorphicCarouselView(
        label: 'Rooms',
        height: 132,
        initialPage: 1,
        children: [
          slide('Bedroom', '19°, lamp low', NeumorphicGlyphs.lamp),
          slide('Study', '20.5°, reading', NeumorphicGlyphs.bookOpen),
          slide('Hall', '18°, quiet', NeumorphicGlyphs.doorOpen),
        ],
      );
    }),
    DesignInventoryEntry.present(
      'ReorderableListView',
      (_) => NeumorphicReorderableListView<String>(
        items: const ['Bedroom', 'Study', 'Hall'],
        labelOf: (s) => s,
        onReorder: (from, to) {},
        itemBuilder: (context, s) => Text(s),
      ),
    ),
    DesignInventoryEntry.present(
      'SwipeActions',
      (_) => const NeumorphicSwipeActions(
        endActions: [DesignSwipeAction(label: 'Archive', onPressed: _none)],
        child: NeumorphicListTile(
          title: 'Bedroom',
          subtitle: 'Swipe for actions',
        ),
      ),
    ),
    const DesignInventoryEntry.absent(
      'RefreshIndicator',
      'its spinner sat over the list\'s first row; a pull to refresh that opens a gap at the top of the list comes in 0.2.0',
    ),
    DesignInventoryEntry.present(
      'TreeView',
      (_) => _Owns(
        _places,
        (context, places) => NeumorphicTreeView<String>(
          label: 'Rooms',
          controller: places,
          labelOf: (n) => n,
        ),
      ),
    ),
    DesignInventoryEntry.present(
      'Timeline',
      (_) => const NeumorphicTimeline(
        stops: [
          NeumorphicTimelineStop(
            time: '19:45',
            title: 'Lamps dim',
            body: 'The hall goes first.',
          ),
          NeumorphicTimelineStop(
            time: '22:30',
            title: 'Lights out',
            state: NeumorphicStepStatus.live,
          ),
        ],
      ),
    ),
    DesignInventoryEntry.present(
      'Avatar',
      (_) => const NeumorphicAvatar('MR', name: 'Marta Rossi'),
    ),
    DesignInventoryEntry.present(
      'AvatarGroup',
      (_) => const NeumorphicAvatarGroup([
        NeumorphicFace('MR'),
        NeumorphicFace('TB'),
        NeumorphicFace('IV'),
      ]),
    ),
    DesignInventoryEntry.present('Badge', (_) => const NeumorphicBadge(3)),
    DesignInventoryEntry.present('Tag', (_) => const NeumorphicTag('Warm')),
    DesignInventoryEntry.present(
      'Media',
      (_) =>
          const NeumorphicMedia(label: 'Bedroom', glyph: NeumorphicGlyphs.lamp),
    ),
    DesignInventoryEntry.present(
      'EmptyState',
      (_) => const NeumorphicEmptyState(
        title: 'All quiet',
        body: 'No rooms are on.',
      ),
    ),
    DesignInventoryEntry.present(
      'DescriptionList',
      (_) => const NeumorphicDescriptionList([
        NeumorphicDescription('Lights out', '22:30'),
        NeumorphicDescription('Lamps', '2'),
      ]),
    ),
    // Overlays
    DesignInventoryEntry.present(
      'Dialog',
      (_) => const NeumorphicDialog(
        title: 'Remove the scene?',
        message: 'The rooms keep their settings.',
      ),
    ),
    DesignInventoryEntry.present(
      'BottomSheet',
      (_) => const NeumorphicBottomSheet(
        title: 'Bedroom',
        showClose: false,
        inPlace: true,
        child: Text('Two lamps'),
      ),
    ),
    DesignInventoryEntry.present(
      'Sheet',
      (_) => const NeumorphicSheet(title: 'Filters', child: Text('Warm white')),
    ),
    DesignInventoryEntry.present(
      'ActionSheet',
      (_) => const NeumorphicActionSheet<String>(
        title: 'Bedroom',
        onSelected: _drop,
        onCancel: _none,
        actions: [
          NeumorphicActionSheetAction('share', 'Share'),
          NeumorphicActionSheetAction(
            'remove',
            'Remove the room',
            destructive: true,
          ),
        ],
      ),
    ),
    DesignInventoryEntry.present(
      'Popover',
      (_) => NeumorphicPopover(
        label: 'Lights out',
        trigger: (context, toggle) =>
            NeumorphicButton('When', onPressed: toggle),
        content: const Text('At half past ten, every night.'),
      ),
    ),
    DesignInventoryEntry.present(
      'HoverCard',
      (_) => const NeumorphicHoverCard(
        content: Text('Asleep by eleven, most nights'),
        child: NeumorphicLink('Marta Rossi', onPressed: _none),
      ),
    ),
    DesignInventoryEntry.present(
      'Tooltip',
      (_) => const NeumorphicTooltip(
        message: 'Share',
        child: Icon(NeumorphicGlyphs.share2),
      ),
    ),
    DesignInventoryEntry.present(
      'Menu',
      (_) => const NeumorphicMenu<String>(
        autofocus: false,
        items: [
          NeumorphicMenuItem('share', 'Share'),
          NeumorphicMenuItem('print', 'Print'),
        ],
        onSelected: _drop,
      ),
    ),
    DesignInventoryEntry.present(
      'SnackBar',
      (_) => const NeumorphicSnackBar(
        'Scene saved',
        actionLabel: 'Undo',
        onAction: _none,
      ),
    ),
    DesignInventoryEntry.present(
      'Banner',
      (_) =>
          const NeumorphicBanner('The hall lamp is changing.', title: 'Note'),
    ),
    // Feedback
    DesignInventoryEntry.present(
      'LinearProgressIndicator',
      (_) =>
          const NeumorphicLinearProgressIndicator(value: .6, label: 'Upload'),
    ),
    DesignInventoryEntry.present(
      'CircularProgressIndicator',
      (_) =>
          const NeumorphicCircularProgressIndicator(value: .6, label: 'Upload'),
    ),
    DesignInventoryEntry.present(
      'Skeleton',
      (_) => const NeumorphicSkeleton.lines(3),
    ),
    DesignInventoryEntry.present(
      'StatusView',
      (_) => const NeumorphicStatusView.loading(),
    ),
    DesignInventoryEntry.present(
      'Meter',
      (_) => const NeumorphicMeter(
        label: 'Hot water',
        value: 18,
        max: 24,
        high: 20,
        valueLabel: '18 of 24',
      ),
    ),
    // Charts
    DesignInventoryEntry.present(
      'LineChart',
      (_) => const NeumorphicLineChart(
        label: 'Hours slept',
        height: 140,
        labels: ['Mon', 'Tue', 'Wed', 'Thu'],
        series: [
          NeumorphicChartSeries('Hours', [7, 8, 6, 7.5]),
        ],
      ),
    ),
    DesignInventoryEntry.present(
      'BarChart',
      (_) => const NeumorphicBarChart(
        label: 'Lamp hours',
        height: 140,
        labels: ['June', 'July', 'August'],
        series: [
          NeumorphicChartSeries('Bedroom', [4, 6, 5]),
          NeumorphicChartSeries('Study', [3, 5, 7]),
        ],
      ),
    ),
    DesignInventoryEntry.present(
      'AreaChart',
      (_) => const NeumorphicAreaChart(
        label: 'Warmth',
        height: 140,
        labels: ['Mon', 'Tue', 'Wed', 'Thu'],
        series: [
          NeumorphicChartSeries('Warmth', [18, 20, 19, 21]),
        ],
      ),
    ),
    DesignInventoryEntry.present(
      'PieChart',
      (_) => const NeumorphicPieChart(
        label: 'Rooms',
        caption: 'rooms',
        slices: [NeumorphicPieSlice('On', 3), NeumorphicPieSlice('Off', 5)],
      ),
    ),
    DesignInventoryEntry.present(
      'Sparkline',
      (_) => const NeumorphicSparkline(
        label: 'Hours slept',
        values: [7, 8, 6, 7.5, 8],
      ),
    ),
  ],
);