What is Flutter CoreLibrary?
Flutter CoreLibrary brings together a suite of packages that solve common challenges in Flutter development. Each package is designed to work seamlessly with modern Flutter applications while maintaining high code quality standards. The library includes packages for:CQRS Communication
Communicate with CQRS-compatible backends using queries and commands
UI Components
Enhanced gradients with HCT color interpolation and markup text rendering
Authentication
OAuth2-compliant login client with automatic token refresh
Development Tools
Debug pages, lint rules, and hooks for better developer experience
Key packages
Here are some of the core packages available in the Flutter CoreLibrary:cqrs
A library for convenient communication with CQRS-compatible backends, using queries and commands. Perfect for apps that follow the Command Query Responsibility Segregation pattern. Key features:- Type-safe query and command execution
- Built-in error handling with validation support
- Seamless integration with HTTP clients
leancode_lint
An opinionated set of high-quality, robust, and up-to-date lint rules used at LeanCode. Helps you maintain code quality and consistency across your Flutter projects. Key features:- Custom lint rules for Flutter best practices
- Configurable analyzer plugin
- Code assists for common refactorings
leancode_hooks
A collection of commonly used hooks gathered in one place for better discoverability and consistent versioning. Built on top offlutter_hooks.
Key features:
useBloc,useBlocListener,useBlocStatefor BLoC integrationuseDebounceanduseThrottlefor performance optimizationuseFocusedandusePostFrameEffectfor widget lifecycle management
enhanced_gradients
Flutter gradient wrappers that interpolate colors in the HCT color system, providing smoother and more natural color transitions. Key features:- Enhanced versions of
LinearGradient,RadialGradient, andSweepGradient HctColorTweenfor animations- Better color interpolation than standard RGB
login_client
OAuth2-compliant login client that stores credentials for the currently authenticated user and automatically refreshes tokens. Key features:- Automatic token refresh
- Secure credential storage
- OAuth2 standard compliance
leancode_debug_page
A debug page that gathers HTTP requests and logger logs with filtering, search, and sharing capabilities. Key features:- Request and response inspection
- Log level filtering
- Draggable FAB and shake gesture entry points
- Share individual items or full logs
Why choose Flutter CoreLibrary?
Flutter CoreLibrary packages are production-ready and used in apps with millions of users.
- Production-Ready: All packages are battle-tested in real-world applications with millions of users
- High Quality: Maintained with strict lint rules and comprehensive testing
- Consistent: Packages follow the same design principles and coding standards
- Well-Documented: Each package includes detailed documentation and examples
- Actively Maintained: Regular updates and improvements from the LeanCode team
Next steps
Installation
Learn how to add Flutter CoreLibrary packages to your project
Core Packages
Explore CQRS, authentication, and other core packages
