playx 0.1.3 copy "playx: ^0.1.3" to clipboard
playx: ^0.1.3 copied to clipboard

Playx eco system helps with redundant features as it provides many utilities for themes, widgets and more.

Playx #

pub package

Playx eco system helps with redundant features as it provides many utilities for themes, widgets and more.

Features #

  • Prefs : Key value pair storage powered by SharedPreferences.
  • PlayX.runPlayX : WrapsrunApp to inject , init ..etc what ever is necessary for using this package.
  • PlayXAppConfig : Install and setup any dependencies that are required by the app.
  • AppTheme : Easily create and mange app theme with the ability to easily change app theme.
  • playx_widget :Contains custom utility widgets to make development faster like OptimizedScrollView , ImageViewer, AppVersion and more.
  • exports : packages like Get , queen_validators, readable ,playx_theme, package_info_plus , flutter_svg and cached_network_image, lottie , async and sentry to make it easy to update packages from one place. If you have many projects that depend on these packages you will need to update only playx package.

Installation #

In pubspec.yaml add these lines to dependencies

playx: ^0.1.3

Usage #

  1. create an app config class that extends PlayxAppConfig :
class AppConfig extends PlayXAppConfig {  
  @override  
  String get appTitle => "Sourcya App";  
  
  // setup and boot your dependencies here  
  @override  
  Future<void> boot() async {  
  final ApiClient client = ApiClient(dio);  
  Get.put<ApiClient>(client);  
  }  
}
  1. Create theme config to customize your app theme. defaults to:
class XDefaultThemeConfig extends XThemeConfig {
  @override
  List<XTheme> get themes => [
        XTheme(
          id: 'dark',
          nameBuilder: () => 'Dark',
          theme: ThemeData.dark(),
          colorScheme:LightColorScheme(),
        ),
        XTheme(
          id: 'light',
          nameBuilder: () => 'Light',
          theme: ThemeData.light(),
          colorScheme:DarkColorScheme(),
        ),
      ];
}

For more information about how to customize app theme check out playx_theme

  1. in main method call PlayX.runPlayX instead of runApp It will setup any dependencies in app config, initialize app theme and run the app.
void main() async {

  Playx.runPlayx(
    appConfig: AppConfig(),
    themeConfig: ThemeConfig(),
    //If sentry is needed in the project.
    sentryOptions: (options) {
      options.dsn = AppConfig.sentryKey;
    },
    app:PlayXThemeBuilder(
      builder: (xTheme) {
        return GetMaterialApp(
          debugShowCheckedModeBanner: false,
          theme: xTheme.theme,
          title: 'playx',
        );
      },
    ), 
  );
}

See Also: #

playx_core : core package of playx.

Playx_theme :multi theme features for flutter apps from playx eco system

Playx_widget : Contains custom utility widgets to make development faster.

1
likes
0
pub points
49%
popularity

Publisher

verified publisherplayx.sourcya.io

Playx eco system helps with redundant features as it provides many utilities for themes, widgets and more.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

async, fimber, flutter, flutter_readable, playx_theme, playx_widget, queen_validators, sentry_flutter

More

Packages that depend on playx