Skip to content

Commit 5bd251e

Browse files
committed
Restructure readme
1 parent a7b9134 commit 5bd251e

File tree

1 file changed

+37
-33
lines changed

1 file changed

+37
-33
lines changed

README.md

Lines changed: 37 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,70 @@
11
# Flutter Wrapper
22

3-
Similar to the gradle wrapper, an executable shell script in the root of you project, `flutterw` which downloads and runs flutter in the correct version for every user.
3+
Similar to the gradle wrapper, an executable shell script in the root of you project, `flutterw` which downloads and runs flutter with the same version, part of your repository, for every user and CI.
44

55
The flutter wrapper will add flutter as a submodule to your project which pins the version allowing you to upgrade flutter for all developers in you project at the same time.
66

77
Read the story on [Medium](https://medium.com/grandcentrix/flutter-wrapper-bind-your-project-to-an-explicit-flutter-release-4062cfe6dcaf)
88

9-
## Get started
9+
## How to use Flutter Wrapper
1010

11-
#### Install wrapper
11+
### Add the Flutter Wrapper to your project
1212

1313
Run this command from the root of your flutter project
1414

15-
```bash
16-
curl -sL https://raw.githubusercontent.com/passsy/flutter_wrapper/master/install.sh | bash -
17-
```
18-
Don't forget to commit your changes afterwards.
15+
> `sh -c "$(curl -fsSL https://raw.githubusercontent.com/passsy/flutter_wrapper/master/install.sh)"`
16+
>
17+
All required files are already added to git. You can commit them now
1918

19+
> `git commit -m "Add flutter wrapper"`
2020
21-
#### Get started with Flutter without adding flutter to your PATH
21+
From now on you should always use `./flutterw` instead of `flutter`
2222

23-
The [Flutter install process](https://flutter.io/setup-macos/#get-sdk) is not perfectly automated. You have to manually download Flutter and add it to your path before you can use the awesome Flutter CLI to create a new project. With the flutter wrapper this becomes easier.
23+
### Update Flutter
2424

25-
```bash
26-
mkdir flutter_wrapper_project && cd "$_"
27-
git init
28-
curl -sL https://raw.githubusercontent.com/passsy/flutter_wrapper/master/install.sh | bash -
29-
./flutterw create .
30-
./flutterw run
31-
```
25+
Flutter Wrapper doesn't require any special command to update Flutter.
26+
Run `./flutterw channel <stable|beta|master>` to change the channel or update to the lastest version of a given channel.
3227

33-
## Maintenance
28+
> `./flutterw channel stable`
3429
35-
#### Update flutter wrapper
30+
The only change you'll see in git is the changed sha1 of the `.flutter` submodule.
31+
You have to commit it to update flutter for all project members.
3632

37-
Run the install command again.
3833

39-
```bash
40-
curl -sL https://raw.githubusercontent.com/passsy/flutter_wrapper/master/install.sh | bash -
41-
```
34+
### Update flutter wrapper
4235

43-
If you want a specific version, use the `-t <tag/branch>` (i.e. `v0.8.0`)
36+
To update the flutter wrapper to the latest version run the install command again:
4437

45-
```bash
46-
curl -sL https://raw.githubusercontent.com/passsy/flutter_wrapper/master/install.sh | bash /dev/stdin -t v0.8.0
47-
```
38+
> `sh -c "$(curl -fsSL https://raw.githubusercontent.com/passsy/flutter_wrapper/master/install.sh)"`
39+
40+
To update the flutter wrapper to a specific verssion, use the `-t <tag/branch>` (i.e. `v0.8.0`)
4841

49-
#### Uninstall flutter wrapper
42+
> `sh -c "curl -fsSL https://raw.githubusercontent.com/passsy/flutter_wrapper/master/install.sh" | bash /dev/stdin -t v1.0.0`
43+
44+
## Advanced Usage
45+
46+
### Uninstall flutter wrapper
5047

5148
Removing submodules is hard, that's why I did the hard work for you.
5249
Simply run this command from the root of your flutter project and the uninstall script will cleanup everything.
5350

54-
Bye :wave:
51+
> `sh -c "$(curl -fsSL https://raw.githubusercontent.com/passsy/flutter_wrapper/master/uninstall.sh)"`
5552
56-
```bash
57-
curl -sL https://raw.githubusercontent.com/passsy/flutter_wrapper/master/uninstall.sh | bash -
58-
```
53+
Bye :wave:
5954

60-
#### Update flutter version
55+
### Get started with Flutter without adding flutter to your PATH
6156

62-
No special command required. Run `./flutterw channel <master|dev|beta>`, afterwards add and commit changed `.flutter` submodule reference.
57+
The [Flutter install process](https://flutter.io/setup-macos/#get-sdk) is not perfectly automated.
58+
You have to manually download Flutter and add it to your path before you can use the awesome Flutter CLI to create a new project.
59+
With the Flutter Wrapper this becomes easier.
6360

61+
```bash
62+
mkdir flutter_wrapper_project && cd "$_"
63+
git init
64+
sh -c "$(curl -fsSL https://raw.githubusercontent.com/passsy/flutter_wrapper/master/install.sh)"
65+
./flutterw create .
66+
./flutterw run
67+
```
6468

6569
## License
6670

0 commit comments

Comments
 (0)