NIB / DOCUMENTATION
Platform and performance notes — NibComponents
Know which layout and measurement work belongs to the host app.
Open interactive viewGive scrollable controls constraints
NibTabs fills a bounded parent and owns its vertical scroll. Nesting it in an unbounded vertical ListView or SingleChildScrollView can reintroduce stuck scroll behavior. Put page content in its header and footer slots instead.
Test NibDataTable and NibResizablePanels at your actual window and text scales. The package does not choose responsive breakpoints for your application.
| API | Type | Default | Behavior |
|---|---|---|---|
| NibTabs.header / footer | Widget? | null | Content around the pinned bar and active panel in one scroll view. |
| NibDataTable.stickyHeader | bool | true | Pinned column header within the table layout. |
| NibCombobox.debounceDuration | Duration | 300 ms | Wait before loading async options after a query change. |
Give a scrolling section a measurable height
Flutter parents give constraints to children, and children choose a size inside them. A vertical scroll view permits its contents to be taller than the viewport. NibTabs also owns a viewport, so putting it directly inside that unconstrained content leaves it without a finite height to fill. Fix the ownership of scrolling instead of trying progressively larger padding values.
Place the snippet below in a Scaffold body. The SizedBox establishes a 420 logical-pixel viewport for the example. In a full screen, Expanded inside a bounded Column can provide the remaining height instead. Content before and after the tab panels belongs in header and footer so the same vertical scroll handles the whole region. Each NibTab builder should return ordinary content, not another unbounded full-page scroll view.
Resize the window, enlarge text, and scroll from the header through the footer. The bar should pin while the content continues. Then try a long tab label; scrollable: true changes the bar to intrinsic-width items that can scroll horizontally. It does not fix a missing vertical constraint. NibResizablePanels needs finite bounds on both axes for the same basic reason: it divides available space.
SizedBox(
height: 420,
child: NibTabs(
header: const Padding(
padding: EdgeInsets.all(16),
child: Text('Account'),
),
tabs: [
NibTab(label: 'Profile', builder: (_) => const Text('Profile details')),
NibTab(label: 'Activity', builder: (_) => const Text('Recent activity')),
],
footer: const Padding(
padding: EdgeInsets.all(16),
child: Text('End of account details'),
),
),
)Separate data work from paint work
A slow screen can spend time fetching rows, sorting them, building cells, laying out text or drawing effects. Measure those stages separately. Replace remote data with a fixed list first; if the delay remains, the network was not the only cause. Keep expensive formatting out of repeated cell builds when the same values can be prepared once. Use stable record keys so replacing a row does not unnecessarily replace its interactive subtree.
For a searchable remote list, NibCombobox waits 300 milliseconds by default before invoking asyncOptionsLoader after a query change. It guards against stale results, but it does not make your service inexpensive or remove the need to handle service errors. Test rapid query changes, an empty result and a failed request. Decide what the host should display and whether a retry is appropriate.
The button, form and theme demos are deliberately small. They are useful for understanding behavior, not for predicting a large table’s frame time. Profile representative row counts and overlay combinations in profile or release mode on your target hardware. Include repeated opening, closing and route disposal when checking retained memory. Record the device, build mode and data size with a result so a later comparison measures the same workload.
Measure the real workload
The examples and widget tests show behavior, but they do not give a frame-time guarantee for your row count, shader, or target GPU. Profile large tables, open overlays, and theme changes in the mode and device you intend to ship.
When animated rows are enabled, stable rowKey values matter: the default ValueKey(row) relies on stable equality or identity across rebuilds.