{"id":32306512,"url":"https://github.com/kenresoft/extensionresoft","last_synced_at":"2026-02-21T02:39:53.401Z","repository":{"id":221594113,"uuid":"624181357","full_name":"kenresoft/extensionresoft","owner":"kenresoft","description":"A collection of Dart/Flutter Extension functions and Helper functions for faster development.    This was developed to aide developers write minimized but powerful codes.    This makes for codes re-usability and easy coding reading.","archived":false,"fork":false,"pushed_at":"2025-10-20T11:05:07.000Z","size":633,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-20T13:06:52.114Z","etag":null,"topics":["dart","extension","extension-module","flutter","function","helper"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/extensionresoft","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kenresoft.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-04-05T23:18:04.000Z","updated_at":"2025-07-07T21:45:32.000Z","dependencies_parsed_at":"2024-02-08T23:03:26.802Z","dependency_job_id":"24f27092-531f-47cd-b1f5-576fa25faf6b","html_url":"https://github.com/kenresoft/extensionresoft","commit_stats":null,"previous_names":["kenresoft/extensionresoft"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/kenresoft/extensionresoft","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenresoft%2Fextensionresoft","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenresoft%2Fextensionresoft/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenresoft%2Fextensionresoft/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenresoft%2Fextensionresoft/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kenresoft","download_url":"https://codeload.github.com/kenresoft/extensionresoft/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenresoft%2Fextensionresoft/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29671794,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T00:11:43.526Z","status":"online","status_checked_at":"2026-02-21T02:00:07.432Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["dart","extension","extension-module","flutter","function","helper"],"created_at":"2025-10-23T07:03:54.817Z","updated_at":"2026-02-21T02:39:53.388Z","avatar_url":"https://github.com/kenresoft.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ExtensionResoft\n\n[![pub package](https://img.shields.io/pub/v/extensionresoft.svg?label=extensionresoft\u0026color=blue)](https://pub.dev/packages/extensionresoft)\n[![pub points](https://img.shields.io/pub/points/extensionresoft?logo=dart)](https://pub.dev/packages/extensionresoft/score)\n[![Pub Monthly Downloads](https://img.shields.io/pub/dm/extensionresoft?logo=dart\u0026color=yellow)](https://pub.dev/packages/extensionresoft/score)\n[![likes](https://img.shields.io/pub/likes/extensionresoft?logo=dart\u0026color=red)](https://pub.dev/packages/extensionresoft/score)\n\u003ca href=\"https://github.com/kenresoft/extensionresoft\"\u003e![Star on Github](https://img.shields.io/github/stars/kenresoft/extensionresoft.svg?style=flat\u0026logo=github\u0026colorB=deeppink\u0026label=stars)\u003c/a\u003e\n\u003ca href=\"https://github.com/Solido/awesome-flutter\"\u003e![Awesome Flutter](https://img.shields.io/badge/Awesome-Flutter-blue.svg?longCache=true\u0026style=flat-square)\u003c/a\u003e\n\u003ca href=\"https://opensource.org/license/bsd-3-clause\"\u003e![License: BSD](https://img.shields.io/badge/license-BSD_3--Clause-teal.svg)\u003c/a\u003e\n\nA comprehensive toolkit of extensions, widgets, and utilities to accelerate Flutter development with less code. ExtensionResoft optimizes common tasks, enhances UI components, and provides robust architecture patterns.\n\n## Features\n\n### 📝 Enhanced Text/Form Field Input\nBuild sophisticated form fields with extensive customization:\n\n- **CustomTextField**: A highly customizable text input field with validation, dropdown support, and accessibility features\n- **Validation System**: Built-in validation with error, warning, and info severity levels\n- **Password Visibility**: Configurable password visibility toggle with custom icons\n- **Dropdown Support**: Seamless integration with dropdown menus\n- **Accessibility**: Comprehensive semantics and validation announcements\n- **Performance Optimized**: Efficient state management and decoration caching\n- **Theming Support**: Automatic light/dark mode adaptation\n- **Feedback Widget**: Customizable validation messages with icons and animations\n\n### 🌐 Internet Connectivity Management\n\nDetect and respond to network changes reliably:\n\n- **Real-time Monitoring**: Observe detailed connectivity state changes through streams\n- **Granular Control**: Monitor specific connectivity aspects with dedicated streams\n- **Simplified API**: Check network status with straightforward methods\n- **Resilient Applications**: Build offline-ready features with minimal effort\n\n### 🖼️ Advanced Image Handling\n\nCreate robust image components with minimal effort:\n\n- **Multi-source Support**: Handle network URLs, asset paths, and file objects through a unified API\n- **AppImage**: Rectangular images with custom border radius, intelligent error handling, and fallbacks\n- **AppCircleImage**: Circular avatar images with placeholder and error states\n- **Performance Optimized**: Device pixel ratio-aware caching for memory efficiency\n- **Decoration Support**: Use as BoxDecoration background images easily\n\n### 🎭 Animation Utilities\nCreate smooth, performant animations with minimal code:\n\n- **AnimatedFadeScale**: Combined fade and scale animation with configurable timing and curves\n    - Customizable start/end scales\n    - Optional delay before animation\n    - Manual animation control via `value` parameter\n    - Material transparency support\n\n- **FadeSlideTransition**: High-performance view transitions with fade and slide effects\n    - Smooth content transitions with queuing support\n    - Configurable slide direction and distance\n    - Key-based transition triggering\n    - Optimized for rapid content changes\n    - Predefined fast/slow duration presets\n\n### 🔐 Secure PIN Authentication UI\n\nBuild secure user authentication flows:\n\n- **PinEntry Widget**: Customizable PIN entry with multiple security configurations\n- **Visual Customization**: Style input fields and keyboard components separately\n- **Validation Support**: Custom handlers for completion and validation events\n\n### 🧰 UI Extension Toolkit\n\nWrite less code for common UI patterns:\n\n- **Spacing Extensions**: Clean spacer syntax with both method and getter options\n- **Custom Cards**: Create styled cards with simple radius-based extensions\n- **Text Styling**: Format text with fluent extensions for improved readability\n- **Image Path Extensions**: Convert asset paths to image widgets directly\n\n### 🧠 Logic \u0026 Functional Extensions\n\nEnhance code clarity and maintenance:\n\n- **Conditional Functions**: Widget-friendly alternatives to ternary operators\n- **Path Extensions**: Apply transformations to values with clean syntax\n- **Value Management**: Robust value retrieval with fallback handling\n\n### 📦 Storage Utilities\n\nManage persistent data efficiently:\n\n- **SharedPreferencesService**: Type-safe storage for app settings and user preferences\n- **Support for Multiple Types**: Store and retrieve booleans, strings, integers, and doubles\n\n## Getting Started\n\n### Installation\n\nAdd the package to your `pubspec.yaml`:\n\n```yaml\ndependencies:\n  extensionresoft: ^1.3.0\n```\n\nThen run:\n\n```bash\nflutter pub get\n```\n\n### Basic Usage\n\nImport the package:\n\n```dart\nimport 'package:extensionresoft/extensionresoft.dart';\n```\n\n## Usage Examples\n\n### Enhanced Text Input\n\n```dart\n    // Password field with visibility toggle\n    CustomTextField(\n      margin: EdgeInsets.symmetric(vertical: 8.0),\n      labelText: 'Password',\n      isPassword: true,\n      passwordVisibilityConfig: PasswordVisibilityConfig(\n        iconSize: 22,\n        visibilityOnTooltip: 'Hide password',\n        visibilityOffTooltip: 'Show password',\n      ),\n    );\n\n    // Dropdown field\n    CustomTextField\u003cint\u003e(\n      labelText: 'Age Group',\n      items: [\n        DropdownMenuItem(value: 1, child: Text('Under 18')),\n        DropdownMenuItem(value: 2, child: Text('18-25')),\n        DropdownMenuItem(value: 3, child: Text('26-35')),\n      ],\n      onDropdownChanged: (value) {\n        print('Selected age group: $value');\n      },\n    );\n\n    // Styled text field with custom feedback\n    CustomTextField(\n      labelText: 'Email',\n      hintText: 'your@email.com',\n      keyboardType: TextInputType.emailAddress,\n      borderRadius: BorderRadius.circular(12),\n      fillColor: Colors.grey[100],\n      borderColor: Colors.blueGrey,\n      focusColor: Colors.blue,\n      errorStyle: TextStyle(color: Colors.red[800]),\n      warningStyle: TextStyle(color: Colors.orange[800]),\n      helperStyle: TextStyle(color: Colors.grey),\n      helperText: 'Enter a valid email address',\n      feedbackShowIcons: true,\n      feedbackPadding: EdgeInsets.symmetric(horizontal: 8, vertical: 4),\n    );\n\n    // Field with validation controller integration\n    final validationController = ValidationController();\n\n    // Can also be used for multiple fields wrapped in a `Form`.\n    CustomTextField(\n      labelText: 'Order Number',\n      validationController: validationController,\n      validator: (value) {\n        if (value == null || value.isEmpty) return 'Required field';\n        if (!RegExp(r'^ORD-\\d{4}$').hasMatch(value)) {\n          return 'Format: ORD-1234';\n        }\n        return null;\n      },\n    );\n\n    // Later in your code\n    if (validationController.validate()) {\n      // All fields valid\n    }\n```\n\n### Internet Connectivity\n\n```dart\n    // Create a checker instance\n    final connectionChecker = InternetConnectionChecker();\n    \n    // Check current connection status\n    final isConnected = await connectionChecker.isInternetConnected;\n    print('Internet connected: $isConnected');\n    \n    // Listen to detailed connectivity changes\n    connectionChecker.onInternetConnectivityChanged.listen((result) {\n      print('Connection Status: ${result.hasInternetAccess}');\n      print('Connection Type: ${result.connectionType}');\n      \n      // Update UI based on connectivity\n      if (result.hasInternetAccess) {\n        // Load online data\n      } else {\n        // Show offline mode UI\n      }\n    });\n    \n    // Simplified boolean stream for quick status checks\n    connectionChecker.onIsInternetConnected.listen((isConnected) {\n      print('Internet status changed: $isConnected');\n    });\n```\n\n### Image Handling\n\n```dart\n    // Network image with fallback and border radius\n    AppImage(\n      'https://example.com/profile.jpg',\n      width: 150,\n      height: 150,\n      fit: BoxFit.cover,\n      borderRadius: BorderRadius.circular(8),\n      backgroundColor: Colors.grey[200],\n      errorWidget: Icon(Icons.broken_image),\n      fallbackImage: 'assets/default_image.png',\n    )\n    \n    // Circle avatar from network or asset\n    AppCircleImage(\n      'assets/profile_photo.jpg', // or network URL or File object\n      radius: 40,\n      fit: BoxFit.cover,\n      placeholder: CircularProgressIndicator(strokeWidth: 2),\n      errorWidget: Icon(Icons.person),\n    )\n    \n    // As decoration image\n    Container(\n      decoration: BoxDecoration(\n        image: AppImage('https://example.com/bg.jpg')\n            .toDecorationImage(\n          decorationFit: BoxFit.cover,\n          fallbackImage: 'assets/default_bg.png',\n        ),\n      ),\n    )\n    \n    // Path-based image extensions\n    'assets/image.png'.img(width: 100, height: 100)\n    'assets/avatar.png'.circleImage(fit: BoxFit.cover)\n```\n### Animation Utilities\n\n```dart\n    // Basic fade and scale animation\n    AnimatedFadeScale(\n      duration: Duration(milliseconds: 500),\n      child: Container(\n        width: 200,\n        height: 200,\n        color: Colors.blue,\n        child: Center(child: Text('Hello!')),\n      ),\n    );\n\n    // Staggered animations with delay\n    Column(\n      children: [\n        AnimatedFadeScale(\n          delay: Duration(milliseconds: 100),\n          child: Card(child: /*...*/),\n        ),\n        AnimatedFadeScale(\n          delay: Duration(milliseconds: 200),\n          child: Card(child: /*...*/),\n        ),\n        AnimatedFadeScale(\n          delay: Duration(milliseconds: 300),\n          child: Card(child: /*...*/),\n        ),\n      ],\n    );\n\n    // Manual animation control\n    double _animationValue = 0.0;\n\n    AnimatedFadeScale(\n      value: _animationValue,\n      child: FloatingActionButton(\n        onPressed: () {\n          setState(() {\n            _animationValue = _animationValue == 0.0 ? 1.0 : 0.0;\n          });\n        },\n      ),\n    );\n\n    // FadeSlideTransition with key-based triggering\n    final _transitionKey = UniqueKey();\n\n    FadeSlideTransition(\n      transitionKey: _transitionKey,\n      duration: Duration(milliseconds: 400),\n      initialSlideOffset: Offset(0, 0.1), // Slide up from bottom\n      child: _buildContentWidget(),\n    );\n\n    // Later when content needs to change\n    setState(() {\n      _transitionKey = UniqueKey(); // Triggers new transition\n    });\n\n    // Using predefined durations\n    FadeSlideTransition.fast(\n      child: NotificationBadge(count: 5),\n    );\n\n    FadeSlideTransition.slow(\n      child: HeroImage(url: imageUrl),\n    );\n\n    // Transition with completion callback\n    FadeSlideTransition(\n      child: ProfileHeader(user: user),\n      onTransitionComplete: () {\n        print('Transition finished!');\n      },\n    );\n```\n\n### PIN Authentication\n\n```dart\n    PinEntry(\n      pinLength: 6,\n      onInputComplete: (pin) {\n        // Handle PIN validation\n      },\n      inputFieldConfiguration: InputFieldConfiguration(\n        obscureText: true,\n        fieldFillColor: Colors.grey[200],\n        focusedBorderColor: Colors.blue,\n      ),\n      keyboardConfiguration: KeyboardConfiguration(\n        keyBackgroundColor: Colors.white,\n        keyTextStyle: TextStyle(fontSize: 24, fontWeight: FontWeight.bold),\n      ),\n    )\n```\n\n### UI Extensions\n\n```dart\n    // Spacing utilities\n    16.spaceX()  // SizedBox(width: 16)\n    24.spaceY()  // SizedBox(height: 24)\n    32.spaceXY() // SizedBox(width: 32, height: 32)\n    \n    // Getters for even cleaner code\n    20.spX  // SizedBox(width: 20)\n    30.spY  // SizedBox(height: 30)\n    \n    // Custom card with styling\n    12.radius(\n      child: Padding(\n        padding: EdgeInsets.all(16),\n        child: Text('Rounded Card Example'),\n      ),\n      elevation: 2,\n      color: Colors.blue[50],\n      strokeColor: Colors.black12,\n    )\n    \n    // Text styling\n    'Hello Flutter'.edit(\n      textStyle: TextStyle(\n        fontSize: 20,\n        fontWeight: FontWeight.bold,\n        color: Colors.teal,\n      ),\n      textAlign: TextAlign.center,\n    )\n```\n\n### Logic \u0026 Functional Extensions\n\n```dart\n    // Path extension to transform values\n    final doubled = 16.p((n) =\u003e n * 2);  // 32\n    \n    // Widget-friendly conditional logic\n    final result = condition(isActive, 'Active', 'Inactive');\n    \n    // Function-based conditionals (lazy evaluation)\n    final message = conditionFunction(\n      hasPermission,\n      () =\u003e 'Access granted',\n      () =\u003e 'Access denied: ${getErrorMessage()}',\n    );\n    \n    // Safe value retrieval with fallback\n    final displayName = get(user.name, 'Guest User');\n```\n\n### Shared Preferences\n\n```dart\n    // Initialize service\n    await SharedPreferencesService.init();\n    \n    // Store values\n    await SharedPreferencesService.setBool('isDarkMode', true);\n    await SharedPreferencesService.setString('username', 'flutter_dev');\n    \n    // Retrieve values\n    final isDarkMode = SharedPreferencesService.getBool('isDarkMode');\n    final username = SharedPreferencesService.getString('username', 'guest');\n```\n\n## Advanced Usage\n\nSee the [API Reference](https://pub.dev/documentation/extensionresoft/latest/) for comprehensive documentation of all available extensions and utilities.\n\n## Migration from 1.0.0 to 1.1.0\n\nWhile version 1.1.0 maintains backward compatibility, we recommend the following changes:\n\n- Replace `assetFallback` with `fallbackImage` parameter in image widgets for improved naming consistency\n- Take advantage of the new `File` object support in image widgets\n- Utilize new `borderRadius` and `backgroundColor` parameters for enhanced customization\n\n## Screenshots\n\n(None applicable in this current release)\n\n[//]: # (Include any relevant screenshots or GIFs showcasing the extensions in action \u0026#40;if applicable\u0026#41;.)\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/amazing-feature`)\n3. Commit your Changes (`git commit -m 'Add some amazing feature'`)\n4. Push to the Branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## License\n\nThis project is licensed under the BSD 3-Clause License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkenresoft%2Fextensionresoft","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkenresoft%2Fextensionresoft","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkenresoft%2Fextensionresoft/lists"}