搜索插件、代码仓与 APP 分类

插件详情v0.6.0

mdc_web

Material Components Web JavaScript 库的 Dart 包装器。

Web
近 30 天下载
7440
喜欢数
20
Pub 分数
130

安装插件

flutter pub add mdc_web

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

mdc_web 包是 Material Components for Web (MDC-Web) JavaScript 库的 Dart 封装,使开发者能够在 Flutter 网页应用中使用 Material Design 组件。它提供了丰富的一系列预构建 UI 元素,如按钮、卡片和文本字段,这些元素均按照 Google 的 Material Design 指南进行样式设计。通过将 Dart 与 MDC-Web 的 JavaScript 实现相连接,确保了在网页上实现一致且高质量的用户界面,同时最大限度减少自定义样式的需求。该包非常适合希望在 Flutter 的网页生态系统中使用原生 Material Design 组件的团队。

适合场景

  • 在Flutter网页应用中集成Material Design组件
  • 构建响应式、现代的网页界面
  • 通过 Material Design 提升 UI 一致性
  • 在 Dart 中利用现有的 MDC-Web 组件
  • 创建跨平台网络体验

主要特点

  • MDC-Web JavaScript 的 Dart 接口
  • 符合 Material Design 的组件
  • 与 Flutter Web 的无缝集成
  • 支持 Web 特有的 Material 功能
  • 轻量且模块化

适合对象

  • Flutter web 开发人员
  • 使用 Material Design 的团队
  • 需要原生 Web 组件支持的项目
  • 熟悉 MDC-Web 的开发者
  • 需要一致网页 UI 的应用

使用建议

  • 需要 JavaScript 知识以进行高级自定义
  • 仅限Web平台
  • JavaScript 互操作可能带来的性能开销
  • 依赖外部 MDC-Web 库
  • 可能需要手动处理异步初始化

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

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.

所属分类

依赖

依赖清单 2 项

  • js^0.6.1+1
  • meta^1.1.7

源码仓库

使用此插件的项目

暂无相关数据。