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. 🐱‍👤

Libraries

app_config
blocs/app_manager
blocs/bloc_connectivity
blocs/bloc_loading
blocs/bloc_main_menu_drawer
blocs/bloc_navigator
blocs/bloc_onboarding
blocs/bloc_responsive
blocs/bloc_secondary_menu_drawer
blocs/bloc_session
blocs/bloc_theme
blocs/bloc_user_notifications
consts/app_constants
consts/enum_screen_size
fake_providers/fake_connectivity_provider
fake_providers/fake_internet_provider
fake_providers/fake_session_provider
jocaaguraarchetype
navigator/custom_page
navigator/my_app_route_delegate
navigator/page_manager
navigator/route_information_parser
providers/app_manager_provider
providers/provider_connectivity
providers/provider_internet
providers/provider_session
providers/provider_theme
services/service_connectivity_plus
services/service_session_plus
services/service_theme
ui/jocaagura_app
ui/page_builder
ui/pages/loading_page
ui/pages/my_demo_home_page
ui/pages/onboarding_page
ui/pages/page_404_widget
ui/pages/test_page_builder_page
ui/widgets/column_blueprint_widget
ui/widgets/columns_blueprint_widget
ui/widgets/drawer_option_widget
ui/widgets/forms/custom_autocomplete_input_widget
ui/widgets/gutter_blueprint_widget
ui/widgets/list_tile_exit_drawer_widget
ui/widgets/margin_blueprint_widget
ui/widgets/movil_secondary_menu_widget
ui/widgets/movil_secondary_option_widget
ui/widgets/my_app_button_widget
ui/widgets/my_snack_bar_widget
ui/widgets/page_with_secondary_menu_widget
ui/widgets/responsive_1x1_widget
ui/widgets/responsive_1x2_widget
ui/widgets/responsive_1x3_widget
ui/widgets/responsive_generator_widget
ui/widgets/responsive_size_widget
ui/widgets/secondary_option_widget
ui/widgets/work_area_widget
utils/lab_color