dj
Auto-Generate Dart and Flutter Code while retaining manual user updates to generated code.
Usage
A simple usage example:
import 'package:dj/dj.dart';
void main() {
var outputDir = '..\\lib';
var baseDj = BaseDj(
path: outputDir,
node: DirectoryDj(
name: 'dj_generated',
nodes: [
FileDj(
name: 'hello_world',
codeParts: [
// This import is really not needed in generated file
// Adding this line for demonstration only!
ImportDj(importStr: 'package:io/io.dart'),
FunctionDj(
description: 'Main entry point to this file!',
outputType: VariableType.Void,
name: 'main',
bodyCodeParts: [
FunctionCallDj(
name: 'print',
args: ["'Hellow World!'"],
),
],
),
],
),
],
),
);
// Generating Json for Auto-Generated code
var baseDjMap = baseDj.toJson();
print('Auto-Generated Code:');
print(baseDjMap);
}
Features and bugs
Please file feature requests and bugs at the issue tracker.
Libraries
- dj
- main/base
- main/dj_fc/dj_fc
- main/dj_fc/models/models
- main/dj_fc/models/parameter
- main/dj_fc/models/raw_widget_dj
- main/dj_fc/scripts/dj_converter
- main/dj_fc/scripts/dj_names_map_writer
- main/dj_fc/scripts/process_sdk
- main/dj_fc/scripts/scripts
- main/dj_fc/scripts/utils
- main/dj_fc/scripts/widget_converter
- main/dj_fc/utils/comment_line_checker
- main/dj_fc/utils/commetns_utils
- main/dj_fc/utils/flutter_sdk_widget_processor
- main/dj_fc/utils/get_dj_names_map
- main/dj_fc/utils/utils
- main/dj_fc/utils/white_space_remover
- main/dj_fc/utils/widget_file_processor
- main/dj_io/base_dj_io
- main/dj_io/directory_dj_io
- main/dj_io/dj_io
- main/dj_io/file_dj_io
- main/dj_io/node_dj_io
- main/djs/code_djs/base_widget_dj
- main/djs/code_djs/class
- main/djs/code_djs/code_djs
- main/djs/code_djs/code_part
- main/djs/code_djs/empty_line
- main/djs/code_djs/enum
- main/djs/code_djs/export
- main/djs/code_djs/field
- main/djs/code_djs/function
- main/djs/code_djs/function_call
- main/djs/code_djs/if_else
- main/djs/code_djs/import
- main/djs/code_djs/manual_widget_dj
- main/djs/code_djs/map
- main/djs/code_djs/return
- main/djs/code_djs/single_line
- main/djs/code_djs/variable_declaration
- main/djs/djs
- main/djs/structure_djs/directory
- main/djs/structure_djs/file
- main/djs/structure_djs/node
- main/djs/structure_djs/structure_djs
- main/djs/structure_djs/structure_types
- main/djs/utils/comments
- main/djs/utils/condition
- main/djs/utils/dynamic_parameter_parser
- main/djs/utils/function_args
- main/djs/utils/utils
- main/djs/utils/variable_types
- main/main