rikulo_uxl 0.5.7

  • README.md
  • Installing
  • Versions
  • 23

#Rikulo UXL

Rikulo UXL (User-interface eXtensible language) is a markup language for describing applications' user interfaces. UXL is a simple variant of XML. It allows you to define user interfaces in a similar manner to authoring HTML and XML pages. It also allows you to use the Model-View-Controller (MVC) pattern to develop applications.

Rikulo UXL is distributed under the Apache 2.0 License.


Add this to your pubspec.yaml (or create it):


Then run the Pub Package Manager (comes with the Dart SDK):

pub install


First, you have to prepare UXL files defining the user interface. Next, there are two ways to compile it into dart files: automatic building with Dart Editor or manual compiling.

###Build with Dart Editor

To compile your UXL files automatically, you just need to add a build.dart file in the root directory of your project, with the following content:

import 'package:rikulo_uxl/uc.dart' show build;

void main(List<String> arguments) {

With this build.dart script, whenever your UXL is modified, it will be re-compiled.

###Compile Manually

To compile a UXL file manually, run uc (UXL compiler) to compile it into the dart file with command line interface as follows:

dart bin/uc.dart your-uxl-file(s)

A dart file is generated for each UXL file you gave.

###UXL and Its Generated Dart File

A UXL file can define one or multiple templates. For example, here is a UXL file defining a template called ScrollViewTemplate:

<Template name="ScrollViewTemplate" args="rows: 30, cols: 30">
  <ScrollView class="scroll-view"
  profile="location: center center; width: 80%; height: 80%">
    <Apply forEach="r = 0; r < rows; ++r">
      <Apply forEach="c = 0; c < cols; ++c">
        <View style="border: 1px solid #553; background-color: ${CSS.color(250 - r * 4, 250 - c * 4, 200)}"
            left="${r * 50 + 2}" top="${c * 50 + 2}"
            width="${46}" height="${46}">

A template is actually compiled to a Dart function with the name specified in UXL:

List<View> ScrollViewTemplate({parent, rows: 30, cols: 30}) {
  List<View> _vcr_ = new List();
  var _this_;

  final _v0_ = _this_ = new ScrollView()
  return _vcr_;

For a complete dart file, please refer to here.

Having you UXL compiled, you can instantiate views based on the template whatever you want:

void main() {
  final View mainView = new View()..addToDocument();
  ScrollViewTemplate(parent: mainView);

##Pros and Cons


  • The user interface can be defined easily in a similar manner to HTML and XML pages.
  • MVC/MVP and data-binding for improving the separation of view, model and controller.
  • Performance is as good as expressing in Dart.
  • Easy to debug since the generated Dart code is easy to understand.


  • It has to be compiled to Dart in advance.

##Notes to Contributors

###Create Addons

Rikulo is easy to extend. The simplest way to enhance Rikulo is to create a new repository and add your own great widgets and libraries to it.

###Fork Rikulo UXL

If you'd like to contribute back to the core, you can fork this repository and send us a pull request, when it is ready.

Please be aware that one of Rikulo's design goals is to keep the sphere of API as neat and consistency as possible. Strong enhancement always demands greater consensus.

If you are new to Git or GitHub, please read this guide first.

Use this package as a library

1. Depend on it

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

  rikulo_uxl: "^0.5.7"

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter packages get

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

3. Import it

Now in your Dart code, you can use:

      import 'package:rikulo_uxl/uc.dart';

      import 'package:rikulo_uxl/uxl.dart';
Version Uploaded Documentation Archive
0.5.7 Oct 29, 2013 Go to the documentation of rikulo_uxl 0.5.7 Download rikulo_uxl 0.5.7 archive
0.5.6 Aug 27, 2013 Go to the documentation of rikulo_uxl 0.5.6 Download rikulo_uxl 0.5.6 archive
0.5.5 Jul 18, 2013 Go to the documentation of rikulo_uxl 0.5.5 Download rikulo_uxl 0.5.5 archive
0.5.4 Jul 13, 2013 Go to the documentation of rikulo_uxl 0.5.4 Download rikulo_uxl 0.5.4 archive
0.5.3+5 May 2, 2013 Go to the documentation of rikulo_uxl 0.5.3+5 Download rikulo_uxl 0.5.3+5 archive
0.5.3+4 May 2, 2013 Go to the documentation of rikulo_uxl 0.5.3+4 Download rikulo_uxl 0.5.3+4 archive
0.5.3+3 Apr 19, 2013 Go to the documentation of rikulo_uxl 0.5.3+3 Download rikulo_uxl 0.5.3+3 archive
0.5.3+2 Apr 12, 2013 Go to the documentation of rikulo_uxl 0.5.3+2 Download rikulo_uxl 0.5.3+2 archive
0.5.3+1 Mar 26, 2013 Go to the documentation of rikulo_uxl 0.5.3+1 Download rikulo_uxl 0.5.3+1 archive
0.5.3 Mar 20, 2013 Go to the documentation of rikulo_uxl 0.5.3 Download rikulo_uxl 0.5.3 archive

All 17 versions...


We analyzed this package on Jun 19, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.63.0
  • pana: 0.11.3


Describes how popular the package is relative to other packages. [more]
0 / 100
Code health derived from static analysis. [more]
76 / 100
Reflects how tidy and up-to-date the package is. [more]
0 / 100
Overall score:
Weighted score of the above. [more]
Learn more about scoring.


Detected platforms: Flutter, other

Platform components identified in package: io.


  • Maintain CHANGELOG.md.

    Changelog entries help clients to follow the progress in your code.

  • Use constrained dependencies.

    The pubspec.yaml contains 4 dependencies without version constraints. Specify version ranges for the following dependencies: args, html5plus, path, rikulo_ui.

  • Package is too old.

    The package was released more than two years ago.

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 2 errors 18 hints.

    Strong-mode analysis of lib/src/uc/Compiler.dart failed with the following error:

    line: 103 col: 32
    The argument type 'LinkedHashMap<dynamic, String>' can't be assigned to the parameter type 'Map<String, String>'.

    Run dartfmt to format lib/src/uc/Util.dart.

    Similar analysis of the following files failed:

    • lib/src/uc/build.dart (hint)
    • lib/src/uc/main.dart (hint)
    • lib/uxl.dart (hint)
  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

  • The description is too long.

    Search engines will display only the first part of the description. Try to keep it under 180 characters.

  • Maintain an example.

    None of the files in your example/ directory matches a known example patterns. Common file name patterns include: main.dart, example.dart or you could also use rikulo_uxl.dart.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=0.8.7
args any 1.4.3
html5plus any 0.9.1+1
path any 1.6.1
rikulo_ui any 0.8.0
Transitive dependencies
browser 0.10.0+3
charcode 1.1.1
logging 0.11.3+1
mime 0.9.6+1
rikulo_commons 2.3.8+1
source_maps 0.9.4 0.10.5
source_span 1.4.0
utf 0.9.0+4