Skip to content

Commit a56960e

Browse files
docs: replace flutter packages get with flutter pub get (#4377)
Co-authored-by: Felix Angelov <[email protected]>
1 parent 441673d commit a56960e

File tree

13 files changed

+19
-48
lines changed

13 files changed

+19
-48
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ track of the issue.
2323
Before creating a pull request please:
2424

2525
1. Fork the repository and create your branch from `master`.
26-
1. Install all dependencies (`flutter packages get` or `pub get`).
26+
1. Install all dependencies (`flutter pub get`).
2727
1. Squash your commits and ensure you have a meaningful commit message.
2828
1. If you’ve fixed a bug or added code that should be tested, add tests!
2929
Pull Requests without 100% test coverage will not be approved.

docs/src/components/tutorials/flutter-counter/FlutterPackagesGetSnippet.astro renamed to docs/src/components/tutorials/FlutterPubGetSnippet.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import { Code } from '@astrojs/starlight/components';
33
44
const code = `
5-
flutter packages get
5+
flutter pub get
66
`;
77
---
88

docs/src/components/tutorials/flutter-firebase-login/FlutterPackagesGetSnippet.astro

Lines changed: 0 additions & 9 deletions
This file was deleted.

docs/src/components/tutorials/flutter-login/FlutterPackagesGetSnippet.astro

Lines changed: 0 additions & 9 deletions
This file was deleted.

docs/src/components/tutorials/github-search/FlutterPackagesGetSnippet.astro

Lines changed: 0 additions & 9 deletions
This file was deleted.

docs/src/content/docs/tutorials/flutter-counter.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ sidebar:
77

88
import RemoteCode from '~/components/tutorials/RemoteCode.astro';
99
import FlutterCreateSnippet from '~/components/tutorials/flutter-counter/FlutterCreateSnippet.astro';
10-
import FlutterPackagesGetSnippet from '~/components/tutorials/flutter-counter/FlutterPackagesGetSnippet.astro';
10+
import FlutterPubGetSnippet from '~/components/tutorials/FlutterPubGetSnippet.astro';
1111

1212
![beginner](https://img.shields.io/badge/level-beginner-green.svg)
1313

@@ -38,7 +38,7 @@ We can then go ahead and replace the contents of `pubspec.yaml` with
3838

3939
and then install all of our dependencies
4040

41-
<FlutterPackagesGetSnippet />
41+
<FlutterPubGetSnippet />
4242

4343
## Project Structure
4444

docs/src/content/docs/tutorials/flutter-firebase-login.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ sidebar:
77

88
import RemoteCode from '~/components/tutorials/RemoteCode.astro';
99
import FlutterCreateSnippet from '~/components/tutorials/flutter-firebase-login/FlutterCreateSnippet.astro';
10-
import FlutterPackagesGetSnippet from '~/components/tutorials/flutter-firebase-login/FlutterPackagesGetSnippet.astro';
10+
import FlutterPubGetSnippet from '~/components/tutorials/FlutterPubGetSnippet.astro';
1111

1212
![advanced](https://img.shields.io/badge/level-advanced-red.svg)
1313

@@ -50,7 +50,7 @@ We'll start by creating `packages/authentication_repository` and a `pubspec.yaml
5050

5151
Next, we can install the dependencies by running:
5252

53-
<FlutterPackagesGetSnippet />
53+
<FlutterPubGetSnippet />
5454

5555
in the `authentication_repository` directory.
5656

@@ -123,7 +123,7 @@ Notice that we are specifying an assets directory for all of our applications lo
123123

124124
Then install all of the dependencies:
125125

126-
<FlutterPackagesGetSnippet />
126+
<FlutterPubGetSnippet />
127127

128128
:::note
129129
We are depending on the `authentication_repository` package via path which will allow us to iterate quickly while still maintaining a clear separation.

docs/src/content/docs/tutorials/flutter-login.mdx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ sidebar:
77

88
import RemoteCode from '~/components/tutorials/RemoteCode.astro';
99
import FlutterCreateSnippet from '~/components/tutorials/flutter-login/FlutterCreateSnippet.astro';
10-
import FlutterPackagesGetSnippet from '~/components/tutorials/flutter-login/FlutterPackagesGetSnippet.astro';
10+
import FlutterPubGetSnippet from '~/components/tutorials/FlutterPubGetSnippet.astro';
1111

1212
![intermediate](https://img.shields.io/badge/level-intermediate-orange.svg)
1313

@@ -32,7 +32,7 @@ We'll start off by creating a brand new Flutter project
3232

3333
Next, we can install all of our dependencies
3434

35-
<FlutterPackagesGetSnippet />
35+
<FlutterPubGetSnippet />
3636

3737
## Authentication Repository
3838

@@ -158,9 +158,7 @@ Let's start by updating the generated `pubspec.yaml` at the root of our project:
158158

159159
We can install the dependencies by running:
160160

161-
```sh
162-
flutter packages get
163-
```
161+
<FlutterPubGetSnippet />
164162

165163
## Authentication Bloc
166164

docs/src/content/docs/tutorials/flutter-timer.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ We can then replace the contents of pubspec.yaml with:
5050
We'll be using the [flutter_bloc](https://pub.dev/packages/flutter_bloc) and [equatable](https://pub.dev/packages/equatable) packages in this app.
5151
:::
5252

53-
Next, run `flutter packages get` to install all the dependencies.
53+
Next, run `flutter pub get` to install all the dependencies.
5454

5555
## Project Structure
5656

docs/src/content/docs/tutorials/flutter-weather.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ Inside the packages directory, run the following command:
316316

317317
<FlutterCreateRepositorySnippet />
318318

319-
We will use the same packages as in the `open_meteo_api` package including the `open_meteo_api` package from the last step. Update your `pubspec.yaml` and run `flutter packages get`.
319+
We will use the same packages as in the `open_meteo_api` package including the `open_meteo_api` package from the last step. Update your `pubspec.yaml` and run `flutter pub get`.
320320

321321
:::note
322322
We're using a `path` to specify the location of the `open_meteo_api` which allows us to treat it just like an external package from `pub.dev`.

docs/src/content/docs/tutorials/github-search.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import RemoteCode from '~/components/tutorials/RemoteCode.astro';
99
import SetupSnippet from '~/components/tutorials/github-search/SetupSnippet.astro';
1010
import DartPubGetSnippet from '~/components/tutorials/github-search/DartPubGetSnippet.astro';
1111
import FlutterCreateSnippet from '~/components/tutorials/github-search/FlutterCreateSnippet.astro';
12-
import FlutterPackagesGetSnippet from '~/components/tutorials/github-search/FlutterPackagesGetSnippet.astro';
12+
import FlutterPubGetSnippet from '~/components/tutorials/FlutterPubGetSnippet.astro';
1313
import StagehandSnippet from '~/components/tutorials/github-search/StagehandSnippet.astro';
1414
import ActivateStagehandSnippet from '~/components/tutorials/github-search/ActivateStagehandSnippet.astro';
1515

@@ -253,7 +253,7 @@ We are including our newly created `common_github_search` library as a dependenc
253253

254254
Now, we need to install the dependencies.
255255

256-
<FlutterPackagesGetSnippet />
256+
<FlutterPubGetSnippet />
257257

258258
That's it for project setup. Since the `common_github_search` package contains our data layer as well as our business logic layer, all we need to build is the presentation layer.
259259

docs/src/content/docs/zh-cn/tutorials/flutter-counter.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ sidebar:
77

88
import RemoteCode from '~/components/tutorials/RemoteCode.astro';
99
import FlutterCreateSnippet from '~/components/tutorials/flutter-counter/FlutterCreateSnippet.astro';
10-
import FlutterPackagesGetSnippet from '~/components/tutorials/flutter-counter/FlutterPackagesGetSnippet.astro';
10+
import FlutterPubGetSnippet from '~/components/tutorials/FlutterPubGetSnippet.astro';
1111

1212
![初级](https://img.shields.io/badge/level-beginner-green.svg)
1313

@@ -38,7 +38,7 @@ import FlutterPackagesGetSnippet from '~/components/tutorials/flutter-counter/Fl
3838

3939
然后安装所有的依赖
4040

41-
<FlutterPackagesGetSnippet />
41+
<FlutterPubGetSnippet />
4242

4343
## 项目结构
4444

examples/github_search/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Open this project in your editor of choice (VSCode is recommended).
1919
cd common_github_search
2020

2121
# install dependencies
22-
pub get
22+
dart pub get
2323

2424
# change directories back out to the root directory
2525
cd ../
@@ -32,7 +32,7 @@ Open this project in your editor of choice (VSCode is recommended).
3232
cd flutter_github_search
3333

3434
# install dependencies
35-
flutter packages get
35+
flutter pub get
3636

3737
# change directories back out to the root directory
3838
cd ../
@@ -45,7 +45,7 @@ Open this project in your editor of choice (VSCode is recommended).
4545
cd angular_github_search
4646

4747
# install dependencies
48-
pub get
48+
dart pub get
4949

5050
# change directories into flutter_github_search
5151
cd ../

0 commit comments

Comments
 (0)