jocaaguraarchetype 2.0.2 copy "jocaaguraarchetype: ^2.0.2" to clipboard
jocaaguraarchetype: ^2.0.2 copied to clipboard

Paquete base para inicializar rápidamente proyectos Flutter usando Jocaagura Clean Architecture. ⚠️ Este paquete podría ser deprecado. Se recomienda usar directamente jocaagura_domain para una mejor m [...]

JocaaguraArchetype #

👋 ¡Hola! Antes de que sigas, te contamos que estamos migrando las responsabilidades principales de este paquete a jocaagura_domain.
Este arquetipo seguirá disponible por ahora, pero puede ser deprecado más adelante.
Te invitamos a construir directamente desde jocaagura_domain, donde ahora están los blocs, contratos y herramientas compartidas.

👋 Hey there! Just a heads-up — most of the functionality from this archetype has been moved to jocaagura_domain.
This package may be deprecated in the near future.
For a cleaner setup and fewer dependencies, we recommend building directly with jocaagura_domain, which now includes the base blocs, services, and UI contracts.

⚠️ Important Notice:
This package is no longer maintained as a standalone solution.
We strongly recommend migrating to jocaagura_domain,
which now includes all shared infrastructure contracts and cross-cutting logic.

Centralizing the effort in jocaagura_domain helps reduce duplication, simplifies maintenance, and avoids future package conflicts.

This package is designed to ensure that the cross-functional features of applications developed by Jocaagura are addressed at the start of each project. It provides a uniform and robust foundation for development teams, facilitating the integration and scaling of new features and functionalities. Coverage Author 🐱‍👤

Important #

  • Waiting for flutter to fix deprecated value, red, green and blue in Color class.

Documentation Index #

LabColor #

Description #

LabColor is a utility class that provides methods to convert colors between different color spaces, specifically RGB and Lab (CIELAB). These methods are useful for precise color manipulations needed in custom themes, data visualization, and more.

Parameters #

  • lightness: The brightness of the color.
  • a: Component a in the CIELAB color space.
  • b: Component b in the CIELAB color space.

Example in Dart Code #

Color colorRGB = Color.fromARGB(255, 255, 0, 0); // Red color
List<double> labColor = LabColor.colorToLab(colorRGB);
LabColor lab = LabColor(labColor[0], labColor[1], labColor[2]);
LabColor adjustedLab = lab.withLightness(50.0);

ProviderTheme #

Description #

ProviderTheme acts as an intermediary between theme services and UI interfaces that consume these themes. It simplifies the application of custom themes and color manipulations at the app level, ensuring a seamless and consistent visual design.

Example in Dart Code #

ColorScheme colorScheme = ColorScheme.light(primary: Color(0xFF00FF00));
TextTheme textTheme = TextTheme(bodyText1: TextStyle(color: Color(0xFF000000)));
ProviderTheme providerTheme = ProviderTheme(ServiceTheme());
ThemeData customTheme = providerTheme.customThemeFromColorScheme(colorScheme, textTheme);

ServiceTheme #

Description #

ServiceTheme provides a range of methods for creating and manipulating themes and colors. It includes functions to convert RGB colors to MaterialColor, darken and lighten colors, and generate custom themes from color schemes. This is fundamental for managing the visual appearance of applications.

Example in Dart Code #

ServiceTheme serviceTheme = ServiceTheme();
MaterialColor materialColor = serviceTheme.materialColorFromRGB(255, 0, 0); // Red color

BlocTheme #

Description #

BlocTheme is a BLoC (Business Logic Component) module that manages the theme state within the application. It enables dynamic theme updates, allowing the UI to adapt to user preferences or specific conditions, such as switching between light and dark modes.

Example in Dart Code #

void main() {
  ColorScheme lightScheme = ColorScheme.light();
  ColorScheme darkScheme = ColorScheme.dark();
  TextTheme textTheme = TextTheme(bodyText1: TextStyle(color: Colors.white));

  bool isDarkMode = true; // User preference
  ThemeData themeToUpdate = isDarkMode
      ? blocTheme.providerTheme.serviceTheme.customThemeFromColorScheme(darkScheme, textTheme, true)
      : blocTheme.providerTheme.serviceTheme.customThemeFromColorScheme(lightScheme, textTheme, false);

  blocTheme._themeDataController.value = themeToUpdate;
}

BlocLoading #

Description #

BlocLoading is a BLoC component that manages loading messages within the application. It provides a centralized way to display and update loading status messages, which is useful for informing users about ongoing operations.

Example in Dart Code #

void main() async {
  await blocLoading.loadingMsgWithFuture(
      "Loading data...",
      () async {
        await Future.delayed(Duration(seconds: 2)); // Simulated data loading operation
      });
}

BlocResponsive #

Description #

BlocResponsive is a crucial component for managing adaptive UI in an application. This BLoC facilitates handling screen sizes and component visibility, ensuring the app adjusts optimally to different resolutions and devices.

Example in Dart Code #

Widget responsiveWidget = AspectRatio(
  aspectRatio: 16 / 9,
  child: Container(
    width: blocResponsive.widthByColumns(4),
    decoration: BoxDecoration(color: Colors.blue),
  ),
);

This README has been restructured and translated to provide a comprehensive yet concise guide to the JocaaguraArchetype package for its audience on pub.dev. If additional sections or examples are required, they can be added based on specific needs. 🐱‍👤

2
likes
140
points
127
downloads

Publisher

verified publisherjocaagura.com

Weekly Downloads

Paquete base para inicializar rápidamente proyectos Flutter usando Jocaagura Clean Architecture. ⚠️ Este paquete podría ser deprecado. Se recomienda usar directamente jocaagura_domain para una mejor mantenibilidad.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, jocaagura_domain

More

Packages that depend on jocaaguraarchetype