当前位置:网站首页>[shutter] how to use shutter packages and plug-ins

[shutter] how to use shutter packages and plug-ins

2022-06-24 00:54:00 51CTO


How to use Flutter Packages and plug ins

Take the color plug-in as an example

  1. Go to the website  ​https://pub.dev/​
    【Flutter】 How to use Flutter Packages and plug ins _flutter
  2. Click the plug-in to enter
    【Flutter】 How to use Flutter Packages and plug ins _flutter_02
  3. stay ​​Readme​​​ The detailed description and usage of the plug-in can be viewed in the directory ,​​Installing​​​ Under the directory is the introduction method of the plug-in
    【Flutter】 How to use Flutter Packages and plug ins _flutter_03
  4. according to ​​Installing​​ The introduction method of plug-ins under the directory , stay flutter Change directory found pubspec.yaml file open , stay dependencis Add a copy of the plug-in version under , then pub get,

You can also run commands

      
      
$ flutter pub add flutter_color_plugin
  • 1.

【Flutter】 How to use Flutter Packages and plug ins _flutter_04

How To Use

  1. Introduce dependencies
      
      
import 'package:flutter_color_plugin/flutter_color_plugin.dart';
  • 1.
  1. We go back to Readme The directory can see the usage , Have a try , success !
    【Flutter】 How to use Flutter Packages and plug ins _flutter_05


原网站

版权声明
本文为[51CTO]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/175/202206240033120765.html