Files
tatlock-ui/lib/shared/components/data_grid/data_grid_exports.dart
T
Jeroen SchweitzerandClaude Opus 4.5 6989241ae7 chore: upgrade to riverpod 3.x and freezed 3.x
- Upgrade flutter_riverpod to 3.1.0, riverpod_annotation to 4.0.0
- Upgrade freezed to 3.2.3, freezed_annotation to 3.1.0
- Migrate freezed classes to use sealed keyword (freezed 3.x)
- Update provider naming (*NotifierProvider → *Provider)
- Add legacy.dart import for StateNotifierProvider compatibility
- Fix valueOrNull → value for AsyncValue
- Remove unused imports and fields
- Add sync from Authentik button to users/groups pages
- Suppress invalid_annotation_target warning in analysis_options

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 00:07:01 +01:00

89 lines
2.3 KiB
Dart

/// DataGrid component for displaying tabular data.
///
/// This library provides a configurable, feature-rich data grid widget
/// for Flutter applications using Riverpod for state management.
///
/// Features:
/// - Sortable columns
/// - Row selection (single and bulk)
/// - Per-row and bulk actions with confirmations
/// - Search/filtering
/// - Pagination or infinite scroll
/// - Custom cell rendering
/// - Empty, loading, and error states
/// - Responsive column widths
///
/// Example:
/// ```dart
/// // Define your data source
/// final usersSource = InMemoryDataSource<User>(
/// items: users,
/// searchMatcher: (user, query) =>
/// user.name.toLowerCase().contains(query.toLowerCase()),
/// );
///
/// // Define grid configuration
/// final usersConfig = DataGridConfig<User>(
/// columns: [
/// DataGridColumn(
/// header: 'Name',
/// valueBuilder: (u) => u.name,
/// sortable: true,
/// searchable: true,
/// ),
/// DataGridColumn(
/// header: 'Email',
/// valueBuilder: (u) => u.email,
/// ),
/// DataGridColumn(
/// header: 'Status',
/// valueBuilder: (u) => u.status,
/// cellBuilder: (context, u) => StatusBadge(status: u.status),
/// ),
/// ],
/// actions: [
/// DataGridAction(
/// icon: Icons.edit,
/// label: 'Edit',
/// onTap: (user) async => editUser(user),
/// ),
/// DataGridAction(
/// icon: Icons.delete,
/// label: 'Delete',
/// onTap: (user) async => deleteUser(user),
/// destructive: true,
/// requiresConfirmation: true,
/// ),
/// ],
/// rowsSelectable: true,
/// enableSearch: true,
/// );
///
/// // Create the provider
/// final usersGridProvider = dataGridProvider<User>(
/// source: usersSource,
/// config: usersConfig,
/// idSelector: (u) => u.id,
/// );
///
/// // Use in widget
/// DataGrid<User>(
/// provider: usersGridProvider,
/// config: usersConfig,
/// idSelector: (u) => u.id,
/// )
/// ```
library;
export 'package:flutter_riverpod/legacy.dart'
show StateNotifierProvider, StateNotifier;
export 'data_grid.dart';
export 'data_grid_action.dart';
export 'data_grid_column.dart';
export 'data_grid_config.dart';
export 'data_grid_provider.dart';
export 'data_grid_source.dart';
export 'data_grid_state.dart';
export 'widgets/data_grid_empty_state.dart';