dawo 0.0.78

  • Readme
  • Changelog
  • Example
  • Installing
  • 56

dawo 0.0.78 #



Minor update to be dart2 compatible. Dawo is beginner Dart programmers project to learn Dart by developing a glorious package.

  • Complicated and copious spectrum of classes, functions and methods sets creator and user to situation where must take challenging effort to manage and exploit all the features. Here is plenty of room for imagination and ideas. For beginner programmes this is one way to simulate real-world development stress.
  • Latest code in GitHub: https://github.com/heiklap/dawo
  • Read: /doc/hist_versions.txt in gitHub to see full changes to this, and coming versions.
  • Blog: http://dawopack.blogspot.fi/search/label/dawo
  • Dependencies: Dawo is using my other package: dawolang: 0.0.1, for word recognition in connector.

Usage #

// Mission Class has wide access to data, since they have instances of
// Chore classes inside them, in choresL : List<CommmonChore>   
// Example files here rolls only once, without loops, and output their data in console.
// To run dawoApp in rumba demands two imports:
import 'package:dawo/rumba.dart';
import 'package:dawo/dawo_app.dart';
///  Instance of dawoApp is already created inside package.
dawoApp.name = 'Play-rumba:dawoApp';
dawoApp.motto = 'By: dawo_example: dawoApp rolls missioms');
//  or using init:
dawoApp.init(':dawpApp:daily:bundle:', 'By: :daily:bundle:test:');

var rumba = new Rumba();

// This returns in addition a StringBuffer, that is not used here.
// Example apps presents output-data on windows console in flow, or in two kind of boxes. 

Packages shape #

Purpose and direction of this package: do one clearly restricted thing and do it well.
Not commercial program; using promos, demos to imitate realWorld functionality.
Extra functionality is done by plugins that connect to other packages.

Brainstorming #

Get people together, let they present ideas, collect best ideas to libraries and group them meaningfully. Start building first new classes, but keep your mind open for intuitive solutions.

Practise to use Dawo by finding it's properties in editor, and think their importance in app.

Versions #

First dawo version was kind of artistic mess, as a consequence of long-time brainstorming. Dawo 0.0.1 shows starter programmers confusion, and records ways and steps out of this mess to clarity and understanding. Latest code in GitHub: https://github.com/heiklap/dawo

0.0.1 demonstrates how data is messy, when it is not inside classes. But you have direct instant access to every piece of it. Check for pollution of public namespace!!

0.0.3 Was for building first control-flow structure (Rumba.dance) to use Class-data inside app. Theme: Present different Mission ( = Client / customer) data and small, elementary work-flow. Chores ( 7 chores by default in every Mission). dawo_example.dart gives 14 screen-full data output.

0.0.4 Version Theme: Statistics, output, variation, versatility, documentation in doc-folder. dawo_example.dart gives 11 -36 screen-full data output.

0.0.5 High level connections between objects, placard, glb, commonOp and states.
0.0.6 box_serve presentation and corporate.
0.0.7 Connector and #say language, scout class and join.

0.0.75 Mission act Map. Instance of dawoApp is now created inside app. 0.0.78 Updated to be dart2 compatible.

Files; #

code_snippets, learn / copy-paste stuff: #

  • aldente_func : Simple functions, including some logical errors. Can you spot errors?!
  • bat_loop : Control flow structure samples.
  • learn_stream_sync : Examples of simple Streams. So. async stuff.

app files #

  • alpha : Structuring base classes. These two libraries do not depend other dawo files.

  • beta : Develop common properties, that other libraries should depend on.

  • dawo.dart : main file, exports : dawo_src.dart.

  • dawo_app : DawoApp class, handles Missions and keeps out-put-buffers in Map.

  • dawo_src : File created by stagehand plugin app.

  • mill : Plan: processing commands orderly, all they in row, by given priorities.

  • rumba.dart : Rumba classes .dance method runs here dawo's control-flow (once)

  • shower.dart : presentations on console, mostly box-shaped. src/box_serve.dart makes it better!

  • tools : Helper tools, sleep, stamps, lists aso.Helper functions for cl (command line)and screen output.

  • mis/missions : Chunk of command-processing between app and chore. Caring Chores. Missions keep and process data ( #clay) of their favorite area.

  • mis/chore : Start of bigger "job" / "chore" for real-world-work. Imitating functionality of other, bigger, same kind of library.

  • mis/effort.dart : Human activities, chores sub, main user-activity and presentation.

  • mis/equipment.dart : Controlling material resources for Mission and Chore.

  • mis/camp : Scout class has connected objects stuff.

  • corp-folder has corporate, affair, resolve and store classes.

  • corp/connector.dart Connecting ( as #client's) app - mission - chore together, mediating them. Seeking deep, inner connections of objects.

  • clay-folder has data

  • (? dawlib_coll : Resources. Examples and hacking material of Dart collections. Missing / todo)

  • dawo_dev : Classes and data, that help in developing this package.

  • src/box_serve gives frames for box_shaped cl outputs.

  • src/glb keeps global variables.

Creating Dawo variables in new file:

// play with them in IDE:
dawoApp.   //  dot notation gives you hint of classes properties.
var mission = new Mission('#name','#state');  //  #state  ? :)

var ch = new Chore('#name','info');
// play with them:
///  connector is in very early state
var connector = new Connector('name','info');

// Using Dawo in your web app: (Dawo do not include HTML-code)

Add to your pubspec.yaml:
  dawo: 0.0.7
  browser: ^0.10.0
  dart_to_js_script_rewriter: ^1.0.1
//  your main.dart
import 'dart:html';
import 'package:dawo/dawo.dart';
import 'package:dawo/rumba.dart';
import 'package:dawo/dawo_app.dart';    
main() {
  //  Create or init classes as above. Or copy code from: Usage:
  dawoApp.init(Pplay-rumba:dawoApp', 'By: dawo_example: dawoApp rolls missioms');
  //  var dawoApp = new DawoApp('Play-rumba:dawoApp', 'By: dawo_example: dawoApp rolls missioms');
  var rumba = new Rumba();
// Run code in browser and check console output: Ctrl-Shift-i 
// Or make html templates that catch output to text fields / elements.

About variable names and Classes in Dawo #

Play in IDE editor with alphabet: a..z to see, what variables are available. See how common namespace might become polluted with unnecessary stuff, and try to find a way, to organize them/ your variables to meaningful classes.

Like: goals, teams, temps morn, night, day dev, make, init

Test objects in code_snippets-folder / learn... -section. These files might be best, when copy-pasted and studied in computer.

Joker.., aldente...  bat...

sleep(), start..()  

ride....()   roll(....) 
// Watch: init.. build.. roll.. show.. done method-cycle.

Features and bugs #

Please file feature requests and bugs at the issue tracker.

Changelog #

0.0.75 #

  • Chore and Mission modification.

0.0.7 #

  • Connector - scout.join

0.0.6 #

  • Box_serve console presentation.

0.0.5 #

  • Effort, diagonal and schedule console output.

0.0.4 #

  • Console output of mission, chore, dev; in box-form.

0.0.3 #

  • Rumba.dance() method rolls mission-chore data.

0.0.2 #

  • Classes are ready but no client data or roll-all.

0.0.1 #

  • Elementary messy data, waiting for pruning and classification.


// Copyright (c) 2017, Heikki K Lappalainen. All rights reserved. Use of this source code
// is governed by a BSD-style license that can be found in the LICENSE file.
///  *  dawo_example   dawo version   0.0.7. - 18.12.2017
///  *  dawo_example creates 28 screens of console output data presentation.
///  * Find:  :con: :connector: :opCom:  :corporate:

import 'package:dawo/dawo.dart';

///  watch difference, when importing dawo/dawo_src.dart
///  dawo_src only #imports all dawo files except dawo.dart
///  dawo.dart exports: export 'package:dawo/dawo_src.dart';


import 'package:dawo/alpha.dart';
import 'package:dawo/beta.dart';
import 'package:dawo/dawo_app.dart';
import 'package:dawo/shower.dart';
import 'package:dawo/rumba.dart';
import 'package:dawo/tools.dart';

import 'package:dawo/mis/camp.dart';
import 'package:dawo/mis/chore.dart';
import 'package:dawo/mis/missions.dart';

import 'package:dawo/corp/bind.dart';
import 'package:dawo/corp/connector.dart';
import 'package:dawo/dev/dawo_dev.dart';
import 'package:dawo/src/glb.dart';
import 'package:dawo/src/box_serve.dart';

//  Unused package is marked with grey, and #warning.
//  import 'package:dawo/mill.dart';

//  You can use any name for classes, that you create:
//  var da = new DawoApp('exampleApp', 'Testing in dawo_example');

/// Mill class is planned to be method runner / scheduler of dawo.
//  var mill = new Mill();

//  Example, how extra instance of mission is created:
//  var missionX = new Mission('Mission-class', 'example:dawo_example');

//  Made by Google Stagehand automatically, when creating a new package.
//  This serves as an example of class, and user can develop it further.
var awesome = new Awesome();
//  When you try code below, you can see 6 properties of awesome class.
//  awesome.

//  Used once here to run method roll()
///  2. parameter must be class with name and say properties
var ch = new BlanketChore('ChoreInDawoExample','myMusicMission', 'Test-Chore');

//  create classes, that do not already have an instance inside dawo::
//  Instance is not created here beginning from 12-2017  0.0.7+
//  var dawoApp = new DawoApp(':play-rumba-test:dawoApp',
//    'By: dawo_example.dart: dawoApp rolls missions');
var rumba = new Rumba();

///  Data fields:
///  Information of #user for :con:  :opCom: and :corporate:
Map<String, String> placardM = {
  'actor': 'D-example',
  'sender': 'Dawo example',
  'receiver': 'D-ex-loops',
  'command': 'D-ex-cmd:',
  'msg': 'D-ex-msg:',

///  Local variables for this presentation.
bool _pB = true; //  Boolean value used to control printing.
String dexS = ':d:ex:'; //  Prefix for print messages and easy find.
int dexC = 0; //  counter for activities in this example.
String connectorMsg = ':ORDER of :OUTER process is :ANY KIND ';

///  For 0.0.6, main function is 17.11.2017 separated to small functions.
///  In dawo package there is no main-function. Only in example files.
///  Every dart program starts it's execution from main method.
main() {
  dawoApp.init(':dawo_example:','Testing in dawo_example' );

  devBox(':d:ex:main:', ['* header *', '* footer *'], [glb.keyWords, glb.keyWordsSmall], 28);
  devBox('By:dev:versions:',['* header *', '* footer *'],  [tl.mapToFineList(dev.later, 75, 20) ,tl.mapToFineList(dev.version008 , 75, 20)], 24);
  devBox('By:dev:versions:',['* header *', '* footer *'],  [tl.mapToFineList(dev.plugins, 75, 20) ,tl.mapToFineList(dev.version0075 , 75, 20)], 24);

  var sw = new Stopwatch()..start();
  DateTime start = new DateTime.now();

  ///  Call function that adds #actor and #count to this String and prints it.
  exInfo('==>>==>>==   dawo_example    ==>>==>>==');

  print(':glb:print:states:  set to false. only :buf: used');
  print('-- Change print status: glb.setGlbPrint(true or false) ------');

  exInfo('==>>==>>==   dawo_example  awesome: ${awesome.isAwesome}');

  ///  All connector activity is marked with: :connector: in output.
  //  exInfo('==>>==>>==   dawo_example calling :connector:    ==>>==>>==');
  //  Later:  connectorOp(dexS); //  function below.

  // This method also returns a StringBuffer, that is not used here.
  rumba.dance(dawoApp); //  15 screens of output.

  exampleMethodsPlay(); //  Add more 13 screens output.
  //  extra   dawoApp.box(dexS); //  2. time here-

  exInfo('    ==<<==<<==    dawo_example done    ==<<==<<==');

  print("Executing dawo_example.dart took: ${sw.elapsed}us");
  DateTime stop = new DateTime.now();
  print(' \nStopTime::  $stop');
  print('FlowServe calls::   $flowI ');
  print('.......... :glb:boxServe:buf: length and names  ................');
  for (var z in glb.boxServeBuffers.keys) {
  //  glb.boxServeBuffers.keys.forEach(print);

  //  testing infoBox in boxServe
  //  infoBox(Map<String,String> inM, int _k, _v, [int margin]){
  //  using:  dawoApp.say.
  /// NOTE  all Map to List rows, here 8, are printed.
  List<String> infoOne = boxServe.infoBox(dawoApp.say, 8, 57, 9);
 //   packDawoMission.say
  print('----  second info box  ----');
  List<String> infoTwo = boxServe.infoBox(packDawoMission.say, 8, 40, 19);
  //  TODO  out.done

  ///  Nice-looking name- size- info of default buffers.
  Map<String,String> _xM = new Map();
  _xM = outBuffersInfoMap(':dawoExample', 'Not used parameeter');
  print('....... printing outBufMap map  ....................');
  _xM.forEach((k, v) {print('$k $v');   });
  print(tl.mapToFineList(_xM, 20, 20));
  print('....... printing outBufMap map  done ....................');

  print('....... printing boxServe logM print  ....................');
  // unused::  Map<String, List<String>> _logM = {};
  for (var x in boxServe.logM.keys) {

  print('....... printing boxServe logM print  done ....................');
  dawoApp.box(dexS); //  3. time here-

  //print buffer: print(glb.boxServeBuffers[':dawoHist:dailyAction:friday:6']);
  print('---- main done   ');
} //  -----  end of main.

///  Dawo history play and box
void boxHistTemplate() {
  print('---------- :boxServe:dawoLogo: :temporary:hack:   ----------------');
  DawoHist dawoHist = new DawoHist();
  dawoHist.build('_emblemString', '_masterString');

  ///  TODO  hosTo handle:  in boxServe there are:  title and footer.
  boxServe.init(36, 175, '_');

  ///  Table name and glb.buffer name
      ':dHst:dAc:tmpl:', ':dawoHist:template:');

  ///  BaseStruct fields:  boxLayoutDap(BaseStruct _model, String _rubric)
  boxLayoutDap(dawoHist, ':dawoHist:template:');
  boxServe.show(':dHst:', 'print', 3);

///  To allow easy-run of these 8 separated activities.
void exampleMethodsPlay() {

  ///  Calling Class scheduleBox method, in dawo/shower.dart
  ///  Nice screen of collected data in boxed for,


  exInfo('==>>==>>==   calling choreEffort---------- dawo sets, goals:');
  exInfo('    ==<<==<<==    calling choreEffort done  dawo sets, goals:');

  //  deprecated  schedulePlay();

///  Form  message row to easy-find and print it if: _pB
void exInfo(String msg) {
  String dexCS = dexC.toString();
  //  String: -exInfo appended here, as an example. It is 16 times in output.
  String _msg = ' -exInfo $dexS $dexCS $msg';
  if (_pB) print(_msg);

///  Place where :corporate:  :opCom:  and :connector: play together.
void connectorOp(String caller) {
  connector.join('DawoExample', placardM, connectorMsg, ':Dawo:example:');

//  TODO  #IDEA: for courier carrier, to do something really nice.
//  :courier: marks this message carriage functions activity.
void courierMessage() => print('d-ex-exmpl: * *  :courier: Mission!. * * ');

///  This class instance has been created in dawo, and it is usable here.
void exampleMission() {
  exInfo('    ==<<==<<==    roll mission op/ init -open - roll: -close==<<==');
  exInfo('\n ==>>==>>==   rolling :packDawo:Mission:    ==>>==>>==');

  ///  Eventually opRoll handles all these others.
  scout.init(1, 'empty parameter');
  scout.open(2, 'second empty parameter');
  //  calls void function that prints a String.
  //  In front of String is line feed, and another String with interpolation.
  exInfo('\n $dexS-:dw:ex: -----------  rolling :courier:Message: ------ ');
  scout.roll(3, courierMessage);
  exInfo('  - -:dw:ex: -----  rolling :courier:mission: opFunc  done ---\n');
  scout.close(); //  No  parameters.

  exInfo('    ==<<==<<==    rolling :packDawo:Mission: done    ==<<==<<==');
  //  When you print row below, you can see all methods.
  //  packDawoMission.

void lonelySampleChore() {
  exInfo('\n ==>>==>>==   rolling lonelySampleChore    ==>>==>>==');

  ///  Sample lonely Chore, that is created here
  ///  TODO  This chore do not have master field set.
  ch.master = 'MyMusicMission';
  exInfo('    ==<<==<<==    rolling lonelySampleChore: done    ==<<==<<==');

void sampleDawoBuffers() {
  exInfo('\n ==>>==>>==   rolling sampleDawoBuffers    ==>>==>>==');
  outBuffersPrint('$dexS dawoExample', 'no-prevent-printing');
  exInfo('    ==<<==<<==    rolling sampleDawoBuffers: done    ==<<==<<==');

void sampleJsonData() {
  exInfo('\n ==>>==>>==   rolling sampleJsonData    ==>>==>>==');
  exInfo('==>>==>>==   encoded - decoded    ==>>==>>==');
  exInfo('==>>==>>==   chore > effort > user_json render   ==>>==>>===');
  exInfo('    ==<<==<<==    encoded - decoded   done    ==<<==<<==');
  exInfo('    ==<<==<<==    rolling sampleJsonData: done    ==<<==<<==');

void connectorExampleReport() {
  exInfo('==>>==>>==   calling :connector: report    ==>>==>>==');

  exInfo('    ==<<==<<==    :connector: report done    ==<<==<<==');

///  For to check variables visibility.
void wordPlay() {
  //  Play with variables: watch something from every file
  //  base
  // baseLibMotto

  //  baseStructMotto;

  //  chore
  // choreBuf

  //  dawo
  // dawoBuf

  //  app  3 variables
  // appMap;

  //  dev  17 variables
  //  devBlame;

  //  flow*  2 variables

  //  mill  4 variables

  //  DawoMill

  //  mission
  //  Mission  class

  //  out  15 variables
  //  placard* : 1

  //  toolsActive;

  //  play with classes

  ///  testing dawo
  //  daw... ok

  //  render   //  there are 5 render-functions

  //  No, too much noise.
  //  printBuffers();

///  Empty not used method.
void playDawoSrcDart() {}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  dawo: ^0.0.78

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:dawo/dawo.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Oct 16, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.1
  • pana: 0.12.21


Detected platforms: Flutter, web, other

No platform restriction found in primary library package:dawo/dawo.dart.

Health suggestions

Fix lib/shower.dart. (-1 points)

Analysis of lib/shower.dart reported 2 hints:

line 188 col 12: Use contains instead of indexOf

line 227 col 11: Use contains instead of indexOf

Fix lib/tools.dart. (-1 points)

Analysis of lib/tools.dart reported 2 hints:

line 136 col 11: Use contains instead of indexOf

line 388 col 9: Use contains instead of indexOf

Fix lib/beta.dart. (-0.50 points)

Analysis of lib/beta.dart reported 1 hint:

line 132 col 5: DO use curly braces for all flow control structures.

Fix additional 29 files with analysis or formatting issues. (-7 points)

Additional issues in the following files:

  • lib/clay/clay_roll.dart (1 hint)
  • lib/clay/helsinki_guide.dart (1 hint)
  • lib/clay/learn_dartlang.dart (1 hint)
  • lib/clay/my_music.dart (1 hint)
  • lib/clay/my_time.dart (1 hint)
  • lib/clay/national_parks.dart (1 hint)
  • lib/clay/pack_dawo.dart (1 hint)
  • lib/clay/pack_dawo_json.dart (1 hint)
  • lib/code_snippets/bat_loop.dart (1 hint)
  • lib/code_snippets/learn_stream_sync.dart (1 hint)
  • lib/dawo_app.dart (1 hint)
  • lib/mis/equipment.dart (1 hint)
  • lib/mis/treaty.dart (1 hint)
  • lib/src/box_serve.dart (1 hint)
  • lib/alpha.dart (Run dartfmt to format lib/alpha.dart.)
  • lib/corp/connector.dart (Run dartfmt to format lib/corp/connector.dart.)
  • lib/corp/store.dart (Run dartfmt to format lib/corp/store.dart.)
  • lib/dawo_src.dart (Run dartfmt to format lib/dawo_src.dart.)
  • lib/dev/aide.dart (Run dartfmt to format lib/dev/aide.dart.)
  • lib/dev/dawo_dev.dart (Run dartfmt to format lib/dev/dawo_dev.dart.)
  • lib/dev/dawo_hist.dart (Run dartfmt to format lib/dev/dawo_hist.dart.)
  • lib/dev/dev_notes.dart (Run dartfmt to format lib/dev/dev_notes.dart.)
  • lib/dev/envoy.dart (Run dartfmt to format lib/dev/envoy.dart.)
  • lib/mis/camp.dart (Run dartfmt to format lib/mis/camp.dart.)
  • lib/mis/chore.dart (Run dartfmt to format lib/mis/chore.dart.)
  • lib/mis/missions.dart (Run dartfmt to format lib/mis/missions.dart.)
  • lib/rumba.dart (Run dartfmt to format lib/rumba.dart.)
  • lib/src/dev_box.dart (Run dartfmt to format lib/src/dev_box.dart.)
  • lib/src/glb.dart (Run dartfmt to format lib/src/glb.dart.)

Maintenance issues and suggestions

Support latest dependencies. (-10 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency (intl).

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.

Package is getting outdated. (-2.19 points)

The package was last published 53 weeks ago.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
dawolang ^0.0.2 0.0.2
intl ^0.15.2 0.15.8 0.16.0
Transitive dependencies
path 1.6.4
Dev dependencies
build_runner any
build_web_compilers any