简体   繁体   English

我想知道在Flutter中使用内网时如何使用pub get和package下载

[英]I am wondering how to use pub get and package download when using the internal network in Flutter

The company currently uses the internal network IP.公司目前使用内网IP。 So I want to know the package download port and url address to use pub get.所以想知道package下载端口和url地址使用pub get。 What IPs and ports must the firewall allow to use package download?防火墙必须允许哪些 IP 和端口才能使用 package 下载?

You can link git repositories in your pubspec.yaml like this:您可以像这样在您的 pubspec.yaml 中链接 git 存储库:

dependencies:
  plugin1:
    git: https://github.com/flutter/plugin1.git

Or you can link a private hosted package like this:或者您可以像这样链接私有托管的 package:

dependencies:
  plugin1:
    hosted:
      name: plugin1
      url: http://your-package-server.com

You can find more examples and a more detailed explanation here您可以在此处找到更多示例和更详细的说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 当我将新的 package 添加到依赖项时,Flutter pub 失败 - Flutter pub get failed when I add new package to dependencies 运行“flutter pub get”时,包托管在哪里? - When running "flutter pub get", where exactly is the package hosted? 如何创建与Flutter一起使用的pub包? - How do I create a pub package that works with Flutter? flutter pub get 不会下载依赖项 - flutter pub get won't download dependency 当我尝试做 flutter pub get 时遇到了这个问题。 如何解决这个问题呢? - I have this problem when I try to do flutter pub get. How to solve this problem? 使用 flutter pub get 时输出详细信息 - output the verbose message when using flutter pub get 如何为 Flutter Web 更新 pub 包 webdev - How to update pub package webdev for flutter web 如何修复这些颤振依赖错误? 使用 pub get 时获取 - How to fix these flutter dependencies error? Getting it while using pub get 何时以及如何使用 GetStorage.init(); 使用 flutter 中的 get_storage package - When and how should I use GetStorage.init(); with the get_storage package in flutter When I am using the provider package in Flutter to load data from an API into a list it repeatedly calls the API, how do I fix it? - When I am using the provider package in Flutter to load data from an API into a list it repeatedly calls the API, how do I fix it?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM