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.
This repository bridges the gap between design and implementation, ensuring:
For an online preview of the Widget Book, click here: Widget Book Online Access
Follow these steps to set up the Widget Book on your local machine:
git clone https://github.com/username/pactus-gui-widgetbook.git
cd pactus-gui-widgetbook
flutter pub get
flutter run
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:
lib/src/core/theme/app_theme_data.dart
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.
lib/src/core/theme/app_theme_data.dart
under the lightTheme
configuration.lib/src/core/theme/app_theme_data.dart
under the darkTheme
configuration.To create a new theme, simply duplicate these files and adjust the styles according to your needs.
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.
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:
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.
This project utilizes the following packages:
flutter_widgetbook
: Provides the Widget Book environment.provider
: For efficient state management.To install all dependencies, run:
flutter pub get
git clone <repository-url>
flutter pub get
flutter run
To integrate a widget into the main Pactus GUI:
import 'package:pactus_gui_widgetbook/components/component_name.dart';
We welcome contributions to enhance this repository! To contribute:
For detailed guidelines, see the CONTRIBUTING.md file.
Future plans include:
Feel free to reach out to the maintainers with questions or suggestions!