Component Overview
Alphasow UI provides a comprehensive collection of Flutter UI components designed for consistent theming and platform adaptation. All components automatically switch between Material Design and Cupertino styling based on the current platform.
Component Categoriesβ
π Buttonsβ
Interactive elements for user actions.
- AsButton - Primary and secondary buttons with variants
- AsIconButton - Icon-based buttons with hover effects
- AsLinkButton - Text-based link buttons
π Forms & Inputβ
Components for data collection and form validation.
- AsForm - Form wrapper with validation and state management
- AsTextFormField - Text input with built-in form validation
- AsTextField - Basic text input field
- AsCheckbox - Checkbox with custom styling
π¨ Alerts & Notificationsβ
Components for displaying messages and getting user attention.
- AsAlertDialog - Modal dialog boxes
- AsAlertBanner - In-line banner alerts
- AsBottomSheet - Bottom sheet modals
- Banner System - Global notification overlay
π§ Navigation & Layoutβ
Components for app structure and navigation.
- AsScaffold - Platform-adaptive scaffold
- AsAppBar - Application bar component
- AsNavigationRail - Side navigation
- AsListTile - List item component
π¨ Visual Elementsβ
Components for visual presentation and feedback.
- AsAvatar - User avatar component
- AsCard - Card container component
- AsLabel - Text labels with styling
- AsDivider - Visual separators
β³ Loading Indicatorsβ
Components for showing loading states.
- AsLoadingCircular - Circular progress indicator
- AsLoadingSpinner - Custom spinner animation
π Menusβ
Dropdown and contextual menu components.
- AsMenuDropdown - Dropdown menu component
- AsMenuDown - Contextual dropdown menus
- AsMenuDrawer - Navigation drawer component
Platform Adaptationβ
All components automatically adapt their appearance based on the current platform:
iOS/macOS (Cupertino)β
- Native iOS design language
- Cupertino colors and typography
- iOS-style animations and transitions
Android/Web (Material)β
- Material Design 3 principles
- Material color system
- Material motion and elevation
Common Propertiesβ
Most Alphasow UI components share these common properties:
Stylingβ
style- Custom styling optionscolor- Primary color overridebackgroundColor- Background color override
Behaviorβ
onPressed- Tap/click callback (interactive components)disabled- Disable interactionloading- Show loading state (where applicable)
Accessibilityβ
semanticsLabel- Screen reader descriptionexcludeSemantics- Exclude from accessibility tree
Usage Patternsβ
Basic Component Usageβ
AsButton(
onPressed: () {
// Handle button press
},
child: const Text('Press Me'),
)
With Custom Stylingβ
AsButton(
style: AsButtonStyle.secondary,
backgroundColor: Colors.green,
onPressed: () {
// Handle button press
},
child: const Text('Custom Button'),
)
With Loading Stateβ
AsButton(
loading: isLoading,
onPressed: isLoading ? null : () {
// Handle button press
},
child: const Text('Submit'),
)
Getting Startedβ
-
Import the package:
import 'package:alphasow_ui/alphasow_ui.dart'; -
Wrap your app with AlphasowUiApp:
AlphasowUiApp(
home: MyHomePage(),
) -
Start using components:
AsButton(
onPressed: () => context.showBanner(
message: 'Hello!',
type: AlertType.success,
),
child: const Text('Show Banner'),
)
Next Stepsβ
- Explore specific component documentation
- Check out the live demo to see components in action