flutter_fa_davi_table 0.9.3
flutter_fa_davi_table: ^0.9.3 copied to clipboard
A high-performance data table wrapper built on top of Davi. Optimized for lazy loading, infinite scrolling, and smart O(1) multi-platform grid rendering.
flutter_fa_davi_table #
A high-performance, reactive data table grid wrapper built on top of the powerful davi package. Specially engineered for enterprise multi-platform viewports, it simplifies complex data expansion pipelines, real-time reactive updates, dynamic sorting configurations, and seamless infinite scrolling layouts.
Key Architectural Advantages #
Standard data grids often struggle with performance lags or complex re-renders when expanding datasets dynamically. flutter_fa_davi_table eliminates these constraints by introducing professional state synchronization mechanisms directly into the widget tree lifecycle:
- Shallow Performance Caching: Features intelligent reference validation (
_isSameList) to prevent costly layout and element tree updates unless rows explicitly modify their instances. - O(1) Sorting Complexity Lookup: When synchronizing state transformations between data structures (e.g., your business blocks) and the structural view, the internal adapter creates efficient index lookup maps instead of executing heavy linear searches.
- Infinite Scroll Ready: Seamlessly wires up with lazy loading, pagination buffers, and edge-triggered scroll listeners without losing structural scroll positions.
里 Standalone Usage (100% Decoupled) #
flutter_fa_davi_table functions as a completely modular package. It does not depend on any large external framework ecosystem binaries and can be deployed directly into any independent, standard Cross-Platform Flutter application layout.
import 'package:flutter/material.dart';
import 'package:davi/davi.dart';
import 'package:flutter_fa_davi_table/flutter_fa_davi_table.dart';
// 1. Define your strict explicit model entity type
class ProductAsset {
final String sku;
final String name;
final double valuation;
ProductAsset({required this.sku, required this.name, required this.valuation});
}
class SampleTableWorkspace extends StatefulWidget {
const SampleTableWorkspace({super.key});
@override
State<SampleTableWorkspace> createState() => _SampleTableWorkspaceState();
}
class _SampleTableWorkspaceState extends State<SampleTableWorkspace> {
// 2. Setup your structural settings layout matrix
final FaDaviTableModelSettings<ProductAsset> _tableSettings = FaDaviTableModelSettings(
columns: [
DaviColumn<ProductAsset>(name: 'SKU Code', stringValue: (row) => row.sku, width: 120),
DaviColumn<ProductAsset>(name: 'Product Name', stringValue: (row) => row.name, grow: 1),
DaviColumn<ProductAsset>(name: 'Value', numericValue: (row) => row.valuation, width: 100),
],
);
List<ProductAsset> _activeProducts = [
ProductAsset(sku: 'PRD-001', name: 'Enterprise Token Core', valuation: 2500.0),
ProductAsset(sku: 'PRD-002', name: 'Styles Router Adapter', valuation: 1800.5),
];
@override
Widget build(BuildContext context) {
return Scaffold(
body: FaDaviTable<String, ProductAsset>(
// Control where sorting evaluation logic occurs
sortRuleSide: SortRuleSide.viewSide,
items: _activeProducts,
// Unique tracking key mapping reference
getItemId: (item) => item.sku,
modelSettings: _tableSettings,
columnWidthBehavior: ColumnWidthBehavior.scrollable,
placeholderWidget: const Center(child: Text("No records available")),
// Trigger lazy-loading callbacks effortlessly
onLastVisibleRow: (lastRowIndex) {
print("Nearing scroll boundaries. Loading next database batch...");
_loadMoreDataRecords();
},
),
);
}
void _loadMoreDataRecords() {
setState(() {
_activeProducts = [
..._activeProducts,
ProductAsset(sku: 'PRD-003', name: 'Overlay Overlay Network Mask', valuation: 950.0),
];
});
}
}
⚡ Integration with the FlutterArtist Ecosystem #
When deployed alongside the official platform architecture components, FaDaviTable hooks directly into central runtime controllers.
Accessing Global Framework Synchronizations #
You can consume centralized state tracking criteria or drive sorted results straight out of active logical state configurations:
FaDaviTable<String, MyDataEntity>(
// Automatically adheres to remote criteria shifts triggered inside your components
sortRuleSide: SortRuleSide.viewSide,
items: state.fetchedCollectionItems,
getItemId: (row) => row.entityId,
modelSettings: FaDaviTableModelSettings(
columns: dynamicGeneratedColumnsFromTokens,
onSort: (sortedColumns) {
// Streamline analytical tracking variables back to corporate microservices
},
),
)
Installation Manifest #
Add this parameter block into your standard project pubspec.yaml dependency configuration file:
dependencies:
flutter:
sdk: flutter
davi: ^latest_version
flutter_fa_davi_table: ^latest_version