Skip to main content

AsLoadingSpinner

A customizable loading spinner component for indicating loading states.

Import

import 'package:alphasow_ui/alphasow_ui.dart';

Basic Usage

AsLoadingSpinner()

Custom Size and Color

AsLoadingSpinner(
size: 32,
color: Colors.blue,
)

API Reference

Properties

PropertyTypeDefaultDescription
sizedouble?24Size of the spinner
colorColor?nullColor of the spinner
strokeWidthdouble?2.0Width of the spinner stroke

Examples

In Button

AsButton(
loading: isLoading,
onPressed: isLoading ? null : () async {
setState(() => isLoading = true);
await performAsyncOperation();
setState(() => isLoading = false);
},
child: Text('Submit'),
)

Centered Loading

Center(
child: AsLoadingSpinner(
size: 48,
color: Theme.of(context).primaryColor,
),
)

See Also