ng_modular_admin 1.0.1

Modular Admin for Angular Dart #

View Demo

Overview #

This project is a port of Modular Admin to Angular Dart. Modular Admin is a Bootstrap 4 admin theme written with HTML, monolithic CSS, and some JavaScript. This port focuses on converting monolithic CSS to web components with encapsulated styles and reimplementing the JavaScript logic with AngularDart.

Getting Started #

To use ng_modular_admin in your own AngularDart project, do the following:

  1. Add ng_modular_admin as a dependency in pubspec.yaml (and run pub get).
  2. Create an SCSS stylesheet in your main web directory, e.g. web/theme.scss and put @import "package:ng_modular_admin/src/modular-admin/modular-admin"; at the top of this file.
  3. You can add any customizations you want to the SCSS stylesheet you created in step 2. The stylesheet will be built automatically when you use webdev serve or webdev build.
  4. For any component where you want to use Modular Admin, import package:ng_modular_admin/ng_modular_admin.dart and add modularAdminDirectives to that component's directives.
  5. Look at the Layout demo page to see how to set up the application shell.

You will find more detailed usage information and examples in the demo application.

define hyperion gray

1.0.0 #

  • Upgrade to Dart 2.x
  • Upgrade to Angular 5.x
  • Upgrade to Font Awesome 5.7.2

0.0.4 #

  • Rename from ng2_modular_admin to ng_modular_admin
  • Upgrade to Angular Dart 4.0.0

Use this package as a library

1. Depend on it

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

  ng_modular_admin: ^1.0.1

2. Install it

You can install packages from the command line:

with pub:

$ pub get

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

3. Import it

Now in your Dart code, you can use:

import 'package:ng_modular_admin/ng_modular_admin.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 Sep 20, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.0
  • pana: 0.12.21


Detected platforms: web

Primary library: package:ng_modular_admin/ng_modular_admin.dart with components: html, js.

Health suggestions

Fix lib/src/components/size_spy.dart. (-2.96 points)

Analysis of lib/src/components/size_spy.dart reported 6 hints, including:

line 22 col 5: 'ElementRef' is deprecated and shouldn't be used.

line 25 col 5: 'ElementRef' is deprecated and shouldn't be used.

line 28 col 5: 'ElementRef' is deprecated and shouldn't be used.

line 31 col 5: 'ElementRef' is deprecated and shouldn't be used.

line 34 col 5: 'ElementRef' is deprecated and shouldn't be used.

Fix lib/src/components/app.dart. (-1.49 points)

Analysis of lib/src/components/app.dart reported 3 hints:

line 20 col 57: Use isNotEmpty instead of length

line 29 col 61: Use isNotEmpty instead of length

line 38 col 57: Use isNotEmpty instead of length

Fix lib/validators.dart. (-1.49 points)

Analysis of lib/validators.dart reported 3 hints:

line 33 col 16: Use isNotEmpty instead of length

line 45 col 16: Use isNotEmpty instead of length

line 78 col 16: Use isNotEmpty instead of length

Fix additional 26 files with analysis or formatting issues. (-6 points)

Additional issues in the following files:

  • lib/src/components/button.dart (2 hints)
  • lib/src/components/input_group.dart (2 hints)
  • lib/src/components/pager.dart (2 hints)
  • lib/src/services/document.dart (2 hints)
  • lib/src/components/breadcrumbs.dart (1 hint)
  • lib/src/components/checkbox_group.dart (1 hint)
  • lib/src/components/radio_group.dart (1 hint)
  • lib/src/components/side_nav_menu.dart (1 hint)
  • lib/src/components/button_group.dart (Run dartfmt to format lib/src/components/button_group.dart.)
  • lib/src/components/card.dart (Run dartfmt to format lib/src/components/card.dart.)
  • lib/src/components/content.dart (Run dartfmt to format lib/src/components/content.dart.)
  • lib/src/components/dropdown.dart (Run dartfmt to format lib/src/components/dropdown.dart.)
  • lib/src/components/footer.dart (Run dartfmt to format lib/src/components/footer.dart.)
  • lib/src/components/logo.dart (Run dartfmt to format lib/src/components/logo.dart.)
  • lib/src/components/overlay.dart (Run dartfmt to format lib/src/components/overlay.dart.)
  • lib/src/components/side_nav.dart (Run dartfmt to format lib/src/components/side_nav.dart.)
  • lib/src/components/side_nav_header.dart (Run dartfmt to format lib/src/components/side_nav_header.dart.)
  • lib/src/components/side_nav_item.dart (Run dartfmt to format lib/src/components/side_nav_item.dart.)
  • lib/src/components/side_nav_menu_header.dart (Run dartfmt to format lib/src/components/side_nav_menu_header.dart.)
  • lib/src/components/tag.dart (Run dartfmt to format lib/src/components/tag.dart.)
  • lib/src/components/toast_outlet.dart (Run dartfmt to format lib/src/components/toast_outlet.dart.)
  • lib/src/components/top_nav.dart (Run dartfmt to format lib/src/components/top_nav.dart.)
  • lib/src/framework.dart (Run dartfmt to format lib/src/framework.dart.)
  • lib/src/services/side_nav.dart (Run dartfmt to format lib/src/services/side_nav.dart.)
  • lib/src/services/toast.dart (Run dartfmt to format lib/src/services/toast.dart.)
  • lib/util.dart (Run dartfmt to format lib/util.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 (angular).

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and ng_modular_admin.dart. Packages with multiple examples should provide example/

For more information see the pub package layout conventions.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.2.0 <3.0.0
angular ^5.2.0 5.3.1 6.0.0-alpha+1
angular_forms ^2.1.1 2.1.2 2.1.4
angular_router ^2.0.0-alpha+21 2.0.0-alpha+22 2.0.0-alpha+24
ng_fontawesome ^5.7.2 5.7.2+2
Transitive dependencies
analyzer 0.35.4 0.38.3
angular_ast 0.5.9 0.5.11
angular_compiler 0.4.3 0.4.5
args 1.5.2
async 2.3.0
build 1.2.0
build_config 0.4.1+1
built_collection 4.2.2
built_value 6.7.1
charcode 1.1.2
checked_yaml 1.0.2
code_builder 3.2.0
collection 1.14.12
convert 2.1.1
crypto 2.1.3
csslib 0.14.6+1 0.16.1
dart_style 1.2.4 1.2.10
fixnum 0.10.9
front_end 0.1.14 0.1.25
glob 1.1.7
intl 0.15.8 0.16.0
js 0.6.1+1
json_annotation 3.0.0
kernel 0.3.14 0.3.25
logging 0.11.3+2
matcher 0.12.5
meta 1.1.7
package_config 1.1.0
path 1.6.4
pedantic 1.8.0+1
pub_semver 1.4.2
pubspec_parse 0.1.5
quiver 2.0.5
source_gen 0.9.4+4
source_span 1.5.5
stack_trace 1.9.3
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
watcher 0.9.7+12
yaml 2.2.0
Dev dependencies
build_runner ^1.0.0
build_test ^0.10.2
build_web_compilers ^0.4.0
sass_builder ^2.1.2