aether_core 0.8.0 copy "aether_core: ^0.8.0" to clipboard
aether_core: ^0.8.0 copied to clipboard

Aether Core

Pub release GitHub Release Date

aether_core #

Aether Core for Flutter

Aether Core is a comprehensive application framework designed specifically for Flutter development. It offers a range of features that can help developers streamline their workflow, including a simplified ORM for managing entities, context-less routing based on the popular Getx package, and built-in support for authentication management within the context.

In addition to these features, Aether Core also includes streamlined integration of dialogs and snackbars, making it easy for developers to add these common UI elements to their applications. It also provides seamless integration with the DIO package, allowing developers to easily make REST or GraphQL calls.

Overall, Aether Core is a powerful and flexible framework that can help developers create high-quality Flutter applications with ease. By simplifying many of the common tasks involved in application development, it can help developers save time and focus on building out the core functionality of their applications.  

Settings files #

Create the following 3 files:


Flow logic in sequence:

1. The system will first load the settings.json.
2. If in staging mode, load settings.staging.json and override any existing settings.
3. If in debug mode, load settings.debug.json and override any existing settings.


    "ApiBaseUrl": "",
    "ApiKey": "<Api Key>",
    "ApiConnectTimeoutInSec": 15,
    "GooglePlayURL": "",
    "AppleAppStoreURL": "",
    "HuaweiAppGalleryURL": ""

Building App Service #

Before RunApp, build the AppService via AppBuilder.

final builder = AppBuilder(appName: 'VIQ Community Admin');

// Customize the credential actions
// Extends AppCredential 
class CustomAppCredential extends AppCredential {
builder.useAppCredential( CustomAppCredential() );

// Customize dialog settings
// Extends AppDialog
class CustomAppDialog extends AppDialog {
builder.useAppDialog( CustomAppDialog() );

// Build the app service

Dialog, Snackbar and Progress indicator #

// Dialog{String? title, 
            String? description, 
            String? cancelTitle, 
            Color? cancelTitleColor, 
            String? buttonTitle, 
            Color? buttonTitleColor,  
            bool barrierDismissible = false, 
            DialogPlatform? dialogPlatform})
App.dialog.showConfirm(String question, 
            {String? title, 
             String? buttonTitle, 
             String? cancelButtonTitle})

// Notification
App.dialog.showInfo(String info, {String? title})
App.dialog.showError(dynamic error, {String? title})

// Progress indicator
App.showProgressIndicator({String? status})

Entity #

class Company extends Entity {
  late final Field<DateTime> name = field('name');
  late final Field<DateTime> time = field('time');
  late final Field<int> capacity = field('capacity');
  late final Field<double> kpi = field('kpi');
  late final ListField<Machine> machines = fieldList('machines');
  late final Field<Settings> settings = field('settings');
  late final Field<PlanQuality> planQuality = field('planQuality');

  Company() {
    print('Company constructor');
      bindings: [machines],
      compute: () => machines.fold(0, (p, e) => p! + e.capacity()),
    machines.register(() => Machine());
    settings.register(() => Settings(), auto: true);
    print('End of Company constructor');

class Machine extends Entity {
  late final Field<String> name = field('name');
  late final Field<int> capacity = field('capacity');

class Settings extends Entity {
  late final Field<int> minCapacity =
      field('minCapacity', defaultValue: 10);

class PlanQuality extends Entity {}

API Connect #

Quick REST API Access #

final result = await '/api/login'.api(body:
        timeout: Duration(seconds: 5),
        headers: {"AppToken": request["appToken"]});

By default it will connect via the App.api. You may override it for external api.

final response = await ''
          .api(body: {
            'code': code,
            'client_id': clientID,
            'client_secret': clientSecret,
            'redirect_uri': redirectUri,
            'grant_type': 'authorization_code',
          .external() // Indicate this is an external API

Quick GraphQL API Access #

        .gql([, 'location'.gql(Location().fragment)],
            params: {'id': communityId})
        .then((response) {
          if (response.hasError) {
          if (response.isOk) {