{"id":32305324,"url":"https://github.com/itsarvinddev/loading_icon_button","last_synced_at":"2026-02-21T08:36:40.660Z","repository":{"id":41382680,"uuid":"509364399","full_name":"itsarvinddev/loading_icon_button","owner":"itsarvinddev","description":null,"archived":false,"fork":false,"pushed_at":"2025-07-16T22:00:46.000Z","size":5653,"stargazers_count":4,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-23T06:50:04.085Z","etag":null,"topics":["flutter","hacktoberfest","hacktoberfest-accepted"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/itsarvinddev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-07-01T07:40:39.000Z","updated_at":"2025-07-16T22:23:45.000Z","dependencies_parsed_at":"2025-08-01T19:10:04.295Z","dependency_job_id":"1acb0b5e-b227-41fb-92e6-1de6fe103b8c","html_url":"https://github.com/itsarvinddev/loading_icon_button","commit_stats":null,"previous_names":["itsarvinddev/loading_icon_button","mohesu/loading_icon_button"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/itsarvinddev/loading_icon_button","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsarvinddev%2Floading_icon_button","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsarvinddev%2Floading_icon_button/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsarvinddev%2Floading_icon_button/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsarvinddev%2Floading_icon_button/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itsarvinddev","download_url":"https://codeload.github.com/itsarvinddev/loading_icon_button/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsarvinddev%2Floading_icon_button/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29677611,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T06:23:40.028Z","status":"ssl_error","status_checked_at":"2026-02-21T06:23:39.222Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flutter","hacktoberfest","hacktoberfest-accepted"],"created_at":"2025-10-23T06:49:37.405Z","updated_at":"2026-02-21T08:36:40.653Z","avatar_url":"https://github.com/itsarvinddev.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# loading_icon_button\n\n[![pub package](https://img.shields.io/pub/v/loading_icon_button.svg)](https://pub.dev/packages/loading_icon_button)\n[![GitHub Stars](https://img.shields.io/github/stars/itsarvinddev/loading_icon_button.svg?style=social\u0026label=Star)](https://github.com/itsarvinddev/loading_icon_button)\n[![GitHub Issues](https://img.shields.io/github/issues/itsarvinddev/loading_icon_button.svg)](https://github.com/itsarvinddev/loading_icon_button/issues)\n[![GitHub License](https://img.shields.io/github/license/itsarvinddev/loading_icon_button.svg)](https://github.com/itsarvinddev/loading_icon_button/blob/master/LICENSE)\n[![X](https://img.shields.io/badge/X-Follow-blue)](https://x.com/itsarvinddev)\n\nA comprehensive Flutter package providing customizable loading buttons with icons, text, and smooth animations. Features multiple button types including `LoadingButton`, `AutoLoadingButton`, and `ArgonButton` with Material Design compliance.\n\n\u003cimg src=\"https://github.com/itsarvinddev/loading_icon_button/blob/master/generated-image.png?raw=true\" width=\"370\" height=\"600\" /\u003e\n\n## Features\n\n- ✅ **Multiple Button Types**: `LoadingButton`, `AutoLoadingButton`, and `ArgonButton`\n- ✅ **Material Design**: Full Material Design compliance with Material 3 support\n- ✅ **Customizable States**: Idle, Loading, Success, Error states with smooth transitions\n- ✅ **Icon Support**: Built-in icon support with customizable icons for each state\n- ✅ **Cross-Platform**: Works on Android, iOS, Linux, macOS, web, and Windows\n- ✅ **Accessible**: Full accessibility support with semantic labels\n- ✅ **Responsive**: Automatic responsive design for tablets and mobile devices\n- ✅ **Zero Boilerplate**: Easy to use with minimal configuration\n- ✅ **Customizable Animations**: Configurable animation durations and effects\n\n## Installation\n\nAdd this to your `pubspec.yaml` file:\n\n```yaml\ndependencies:\n  loading_icon_button: ^latest\n```\n\nThen run:\n\n```bash\nflutter pub get\n```\n\n## Quick Start\n\n### Import\n\n```dart\nimport 'package:loading_icon_button/loading_icon_button.dart';\n```\n\n### Basic Usage\n\n```dart\nLoadingButton(\n  child: const Text('Login with Apple'),\n  iconData: Icons.apple,\n  onPressed: () =\u003e _handleLogin(),\n)\n```\n\n## Button Types\n\n### 1. LoadingButton\n\nThe main button with full customization options:\n\n```dart\nLoadingButton(\n  child: const Text('Submit'),\n  iconData: Icons.send,\n  onPressed: () async {\n    // Your async operation\n    await Future.delayed(Duration(seconds: 2));\n  },\n  duration: Duration(milliseconds: 300),\n  successColor: Colors.green,\n  errorColor: Colors.red,\n  successIcon: Icons.check,\n  failedIcon: Icons.error,\n)\n```\n\n### 2. AutoLoadingButton (Material Design)\n\nA Material Design compliant button with automatic loading states:\n\n```dart\nElevatedAutoLoadingButton(\n  onPressed: () async {\n    // Automatically shows loading state\n    await _performOperation();\n    // Automatically shows success/error state\n  },\n  child: const Text('Auto Loading'),\n  style: ButtonStyle(\n    backgroundColor: WidgetStateProperty.all(Colors.blue),\n    foregroundColor: WidgetStateProperty.all(Colors.white),\n    borderRadius: WidgetStateProperty.all(BorderRadius.circular(8.0)),\n  ),\n)\n```\n\n### 3. LoadingButton\n\nEnhanced Material Design button with advanced features:\n\n```dart\nLoadingButton(\n  type: ButtonType.elevated,\n  onPressed: () =\u003e _simulateLogin(),\n  child: const Row(\n    mainAxisSize: MainAxisSize.min,\n    children: [\n      Icon(Icons.login),\n      SizedBox(width: 8),\n      Text('Login'),\n    ],\n  ),\n  style: const LoadingButtonStyle(\n    backgroundColor: Colors.blue,\n    foregroundColor: Colors.white,\n    borderRadius: 8,\n  ),\n  loadingText: 'Logging in...',\n  successText: 'Welcome!',\n  errorText: 'Login failed',\n  onError: (error) {\n    ScaffoldMessenger.of(context).showSnackBar(\n      SnackBar(\n        content: Text('Login error: $error'),\n        backgroundColor: Colors.red,\n      ),\n    );\n  },\n),\n```\n\n### 4. ArgonButton\n\nA specialized button with advanced loader customization:\n\n```dart\nArgonButton(\n  height: 50,\n  width: 350,\n  borderRadius: 5.0,\n  color: Color(0xFF7866FE),\n  child: Text(\n    \"Continue\",\n    style: TextStyle(\n      color: Colors.white,\n      fontSize: 18,\n      fontWeight: FontWeight.w700,\n    ),\n  ),\n  loader: Container(\n    padding: EdgeInsets.all(10),\n    child: CircularProgressIndicator(\n      color: Colors.white,\n    ),\n  ),\n  onTap: (startLoading, stopLoading, btnState) {\n    if (btnState == ButtonState.Idle) {\n      startLoading();\n      // Perform your operation\n      doNetworkRequest().then((_) {\n        stopLoading();\n      });\n    }\n  },\n)\n```\n\n## Builder Pattern (Recommended)\n\nUse the fluent builder pattern for cleaner code:\n\n```dart\nLoadingButtonBuilder.elevated()\n  .onPressed(_handleSubmit)\n  .child(Text('Submit'))\n  .loadingText('Processing...')\n  .successText('Done!')\n  .errorText('Failed!')\n  .style(LoadingButtonStyle(\n    backgroundColor: Colors.blue,\n    borderRadius: 25,\n  ))\n  .build()\n```\n\n## Properties\n\n### LoadingButton Properties\n\n| Property             | Type            | Default        | Description                               |\n| -------------------- | --------------- | -------------- | ----------------------------------------- |\n| `child`              | `Widget`        | required       | The widget to display when button is idle |\n| `iconData`           | `IconData?`     | `null`         | Icon to display alongside text            |\n| `onPressed`          | `VoidCallback?` | `null`         | Callback when button is pressed           |\n| `duration`           | `Duration`      | `300ms`        | Animation duration                        |\n| `loaderSize`         | `double`        | `20.0`         | Size of the loading indicator             |\n| `animateOnTap`       | `bool`          | `true`         | Whether to animate on tap                 |\n| `resetAfterDuration` | `bool`          | `true`         | Auto-reset after success/error            |\n| `errorColor`         | `Color?`        | `Colors.red`   | Color for error state                     |\n| `successColor`       | `Color?`        | `Colors.green` | Color for success state                   |\n| `successIcon`        | `IconData?`     | `Icons.check`  | Icon for success state                    |\n| `failedIcon`         | `IconData?`     | `Icons.error`  | Icon for error state                      |\n| `iconColor`          | `Color?`        | `null`         | Color for icons                           |\n| `showBox`            | `bool`          | `true`         | Whether to show button container          |\n\n### AutoLoadingButton Properties\n\n| Property    | Type            | Default  | Description             |\n| ----------- | --------------- | -------- | ----------------------- |\n| `onPressed` | `VoidCallback?` | `null`   | Async callback function |\n| `child`     | `Widget`        | required | Button content          |\n| `style`     | `ButtonStyle?`  | `null`   | Button styling          |\n\n### ArgonButton Properties\n\n| Property       | Type                                        | Default       | Description                     |\n| -------------- | ------------------------------------------- | ------------- | ------------------------------- |\n| `height`       | `double`                                    | `50.0`        | Button height                   |\n| `width`        | `double`                                    | `350.0`       | Button width                    |\n| `borderRadius` | `double`                                    | `5.0`         | Border radius                   |\n| `color`        | `Color`                                     | `Colors.blue` | Button background color         |\n| `child`        | `Widget`                                    | required      | Button content                  |\n| `loader`       | `Widget?`                                   | `null`        | Custom loader widget            |\n| `onTap`        | `Function(Function, Function, ButtonState)` | required      | Tap callback with state control |\n\n## Examples\n\n### Basic Login Button\n\n```dart\nclass LoginScreen extends StatefulWidget {\n  @override\n  _LoginScreenState createState() =\u003e _LoginScreenState();\n}\n\nclass _LoginScreenState extends State {\n\n  void _handleLogin() async {\n    try {\n      // Simulate login process\n      await Future.delayed(Duration(seconds: 2));\n\n      // Simulate random success/failure\n      if (DateTime.now().millisecondsSinceEpoch % 2 == 0) {\n        throw Exception('Login failed');\n      }\n    } catch (e) {\n      throw Exception('Login failed');\n    }\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return Scaffold(\n      body: Center(\n        child: LoadingButton(\n          onPressed: _handleLogin,\n          child: Text('Login'),\n          iconData: Icons.login,\n          successIcon: Icons.check_circle,\n          failedIcon: Icons.error_outline,\n        ),\n      ),\n    );\n  }\n}\n```\n\n### File Upload with Progress\n\n```dart\nclass FileUploadButton extends StatelessWidget {\n\n  Future _uploadFile() async {\n    _isLoading = true;\n    // Simulate file upload\n    await Future.delayed(Duration(seconds: 3));\n\n    // Simulate random success/failure\n    if (Random().nextBool()) {\n      throw Exception('Upload failed');\n    }\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return LoadingButton(\n      onPressed: _uploadFile,\n      child: Row(\n        mainAxisSize: MainAxisSize.min,\n        children: [\n          Icon(Icons.cloud_upload),\n          SizedBox(width: 8),\n          Text('Upload File'),\n        ],\n      ),\n    );\n  }\n}\n```\n\n### Custom Styled Button\n\n```dart\nLoadingButtonBuilder.filled()\n  .onPressed(_handleSubmit)\n  .child(Text('Custom Button'))\n  .style(LoadingButtonStyle(\n    backgroundColor: Colors.deepPurple,\n    foregroundColor: Colors.white,\n    loadingBackgroundColor: Colors.deepPurple.shade300,\n    successBackgroundColor: Colors.green,\n    errorBackgroundColor: Colors.red,\n    borderRadius: 30,\n    elevation: 8,\n    padding: EdgeInsets.symmetric(horizontal: 32, vertical: 16),\n  ))\n  .loadingText('Processing...')\n  .successText('Success!')\n  .errorText('Try Again')\n  .build()\n```\n\n## Global Configuration\n\nSet global defaults for all buttons:\n\n```dart\nvoid main() {\n  // Configure global settings\n  LoadingButtonConfig().defaultAnimationDuration = Duration(milliseconds: 400);\n  LoadingButtonConfig().enableHapticFeedback = true;\n  LoadingButtonConfig().defaultLoadingWidget = MyCustomSpinner();\n\n  runApp(MyApp());\n}\n```\n\n## Accessibility\n\nThe package includes full accessibility support:\n\n- **Semantic Labels**: Automatic screen reader support\n- **Focus Management**: Proper keyboard navigation\n- **State Announcements**: Screen reader announces state changes\n- **High Contrast**: Supports high contrast mode\n\n```dart\nLoadingButton(\n  onPressed: _handleSubmit,\n  child: Text('Submit'),\n  // Accessibility labels\n  loadingText: 'Processing your request',\n  successText: 'Request completed successfully',\n  errorText: 'Request failed, please try again',\n)\n```\n\n## Migration Guide\n\n### From v0.0.X to v1.0.X\n\n- Update import statements\n- Replace deprecated properties with new equivalents\n- Use `LoadingButtonStyle` for styling instead of individual properties\n\nSee the [Migration Guide](https://pub.dev/packages/loading_icon_button/changelog) for detailed instructions.\n\n## Platform Support\n\n| Platform | Support |\n| -------- | ------- |\n| Android  | ✅      |\n| iOS      | ✅      |\n| Linux    | ✅      |\n| macOS    | ✅      |\n| Web      | ✅      |\n| Windows  | ✅      |\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n### Development Setup\n\n1. Clone the repository\n2. Run `flutter pub get`\n3. Run `flutter test` to ensure tests pass\n4. Make your changes\n5. Add tests for new features\n6. Submit a pull request\n\n## Issues and Feedback\n\nPlease file issues and feedback on the [GitHub Issues](https://github.com/itsarvinddev/loading_icon_button/issues) page.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](https://github.com/itsarvinddev/loading_icon_button/blob/master/LICENSE) file for details.\n\n## Acknowledgments\n\nSpecial thanks to the Flutter community and contributors who made this package possible.\n\n- [Contributors](https://github.com/itsarvinddev/loading_icon_button/graphs/contributors)\n- Inspired by [rounded_loading_button](https://pub.dev/packages/rounded_loading_button)\n- Material Design guidelines\n\n**Package:** [loading_icon_button](https://pub.dev/packages/loading_icon_button)  \n**Repository:** [GitHub](https://github.com/itsarvinddev/loading_icon_button)  \n**Issues:** [Report Issues](https://github.com/itsarvinddev/loading_icon_button/issues)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitsarvinddev%2Floading_icon_button","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitsarvinddev%2Floading_icon_button","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitsarvinddev%2Floading_icon_button/lists"}