pactus-gui-widgetbook

Widget Book for Pactus GUI

Welcome to the Widget Book for Pactus GUI! This repository serves as a comprehensive library of reusable widgets, meticulously designed for the Pactus GUI—a graphical interface tailored to interact with the Pactus blockchain.


Key Features at a Glance


Why Use This Repository?

This repository bridges the gap between design and implementation, ensuring:


Quick Access to the Widget Book

Online Access

For an online preview of the Widget Book, click here: Widget Book Online Access

Run Locally

Follow these steps to set up the Widget Book on your local machine:

  1. Clone the repository:
    git clone https://github.com/username/pactus-gui-widgetbook.git
    
  2. Navigate to the project directory:
    cd pactus-gui-widgetbook
    
  3. Install dependencies:
    flutter pub get
    
  4. Start the Widget Book:
    flutter run
    
  5. Explore components using the navigation panel.

Managing Themes and Colors

The Widget Book supports both light and dark themes, providing a seamless experience across modes. The theme definitions, including all color palettes, accent colors, and typography settings, are located in:

This central file defines all theme-related properties for both light and dark modes. You can easily toggle between these themes in the interface to preview different visual styles.

Customization

To create a new theme, simply duplicate these files and adjust the styles according to your needs.


Multi-Language Support

The Widget Book offers support for multiple languages, enabling users to test the widgets in different linguistic settings. Currently, the application supports three languages:

Users can easily switch between these languages within the interface to preview how the widgets will appear in different locales. This functionality ensures that the components are fully adaptable to different language requirements and can be tested for accurate rendering of text, alignment, and other language-specific details.

Localization Implementation

The Widget Book uses the l10n (Localization) package for handling language switching and translations. The necessary language files are set up to handle the different locales and manage text translations for the application.

To switch between languages:

  1. Choose your preferred language from the settings.
  2. The interface and widget output will dynamically update to reflect the selected language.

This makes it easy to test how components behave with different languages and ensures that your app will be accessible to a wider audience, regardless of their language preferences.


System Requirements and Dependencies

Compatibility

Dependencies

This project utilizes the following packages:

To install all dependencies, run:

flutter pub get

Using and Integrating Components

Running the Widget Book

  1. Clone the repository and navigate to its directory.
    git clone <repository-url>
    
  2. Install dependencies:
    flutter pub get
    
  3. Run the Widget Book:
    flutter run
    

Integrating Components

To integrate a widget into the main Pactus GUI:

  1. Import the component:
    import 'package:pactus_gui_widgetbook/components/component_name.dart';
    
  2. Use it in your widget tree as required.

Contribution Guidelines

We welcome contributions to enhance this repository! To contribute:

For detailed guidelines, see the CONTRIBUTING.md file.


Looking Ahead

Future plans include:

Feel free to reach out to the maintainers with questions or suggestions!