multi_select_tree 1.0.1

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 48

angular-dart-material-tree

demo

Prerequisites

Dart packages

  • Polymer
  • Polymer elements
dependencies :
  polymer: 1.0.0-rc.19
  polymer_elements: 1.0.0-rc.10

Installing

Update you pubspec.yaml file to include the above dependencies .

Copy the material-tree/multi-select-tree folder into your lib .

Include the material-tree/multi-select-tree in the imports .

import 'package:angular_dart_data_grid/src/material-tree/material-tree.dart';

Add the CustomMaterialTreeComponent in the directives for material_tree

  directives: const [materialDirectives, CustomMaterialTreeComponent],

Add the MultiSelectTreeComponent in the directives for multi_select_tree

  directives: const [materialDirectives, MultiSelectTreeComponent],

Get the dependecies and run pub build/serve.

Using it in the HTML.

Inputs :

`data : List<>`
      -- Data to be displayed in the tree. Expecting a list here.
   Example:
  treeRootNodes=
  [
    {
     	name: "parent1" ,
      children:[
       	{
     		name : "child1"
     		children : []

     		},
     		{
     		name : "child2"
     		children : []

     		},
     		{
     		name : "child3"
     		children : []
     		}]
     },
     {
     		name: "parent2",
     		children : [
     			{
     				name : "child5"
     				children : []
     			},
     			{
     				name : "child6"
     				children : []
     			}
     			{
     				name : "child7"
     				children : [
     					{
     						name : "child8"
     						children : []

     					},
     					{
     						name : "child9"
     						children : []

     					},
     					{
     						name : "child10"
     						children : []
     					}]
     		    }]
     }
     ]

Events :

  	nodeSelected : AsyncAction<<Node> -- emits the node that is clicked.

Material Tree Usage :

<custom-material-tree (nodeSelected)="nodeSelected($event)" [data]="treeRootNodes" >

	</custom-material-tree>

We can write any function in order to handle the emitted event. I wrote a dummy function nodeSelected which will get the selected node as an arguement automcatically.

The above example will show the checkboxes for each of the row, add/delete button and columns as per the column definitions.

Multi-Select Tree Usage :

     <multi-select-tree (selectedNodes)="nodeSelected($event)" [data]="treeRootNodes" >
	   </multi-select-tree>

Inputs :

same as material-tree.

Events :

  	selectedNodes : AsyncAction<<List<Node>> -- emits the selected  nodes.

Changelog

##1.0.1

  • Added proper docs. ##1.0.0

  • Initial version, created by Stagehand

1. Depend on it

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


dependencies:
  multi_select_tree: "^1.0.1"

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 packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:multi_select_tree/multi_select_tree.dart';
        
Version Uploaded Documentation Archive
1.0.1 Aug 28, 2017 Go to the documentation of multi_select_tree 1.0.1 Download multi_select_tree 1.0.1 archive
1.0.0 Aug 28, 2017 Go to the documentation of multi_select_tree 1.0.0 Download multi_select_tree 1.0.0 archive

Analysis

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

  • Dart: 2.0.0-dev.46.0
  • pana: 0.10.6

Scores

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

Platforms

Detected platforms: Flutter, web, other

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

Suggestions

  • The description is too short.

    Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 11 hints.

    Run dartfmt to format lib/multi_select_tree.dart.

    Run dartfmt to format lib/src/multi_select_tree/model/multi_select_tree_model.dart.

    Similar analysis of the following files failed:

    • lib/src/multi_select_tree/multi_select_tree_node/multi_select_tree_node.dart (hint)
    • lib/src/multi_select_tree/service/tree_service.dart (hint)
  • Maintain an example.

    Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use multi_select_tree.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.23.0 <2.0.0
angular ^4.0.0-alpha+3 4.0.0+2 5.0.0-alpha+9
angular_components ^0.6.0-alpha+2 0.6.0 0.8.0
angular_router ^1.0.0 1.0.2 2.0.0-alpha+9
polymer ^1.0.0-rc.19 1.0.0-rc.19
polymer_elements ^1.0.0-rc.10 1.0.0-rc.10
Transitive dependencies
analyzer 0.29.11 0.31.1
angular_compiler 0.3.0+1 0.4.0-alpha+9
angular_forms 1.0.0 2.0.0-alpha+1
args 0.13.7 1.4.1
async 2.0.6
barback 0.15.2+15
build 0.11.2 0.12.1
build_barback 0.4.0+2 0.5.0+3
charcode 1.1.1
cli_util 0.0.1+2 0.1.2+1
code_builder 1.0.4 3.0.3
code_transformers 0.5.1+3 0.5.1+4
collection 1.14.9
convert 2.0.1
crypto 2.0.2+1
csslib 0.14.1
dart_style 0.2.16 1.0.10
fixnum 0.10.7
func 1.0.0
glob 1.1.5
html 0.13.3
initialize 0.6.2+7
intl 0.15.4
isolate 1.1.0 2.0.0
js 0.6.1
logging 0.11.3+1
matcher 0.12.1+4
meta 1.1.2
observable 0.20.4+3 0.22.1
package_config 1.0.3
path 1.5.1
perf_api 0.1.0
plugin 0.2.0+2
polymer_interop 1.0.0-rc.10
pool 1.3.4
quiver 0.25.0 0.29.0+1
quiver_hashcode 1.0.0
reflectable 1.0.3 2.0.0
source_gen 0.7.5+1 0.8.0
source_maps 0.10.4
source_span 1.4.0
stack_trace 1.9.2
string_scanner 1.0.2
tuple 1.0.1
typed_data 1.1.5
utf 0.9.0+4
uuid 0.5.3
watcher 0.9.7+7
web_components 0.12.5
when 0.2.0
which 0.1.3
yaml 2.1.13
Dev dependencies
angular_test ^1.0.0-beta+2
browser ^0.10.0
dart_to_js_script_rewriter ^1.0.1
test ^0.12.0