Skip to content
CAI
Software that uses CAICheck a score

BBarisKilic/Numbers

59.1

Adequate · 8 November 2026

1.8k

lines of production code

Dart

with C++, C

7

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Add BuildContext extension for convenient access to localization, theme, and screen metrics

A new BuildContext extension has been introduced to simplify access to common Flutter resources. Users can now directly access localization via the 'l10n' getter, retrieve theme data, text themes, and color schemes, and obtain screen height and width properties, reducing boilerplate code in UI components.

lib/src/core/extensions · high confidence

Added number domain use cases

The number feature now exposes domain use cases for retrieving a specific number and generating a random number. These new classes, GetNumberUseCase and GetRandomNumberUseCase, act as intermediaries that delegate requests to the NumberRepository, and are exported via a consolidated usecases barrel file for easier consumption by the application layer.

lib/src/features/number/domain/usecases · high confidence

Initial support for Windows desktop and web platforms

The application now includes the necessary scaffolding to run on Windows desktop and web browsers. For Windows, this adds the CMake build configuration, the Win32 window runner with high-DPI support, and the entry point to host the Flutter view. For web, this adds the HTML entry point and PWA manifest, enabling the app to be served and installed as a progressive web app.

web, windows · high confidence

Introduce Number feature page with numpad interface

The Number feature now includes a dedicated presentation page that provides a user interface for number input. This page displays a custom app bar, a text input field, an information container, and a grid-based numpad for entering digits. The view is wrapped in a BlocProvider to manage state via the NumberCubit, and it utilizes localized app titles and theme-aware styling for the app bar icon.

lib/src/features/number/presentation/pages · high confidence

Introduce NumberRepositoryImpl for number data operations

The application now includes a concrete implementation of the number repository, NumberRepositoryImpl, located in the data layer. This class handles fetching specific numbers and generating random numbers by delegating to the underlying NumbersService. It wraps the service responses in a DataState pattern, returning DataSuccess for valid results or DataFailure with detailed error information when exceptions occur, thereby centralizing error handling for number-related data retrieval.

lib/src/features/number/data/repositories · high confidence

Introduce centralized app routing configuration

Added a new \AppRoute\ class in the config layer that defines the application's navigation structure using GoRouter. This configuration establishes the route hierarchy, mapping the number page as the root and nesting the settings page within it, effectively centralizing the app's navigation logic.

lib/src/config/routes · high confidence

Introduce configurable light and dark theme support

The application now supports switching between light and dark visual themes. This change introduces a new theme configuration layer in \lib/src/config/themes\ containing an \AppTheme\ interface, an \AvailableTheme\ enum (with \light\ and \dark\ options), and concrete implementations (\LightAppTheme\ and \DarkAppTheme\). These implementations define specific \ThemeData\ settings, including colors, typography, and component styles, allowing the app to render distinct visual appearances based on the selected theme.

lib/src/config/themes · high confidence

Introduce core DataState and ErrorDetails resource models

The core layer now includes a new \DataState\ sealed class to represent operation outcomes, distinguishing between \DataSuccess\ (carrying the result data) and \DataFailure\ (carrying \ErrorDetails\). The \ErrorDetails\ class provides a structured container for error information, specifically storing the error type, message, and stack trace. These models, generated using Freezed, are exported via the \resources.dart\ barrel file to standardize how data and errors are handled throughout the application.

lib/src/core/resources · high confidence

Introduced NumberRepository interface for number data access

Added a new abstract interface class, NumberRepository, within the number feature's domain layer. This interface defines the contract for retrieving specific numbers via GetNumberParams and fetching random numbers, returning results wrapped in a DataState. A corresponding barrel file (repositories.dart) was created to export this interface, establishing the foundation for number data operations in the application.

lib/src/features/number/domain/repositories · high confidence

Introduces HTTP-based number retrieval service

The application now includes a concrete implementation for fetching number data via HTTP using the Dio client. This change adds a new \DioNumbersService\ that communicates with a remote API to retrieve specific numbers and random numbers, replacing or supplementing previous data sources. It also introduces a dedicated \NumbersService\ interface and associated exception classes (\GetNumberException\, \GetRandomNumberException\) to handle API errors and network failures gracefully within the number feature.

lib/src/features/number/data/datasources · high confidence

Introduces centralized design constants and generated asset references

The application now provides a unified constants layer for core design tokens and resource paths. This includes the new AppPadding class, which offers a comprehensive set of predefined padding values (from 4.0 to 52.0) and helper methods for EdgeInsets, as well as the IconSize class defining standard icon dimensions. Additionally, generated files for assets (images) and fonts are introduced via FlutterGen, providing type-safe access to SVG icons and font families, while dedicated classes for URL endpoints and navigation paths are established.

lib/src/core/constants · high confidence

Introduction of AppCubit for theme management

The application now uses a dedicated AppCubit to manage the app's theme state. This component initializes the theme from shared preferences on startup and allows users to update the theme (light or dark) via the UI, persisting the selection immediately. The state is handled by a new AppState class using the Freezed package for immutable state management.

lib/src/app/presentation/cubit · high confidence

Introduction of CustomAppBar widget package

A new Flutter package has been added to provide a reusable CustomAppBar widget. This component displays a custom SVG icon on the left and a text title, both of which are configurable via parameters for color, size, and spacing. The app bar includes a bottom divider and does not imply a leading navigation button, allowing for a tailored header appearance in the application.

_packages/custom\_app\bar · high confidence

Introduction of a structured params layer for theme and number operations

A new core params layer has been introduced to standardize how data is passed between layers. This includes a base \Params\ class and specific implementations: \GetThemeParams\ and \SaveThemeParams\ for managing theme keys and values, and \GetNumberParams\ for handling number requests. These classes replace ad-hoc parameter passing with a consistent, immutable structure, improving type safety and clarity for theme and number-related use cases.

lib/src/core/params · high confidence

Introduction of the app layer barrel file

A new app layer entry point (lib/src/app/app.dart) has been added to the project. This file acts as a barrel file, re-exporting the data, domain, and presentation modules to simplify imports for consumers of the application layer.

lib/src/app · high confidence

Introduction of the core UseCase interface

A new abstract interface class \UseCase\<T, P\>\ has been added to the core layer, defining a standard contract for use cases with a generic return type and parameters. This establishes the foundational structure for business logic execution within the application's architecture.

lib/src/core/usecases · high confidence

New NumberCubit for number information retrieval

The number feature now includes a dedicated presentation layer with a NumberCubit and its associated state model (NumberState). This component manages the lifecycle for fetching details about a specific number or generating a random number, exposing states for initial, loading, loaded (with info), and error conditions. It relies on injected use cases (GetNumberUseCase and GetRandomNumberUseCase) to handle the business logic, and the presentation module now exports this cubit alongside the number page.

lib/src/features/number/presentation/cubit · high confidence

New SharpToggleSwitch component with configurable styling

The sharp\_toggle\_switch package now includes a new SharpToggleSwitch widget that renders a toggle switch with sharp (non-rounded) edges. Users can configure the switch's appearance using primary and secondary colors, set the height and width, define the initial position (left or right), and provide custom labels for the left and right states. The component triggers a callback when the toggle position changes.

_packages/sharp\_toggle\switch · high confidence

New core module exports consolidated

A new core library entry point (lib/src/core/core.dart) has been introduced to centralize and export key sub-modules, including constants, extensions, localization (l10n), parameters, resources, and usecases. This change provides a single import path for accessing these foundational components, simplifying dependency management for other parts of the application.

lib/src/core · high confidence

Architecture

Introduce feature-based data layer for theme persistence

The application's data access logic has been restructured into a feature-oriented architecture under \lib/src/app/data\. This change introduces a dedicated theme data layer that separates concerns into a \ThemeService\ interface (implemented via \SharedPrefThemeService\ for local storage using \shared\_preferences\) and a \ThemeRepositoryImpl\. The repository wraps the service calls, translating service-level exceptions into a standardized \DataState\ result (success or failure with error details), providing a consistent contract for consuming code to handle theme retrieval and saving operations.

lib/src/app/data · high confidence

Restructured domain layer with feature-based organization

The domain layer has been reorganized into a feature-based structure, introducing dedicated export files for repositories and use cases. This change establishes a clear separation of concerns by defining the ThemeRepository interface and its corresponding GetThemeUseCase and SaveThemeUseCase implementations, making it easier to locate and manage domain logic related to theme management.

lib/src/app/domain · high confidence

Behavioural changes

Android build environment upgraded and app branding configured

The Android build system has been upgraded to Gradle 8.4, requiring a compatible Java development environment for building the app. Additionally, the app's visual identity has been established by adding adaptive launcher icons and a branded splash screen image (ic\_launch\_image) for the main, development, staging, and release builds, while the app label is now dynamically configured via a build variable.

android · high confidence

App widget now provides AppCubit and configures localization

The root App widget has been updated to wrap the application in a BlocProvider for AppCubit, ensuring the app state is available throughout the widget tree. Additionally, the MaterialApp configuration now explicitly includes AppLocalizations delegates and supported locales, enabling proper internationalization support for the user interface.

lib/src/app/presentation/widgets · high confidence

Config layer exposes routes and themes

The configuration module now explicitly exports the application route definitions and the theme definitions, making these resources available to other parts of the application through the central config entry point.

lib/src/config · high confidence

Introduce NumberDto data model with Freezed serialization

The Number feature's data layer now includes a structured data transfer object (NumberDto) for handling number-related data. This model uses the Freezed package to provide immutable data structures, automatic copy-with functionality, and JSON serialization/deserialization via the 'info' string field. This change replaces previous ad-hoc data handling with a standardized, type-safe model for the Number feature.

lib/src/features/number/data/models · high confidence

Introduce immutable Number entity with Freezed

The Number domain entity is now implemented as an immutable class using the Freezed code-generation library. This change replaces the previous implementation with a value-type that provides automatic equality checks, hashing, and a copy-with pattern, ensuring that instances of Number (containing an info string) are safe to use in reactive UIs and state management without accidental mutation.

lib/src/features/number/domain/entities · high confidence

Introduces feature-barrel exports for the Number feature

The Number feature now exposes consolidated entry points via new barrel files. The root \number.dart\ aggregates the data, domain, and presentation layers, while each layer provides its own barrel (\data.dart\, \domain.dart\, \presentation.dart\) to export its internal components (such as datasources, models, entities, use cases, cubits, and widgets). This simplifies imports for consumers of the feature by allowing a single import path to access the full feature API.

(repo-wide) · high confidence

Refactored number feature UI into modular widgets with localization support

The number feature's presentation layer has been restructured into distinct, reusable widgets (InfoContainer, NumberTextFormField, NumpadGridView, NumpadNumberButton, and NumpadActionButton) that are now part of the main NumberPage. This change introduces support for localized strings via \context.l10n\ (e.g., 'searchANumber', 'numpadClear') instead of static constants, and updates the UI to use the app's theme for colors and text styles. The numpad grid layout is now explicitly defined with staggered grid tiles, and the input field is configured for right-to-left (RTL) text direction.

lib/src/features/number/presentation/widgets · high confidence

Relocated and regenerated localization layer

The localization infrastructure has been moved to lib/src/core/l10n and regenerated to use current Flutter internationalization standards. This update introduces the AppLocalizations delegate and English translations (app\_en.arb) for core UI strings, including the app title, settings options, theme choices, and numpad controls, ensuring consistent text display across the application.

lib/src/core/l10n · high confidence

Replaced Flutter starter template with structured app bootstrap and dependency injection

The application has moved from the default Flutter counter template to a structured architecture featuring a dedicated bootstrap process. This new entry point initializes the app with a BLoC observer, enforces portrait orientation, and configures a service locator (GetIt) to inject dependencies such as theme services, repositories, and use cases. This change establishes the foundational wiring for the app's features, replacing the previous single-file implementation with a modular setup.

lib · high confidence

Settings screen now uses localized strings and a theme toggle

The Settings feature has been refactored to replace static text constants with localized strings via AppLocalizations, ensuring the UI respects the user's language preference. The settings page now displays a list of options (Theme, Rate Us, Contact Us, Terms, Privacy) and includes a new Theme selector that allows users to switch between Light and Dark modes using a toggle switch, which updates the AppCubit state.

lib/src/features/settings · high confidence

Updated Dart analysis configuration and project metadata

The project's static analysis rules have been switched from the default Flutter lints to the Very Good Analysis package, with specific exclusions added for generated code files (such as \.freezed.dart\ and \.g.dart\) and disabled lints for \public\_member\_api\_docs\ and \avoid\_catches\_without\_on\_clauses\. Additionally, the \.gitignore\ has been expanded to cover more Android, iOS, and VS Code artifacts, and the \.metadata\ file has been updated to reflect a new Flutter stable revision.

(repo-wide) · high confidence

iOS project upgraded to Xcode 14.3 with CocoaPods integration and multi-environment support

The iOS project has been upgraded to Xcode 14.3 (objectVersion 54), raising the minimum supported iOS version to 11.0. CocoaPods integration is now fully configured, including the Pods workspace reference, framework embedding build phases, and xcconfig files for development, staging, and production environments. The app bundle now supports dynamic naming via the $(FLAVOR\_APP\_NAME) variable and includes localization for English and Spanish, along with support for indirect input events.

ios · high confidence

Test coverage

Added test helper for localized app pumping; Added unit tests for NumberRepositoryImpl; Added unit tests for domain use cases; Removed default Flutter widget smoke test.

Dependencies

Major dependency upgrades and Android build system migration

The project has upgraded core dependencies to newer major versions, including go\_router to 17.5.0, bloc to 9.2.1, dio to 5.11.0, and freezed to 4.0.0-dev.3, alongside updates to build\_runner, json\_serializable, and very\_good\_analysis. The Android build configuration has been migrated to the new Gradle plugin management DSL (settings.gradle and app/build.gradle), introducing application namespaces, product flavors (production, staging, development), and release signing configurations. Additionally, the iOS build environment was initialized with a new Podfile and lockfile, and the app now includes custom fonts and assets managed by flutter\_gen.

(dependencies) · high confidence

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 60 → 59 (-1.0)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.

Lenses

  • Code Health 99 → 99 (+0.0)
  • Architecture 93 → 93 (+0.0)
  • Maturity 52 → 52 (+0.0)
  • Readiness 45 → 45 (+0.0)
  • Security 85 → 77 (-7.6)
  • Domain Modelling 100 → 100 (+0.0)
  • Performance 100 → 100 (+0.0)

New (1)

  • Documentation: no build, run or usage example (README.md)

Changes since last survey

  • 1 commits — 1 feature/other, 0 fixes

By area

  • (repo) — 1 commit

Notable commits

  • change: build(deps): bump shared_preferences from 2.5.5 to 2.5.6 (#267)

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

BBarisKilic/Numbers was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 8 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 3f3677315fc7d052e8119a6fd53c14b24ce7989d — the exact code this score is about.
  • Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.3+preprod-45ab2cab63de.