Repository: flutter
Issue: No offline check when performing various Flutter CLI steps
Labels: c: new feature,tool,c: proposal,P2,team-tool,triaged-tool

### Is there an existing issue for this?

- [X] I have searched the [existing issues](https://github.com/flutter/flutter/issues)
- [X] I have read the [guide to filing a bug](https://flutter.dev/docs/resources/bug-reports)

### Use case

Our attempts to onboard Flutter into a major bank conflicts with our regulatory control procedures. We cannot use any applications which will go out to the public Internet - our networks do not allow this. 

Installing Flutter via git repository is a non-starter.

We begin with the Flutter SDK packages [available here](https://docs.flutter.dev/release/archive), and set the developers environment up thus

* PUB_HOSTED_URL set to our internal Pub server
* FLUTTER_STORAGE_BASE_URL set to our internal Google mirror
* Remove the Git origin remote
* Disable telemetry
* Disable analytics

As we do this, the calls to disable telemetry and disable analytics have long network timeouts associated with them before the command concludes.

The runner does not accept --offline or --no-version-check

```shell
/bin/flutter -vv --no-version-check --disable-telemetry
[   +5 ms] executing: sw_vers -productName
[  +30 ms] Exit code 0 from: sw_vers -productName
[        ] macOS
[        ] executing: sw_vers -productVersion
[  +20 ms] Exit code 0 from: sw_vers -productVersion
[        ] 13.6.1
[        ] executing: sw_vers -buildVersion
[  +25 ms] Exit code 0 from: sw_vers -buildVersion
[        ] 22G313
[        ] executing: uname -m
[  +15 ms] Exit code 0 from: uname -m
[        ] arm64
[  +18 ms] executing: sysctl hw.optional.arm64
[  +21 ms] Exit code 0 from: sysctl hw.optional.arm64
[        ] hw.optional.arm64: 1
[  +37 ms] Analytics reporting disabled.
[+75107 ms] Running 0 shutdown hooks
[        ] Shutdown hooks complete
[        ] exiting with code 0
```

### Proposal

> This is an attempt to bring another use case to #129143. That ticket was closed after a discussion, but there isn't a summary of the discussion and the reasoning for the "won't fix" resolution. Can a summary behind the decision be posted on that ticket?

Proposing a global configuration (e.g. `--hermetic`) that we can use to truly prevent Flutter from making network calls. 

Ideally, when `--hermetic` is configured, the following actions take place

* Running `flutter upgrade` or `flutter downgrade` an attempt to upgrade/downgrade will result in a message indicating that external network requests have been disabled (Basically, any Git-related action - including channel switch - supports this message)
* New Flutter version checks do not occur
* Apparently, the delay I am seeing in disabling analytics is caused by this? "If you opt out of analytics, an opt-out event will be sent, and then no further information will be sent by the Flutter tool." - I would obviously not want that to happen if I have globally configured a `--hermetic` flag
* Perhaps the message "Flutter assets will be downloaded from $FLUTTER_STORAGE_BASE_URL. Make sure you trust this source!" could be disabled when the `--hermetic` flag is set. Or maybe, it could be mentioned on the initial Flutter command, and then no longer. It frightens the developers. :)