Create form-driven mobile apps on top of BizDoc workflow engine.

Features

  • Authentication: Okta, Entra or DirectortServices.
  • Online messages and notifications.
  • Analysis charts.
  • Dashboard widgets.
  • Capture and attach file from camera.
  • Location sensitive forms.
  • Geo location services.

Getting started

flutter pub add bizdoc

If you are going to access self owned server APIs, install dio.

flutter pub add dio provider

BizDoc mobile app relays on Firebase messaging. To fully take advantage of BizDocApp you'll need to create a Firebase project and provide it's settings to BizDoc.

Usage

Add BizDocApp to main.dart.

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return BizDocApp(
      serverAddress: 'https://bizdoc-server-here',
      authentication: FormIdentity());
  }
}

BizDocApp can be provided with certificate, Firebase settings for communication and title.

Set authentication

Set method according to server configuration.

Provider Usage
Okta Okta.
FormIdentity Username password authentication.
DirectoryServices Windows
Entra Azure Active Directory

Declare components

BizDoc components are widgets which can access app state and services. Flutter supports three types of BizDoc components: form, action and widget.

First, declare a stateful widget.

class MyComponent extends StatefulWidget {
  @override
  _MyComponentState createState() => _MyComponentState();
}
class _MyComponentState extends State<MyComponent> {

}

Register components

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return BizDocApp(
        routes: {'my-component': (context) => MyComponent()
        }),
  }
}

Forms

A form is a component type which offers a user to fill a series of inputs.

Declare model

class MyModel {
  final Map<String, dynamic> _json;
  MyModel(this._json);

  String? get subject => _json['subject'];
  set subject(String? val) => _json['subject'] = val;
  num? get price => _json['price'];
  set price(num? val) => _json['price'] = val;
}

Here we use a getter and setter for each property. You can deserialize json using fromJson() pattern.

Manage state

Access form state using BizDocFormState.

class _MyComponentState extends State<MyComponent> {
  late BizDocFormState _state;
  late MyModel _model;
  @override initState() {
    _state = Provider.of<BizDocFormState>(context, listen: false);
    _model = MyModel(_state.data);
    super.initState();
  }
}

Update state on input change.

    TextFormField(
      keyboardType: TextInputType.text,
      controller: new TextEditingController(text: _model.subject),
      onChanged: (value) {
        _model.subject = value;
        _state.setDirty();
      },
      validator: (value) {
        if (value != null && value != '') _state.setInvalid();
        else if (_model.isValid) _state.setValid();
      },
    ),

Control widgets

Embed BizDoc control in your components to gain simplification of API use.

Name Usage
CombinationPicker Combination input.
CombinationPool Combination input.
SelectTypeField Picker for datatype.
AutocompleteTypeField Autocomplete picker for datatype.
AddressField Autocomplete address input.
DateFormField Date picker
DateRangeField Date range picker

Set GoogleMapsSettings property in BizDocApp.

Integrate APIs

Use extension or singleton to access BizDoc services.

Services available:

Name Usage
DataSource Retrieve BizDoc datatype values.
Geo Geo location services. Set GoogleMapsSettings property in BizDocApp.
Session Current session state.
extension MyModel on Session {
   Future<Iterable<VendorInfo>> vendors(String? name){
      final response = dio.get('/vendors/', queryParameters: {'name': name });
      return response.data.map((e)=> VendorInfo(e));
   }
}

class VendorInfo {
  final Map<String, dynamic> _json;
  VendorInfo(this._json);
  String? get name => _json['name'];
}

Use dio property to send an HTTP request to server /api.

Utilize in widgets.

  let vendors = await dataSource.vendors();

Dashboard widgets

Use BizDocWidgetState to get remote data.

class CubeAnalysisWidget extends StatefulWidget implements IDashboardWidget {
  const CubeAnalysisWidget({Key? key}) : super(key: key);

  @override
  _CubeAnalysisWidgetState createState() => _CubeAnalysisWidgetState();
}

class _CubeAnalysisWidgetState extends State<CubeAnalysisWidget> {
  @override
  Widget build(BuildContext context) {
    return Consumer<BizDocWidgetState>(builder: (context, value, child) {
      if (value.hasData)
      for (var item in value.data!) {
        ...
      }
    })
  }
}

Register component in BizDocApp resolve.

Settings

To fully take advantage of BizDoc app, add messaging and APIs settings.

Push messages

Firebase project FirebaseSettings of BizDocApp main.dart.

Geo location services

Google maps API in GoogleMapsSettings of BizDocApp in main.dart.

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) => BizDocApp(
        firebaseSettings: FirebaseSettings(
            apiKey: '...',
            projectId: '...',
            senderId: '...',
            vapidKey: '...',
            appId: '...'),
        googleMapsSettings: GoogleMapsSettings(apiKey: '...'),
      );
}

Additional information

Getting started development guide, and wiki.

Contact Moding's R&D team on support@moding.com.

Libraries

authenticate/azure_entra
authenticate/base
authenticate/directory_services
authenticate/form_identity
authenticate/okta
bizdoc
bizdoc_app
controls/address
controls/autocomplete
controls/chips_field
controls/combination_picker
controls/combination_pool
controls/date
controls/date_range
controls/input_chips
controls/select
controls/time_form_field
core/app_state
core/configuration
core/control_state
core/dashboard_state
core/extensions
core/flow_action_state
core/form_state
core/hub
core/icon
core/notification
generics/controls/address
generics/controls/checkbox
generics/controls/checklist
generics/controls/chips
generics/controls/date
generics/controls/date_range
generics/controls/file
generics/controls/localized_string
generics/controls/number
generics/controls/options
generics/controls/radio
generics/controls/select
generics/controls/signature
generics/controls/switch
generics/controls/text
generics/controls/textarea
generics/controls/time
generics/controls/yes_no
generics/forms/box
generics/forms/box.metadata
generics/forms/box.model
generics/forms/survey
generics/widgets/analysis
l10n/app_localizations
l10n/app_localizations_en
models/chat
models/contracts
models/cube
models/data
models/log
models/notifications
models/profile
pages/action_dialog
pages/attachments
pages/authorize
pages/browse
pages/comments
pages/compose
pages/contacts
pages/conversation
pages/cube
pages/dashboard
pages/drawer
pages/explore
pages/fields
pages/home
pages/location_map
pages/notifications
pages/server_url
pages/settings
pages/splash
services/accounts
services/chat
services/cube
services/datasource
services/geo
services/mailbox
services/network
services/session