Skip to content

feat: improve test coverage and fix compatibility issues#71

Merged
wasabeef merged 6 commits intomainfrom
feat-new-hooks-collection
Jun 23, 2025
Merged

feat: improve test coverage and fix compatibility issues#71
wasabeef merged 6 commits intomainfrom
feat-new-hooks-collection

Conversation

@wasabeef
Copy link
Copy Markdown
Owner

@wasabeef wasabeef commented Jun 22, 2025

🎯 Summary

This PR introduces a comprehensive Flutter Web demo site showcasing all 36 hooks from the flutter_use basic package, along with
various code quality improvements and CI/CD enhancements.

✨ Key Features

  1. Complete Interactive Demo Site 🌐
  • Added a new Flutter Web demo application with interactive examples for all 36 hooks
  • Organized hooks into logical categories:
    • 🎯 State Management (9 hooks)
    • 🎭 Effects & Lifecycle (7 hooks)
    • ⚡ Performance & Optimization (6 hooks)
    • 📜 Scroll & Navigation (2 hooks)
    • 🛠️ Utility & Integration (12 hooks)
  • Each demo includes:
    • Live interactive examples
    • Code snippets with syntax highlighting
    • Clear explanations of hook behavior
    • Visual feedback for state changes
  1. GitHub Pages Deployment 🚀
  • Configured automatic deployment to GitHub Pages
  • Added GitHub Actions workflow (deploy-demo.yml)
  • Integrated with melos for consistent builds
  • Demo will be accessible at https://wasabeef.github.io/flutter_use/
  1. Code Quality Improvements 🛠️
  • Fixed all static analysis warnings and errors
  • Replaced deprecated withOpacity() with withValues(alpha:) across 26 files
  • Removed unused variables and imports
  • Added proper control flow braces for better code style
  • Ensured all demos match the actual hook APIs
  1. CI/CD Enhancements 🔄
  • Added test-coverage script to melos configuration
  • Removed codecov upload steps for simpler CI
  • Integrated asdf tool version management (.tool-versions)
  • Updated melos configuration to include demo package

📝 Changes

New Files

  • demo/ - Complete Flutter Web demo application
  • .github/workflows/deploy-demo.yml - GitHub Pages deployment workflow
  • .tool-versions - Tool version management for Flutter and Dart

Modified Files

  • melos.yaml - Added demo package and new scripts (demo-build, demo-run, test-coverage)
  • .github/workflows/ci.yaml - Removed codecov integration
  • packages/basic/lib/src/use_click_away.dart - Fixed control body styling
  • Various demo files - Fixed withOpacity deprecation warnings

Deleted Files

  • .github/workflows/coverage.yaml - Removed dedicated coverage workflow
  • packages/basic/example/ - Replaced by centralized demo app

🧪 Testing

  • All hooks have been tested with interactive demos
  • Static analysis passes with no issues
  • Demo app runs successfully on Flutter Web
  • CI workflows updated and functional

🚀 Deployment

Once merged, the demo site will automatically deploy to GitHub Pages and be accessible at:
https://wasabeef.github.io/flutter_use/

📋 Checklist

  • All 36 basic package hooks have interactive demos
  • Static analysis passes (melos analyze)
  • Demo app builds and runs successfully
  • GitHub Actions workflow configured
  • Tool versions specified in .tool-versions
  • All deprecated APIs updated
  • Unused code removed

@wasabeef wasabeef force-pushed the feat-new-hooks-collection branch from e82ee6b to 34b974e Compare June 23, 2025 05:24
@wasabeef wasabeef force-pushed the feat-new-hooks-collection branch from 34b974e to 0259c80 Compare June 23, 2025 23:54
@wasabeef wasabeef marked this pull request as ready for review June 23, 2025 23:59
@wasabeef wasabeef merged commit e158090 into main Jun 23, 2025
2 checks passed
@wasabeef wasabeef deleted the feat-new-hooks-collection branch June 23, 2025 23:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant