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

Features

  • Authentication: Okta, AzureActiveDirectory 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

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());
  }
}

Set authentication

Set method according to server configuration.

ProviderUsage
OktaOkta.
FormIdentityUsername password authentication.
DirectoryServices
AzureActiveDirectory

Declare components

BizDoc components are widgets which can access app state and services. Flutter support two types of BizDoc components: form 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(
        resolve: {'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.

NameUsage
CombinationPickerCombination input.
CombinationPoolCombination input.
SelectFieldPicker for datatype.
AutocompleteFieldAutocomplete picker for datatype.
AddressFieldAutocomplete address input. Set GoogleMapsSettings property in BizDocApp.

Integrate APIs

Use extension or singleton var to access BizDoc services.

Services available:

NameUsage
DataSourceRetrieve BizDoc datatype values.
UsersRetrieve user(s) profile.
GeoGeo location services. Set GoogleMapsSettings property in BizDocApp.
CubeAnalysis backend API.
SessionCurrent session state.
extension MyModel on DataSource {
   Future<Map<String, dynamic>> companies(){
      return map('countries');
   }
   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 team on support@moding.com.

Libraries

aad
accounts
address
address
analysis
app_localizations
app_localizations_en
app_localizations_es
attachments
autocomplete
base
base
bizdoc
bizdoc
bizdoc
bizdoc
bizdoc
bizdoc
bizdoc
bizdoc
bizdoc
box
box.metadata
box.model
browse
chat
chat
checkbox
checklist
comments
compose
contacts
contracts
control.state
conversation
credentials
cube
cube
cube
dashboard
dashboard
data
datasource
date
date_range
directoryservices
drawer
explore
fields
file
geo
home
hub
icon
l10n
localized_string
location
log
mailbox
messages_all
messages_en
network
notification
notifications
notifications
number
okta
options
profile
radio
select
server_url
session
settings
signature
splash
survey
switch
text
textarea
yes_no