Search packages, repositories and app categories

Package detailsv0.6.0

mdc_web

Dart wrapper for the material-components-web javascript library.

Web
30-day downloads
7.4K
Likes
20
Pub points
130

Install package

flutter pub add mdc_web

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

The mdc_web package is a Dart wrapper for the Material Components for Web (MDC-Web) JavaScript library, enabling developers to use Material Design components in Flutter web applications. It provides access to a rich set of pre-built UI elements such as buttons, cards, and text fields, styled according to Google's Material Design guidelines. By bridging Dart with MDC-Web’s JavaScript implementation, it ensures consistent, high-quality web UIs with minimal custom styling. The package is ideal for teams seeking native Material Design components within Flutter’s web ecosystem.

Use cases

  • Integrating Material Design components in Flutter web apps
  • Building responsive, modern web interfaces
  • Enhancing UI consistency with Material Design
  • Leveraging existing MDC-Web components in Dart
  • Creating cross-platform web experiences

Key features

  • Dart interface for MDC-Web JavaScript
  • Material Design-compliant components
  • Seamless integration with Flutter web
  • Supports web-specific Material features
  • Lightweight and modular

Suitable for

  • Flutter web developers
  • Teams using Material Design
  • Projects requiring native web component support
  • Developers familiar with MDC-Web
  • Apps needing consistent web UIs

Considerations

  • Requires JavaScript knowledge for advanced customization
  • Limited to web platform
  • Potential performance overhead from JS interop
  • Dependent on external MDC-Web library
  • May require manual handling of async initialization

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

pub points

mdc_web

Dart wrapper for the material-components-web javascript library.

Usage

In your index.html, include the script just before the main.dart.js script.

<!--
  This exposes the `mdc` global variable required by this package.
  For debugging purposes you can replace the ".min.js" extension with ".js".
-->
<script defer src="packages/mdc_web/material-components-web.min.js"></script>
<script defer src="main.dart.js"></script>

Now in your dart application you can use all of the MDC* classes as described by the Material Design Web component reference.

Documentation

Each class and notable members are documented. Class documentation includes links to corresponding (if available):

Limitations

Only the components themselves were mirrored. Their foundation and adapter classes are currently beyond the scope of this package as they are for deep customization within other web frameworks. However, the base MDCFoundation and MDCComponent classes are included. This limitation should not affect most implementations, but if it does affect you, please let me know.

Categories

Dependencies

Dependency list 2 items

  • js^0.6.1+1
  • meta^1.1.7

Source repository

Projects using this package

No data available yet.