flutter create

-template

=plugin

-platforms

=web

If this command displays a message about updating the
pubspec.yaml file, follow the provided instructions.

Dart platform implementations

In many cases, non-web platform implementations only use the
platform-specific implementation language, as shown above. However,
platform implementations can also use platform-specific Dart as well.

Note:
  The examples below only apply to non-web platforms. Web
  plugin implementations are always written in Dart, and use
  pluginClass and fileName for their Dart implementations
  as shown above.

Dart-only platform implementations