antinvestor_ui_core
Shared design system and infrastructure for Antinvestor service UIs. Provides the Stitch theme, admin widgets, analytics framework, permission system, and routing composition.
Installation
dependencies:
antinvestor_ui_core: ^0.1.0
Features
- Theme: Material 3 Stitch color scheme with Manrope/Inter typography (
AppTheme) - Admin Widgets:
AdminEntityListPagewith DataTable, CSV export, glassmorphic edit panels - Analytics: Declarative
AnalyticsDashboardwith KPI cards, time-series/distribution charts, and top-N lists - Permissions:
PermissionManifest,PermissionGuard, batch checking support - Navigation:
AppShell,AppSidebar,RouteModulecomposition for host apps - Routing: Abstract
RouteModulebase class for service UI packages - Widgets:
StatusBadge,ProfileBadge,GradientButton,FormFieldCard,AmountDisplay,MetadataRow,Breadcrumb,PageHeader,SignaturePad - Auth: Token management, role guards, tenancy context, audit context
- API: Paginated streams, Connect RPC helpers
- Responsive: Breakpoint system and
ResponsiveLayout
Usage
import 'package:antinvestor_ui_core/antinvestor_ui_core.dart';
// Apply the Stitch theme
MaterialApp(
theme: AppTheme.lightTheme,
darkTheme: AppTheme.darkTheme,
);
// Declarative analytics dashboard
AnalyticsDashboard(
service: 'payment',
title: 'Payment Analytics',
metrics: ['total_payments', 'total_volume'],
charts: [ChartConfig.timeSeries('volume', label: 'Volume')],
);
// Permission-guarded action
PermissionGuard(
permissions: {'payment_send'},
child: FilledButton(onPressed: send, child: Text('Send')),
);
// Compose service modules into your app
final modules = [ProfileRouteModule(), PaymentRouteModule()];
ShellRoute(
routes: [...ownRoutes, for (final m in modules) ...m.buildRoutes()],
);
Architecture
All service UI packages (antinvestor_ui_profile, antinvestor_ui_payment, etc.) depend on this package and extend RouteModule to provide routes, navigation items, and permission manifests to the host application.
Libraries
- analytics/analytics_dashboard
- analytics/analytics_models
- analytics/analytics_provider
- analytics/distribution_chart
- analytics/metric_card
- analytics/metrics_row
- analytics/time_range_selector
- analytics/time_series_chart
- analytics/top_n_list
- antinvestor_ui_core
- api/api_base
- api/http_client_native
- api/http_client_web
- api/paginated_stream
- api/stream_helpers
- auth/audit_context
- auth/auth_token_provider
- auth/device_location
- auth/role_guard
- auth/role_provider
- auth/route_permissions
- auth/tenancy_context
- config/app_config
- config/url_strategy
- config/url_strategy_stub
- config/url_strategy_web
- logging/app_logger
- navigation/app_shell
- permissions/permission_guard
- permissions/permission_manifest
- permissions/permission_provider
- permissions/permission_registry
- responsive/breakpoints
- responsive/responsive_layout
- routing/route_module
- theme/app_theme
- theme/design_tokens
- widgets/admin_entity_list_page
- widgets/amount_display
- widgets/audit_trail_widget
- widgets/edit_dialog
- widgets/entity_chip
- widgets/entity_list_page
- widgets/error_helpers
- widgets/form_field_card
- widgets/metadata_row
- widgets/money_helpers
- widgets/page_header
- widgets/placeholder_page
- widgets/profile_badge
- widgets/service_analytics_page
- widgets/signature_pad
- widgets/state_badge
- widgets/status_badge