• Stars
    star
    283
  • Rank 146,066 (Top 3 %)
  • Language
    Dart
  • License
    Apache License 2.0
  • Created over 6 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Flutter execution wrapper which keeps the flutter version in sync for each project

Flutter Wrapper

flutterw is a tiny, open source shell script which downloads and executes the Flutter SDK with the exact version defined in your project respository. It encourages the idea that upgrading Flutter should happen per project, not per developer. Thus upgrading Flutter with flutterw automatically upgrades Flutter for your co-workers and on the CI servers.

The Flutter Wrapper will add the Flutter SDK as a git submodule to your project. It pins the version and the channel.

This project is inspired by the gradle wrapper.

Read more on Medium

Install flutterw

sh -c "$(curl -fsSL https://raw.githubusercontent.com/passsy/flutter_wrapper/master/install.sh)"

Open the Terminal, navigate to your project root and execute the line above.

From now on use ./flutterw instead of flutter

flutterw terminal demo

IDE Setup

Use with VScode

If you're a VScode user link the new Flutter SDK path in your settings $projectRoot/.vscode/settings.json (create if it doesn't exists yet)

{
    "dart.flutterSdkPath": ".flutter",
}

Commit this file to your git repo and your coworkers will automatically use flutterw from now on

Use with IntelliJ / Android Studio

Go to File > Settings > Languages & Frameworks > Flutter and set the Flutter SDK path to $projectRoot/.flutter

IntelliJ Settings

Add this step to the onboarding guidelines of your projects because this has to be done for every developer for every project using flutterw.

Tips and Tricks

Upgrading Flutter

Flutter Wrapper doesn't require any special command to update Flutter. Run ./flutterw channel <stable|beta|dev|master> to change the channel or update to the lastest version of a given channel.

./flutterw channel beta
./flutterw upgrade

Don't forget to commit the submodule changes.

Updating flutterw

To update the flutter wrapper to the latest version run the install command again:

sh -c "$(curl -fsSL https://raw.githubusercontent.com/passsy/flutter_wrapper/master/install.sh)"

To update the flutter wrapper to a specific verssion, use the -t <tag/branch> (i.e. v1.0.0)

sh -c "curl -fsSL https://raw.githubusercontent.com/passsy/flutter_wrapper/master/install.sh" | bash /dev/stdin -t v1.0.0

Uninstall flutterw

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

sh -c "$(curl -fsSL https://raw.githubusercontent.com/passsy/flutter_wrapper/master/uninstall.sh)"

Bye πŸ‘‹

Create a new project using the flutter wrapper

You can create a new Flutter project without installing Flutter globally on your machine.

# 1. Create an empty git repo
mkdir flutter_wrapper_project && cd "$_"
git init

# 2. Install flutterw
sh -c "$(curl -fsSL https://raw.githubusercontent.com/passsy/flutter_wrapper/master/install.sh)"

# 3. Create Flutter project
./flutterw create .
./flutterw run

License

Copyright 2019 Pascal Welsch

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

More Repositories

1

android-HoloCircularProgressBar

Holo Circular ProgressBar
Java
959
star
2

CompositeAndroid

Composition over inheritance for Android components like Activity or Fragment
Java
515
star
3

kt.dart

A port of kotlin-stdlib for Dart/Flutter including immutable collections (KtList, KtMap, KtSet) and other packages
Dart
468
star
4

dart-lint

An opinionated, community-driven set of lint rules for Dart and Flutter projects. Like pedantic but stricter
277
star
5

deep_pick

Pick values from Dart deep nested data structures (usually json)
Dart
109
star
6

gradle-GitVersioner

generates a project version for the given git project to distinguish between builds
81
star
7

gradle-gitVersioner-plugin

Extracts a useful versionCode and versionName from git history
Kotlin
71
star
8

Konduit

A declarative UI Framework for android using Kotlin
Kotlin
70
star
9

spot

Chainable powerful Flutter widget selector API, screenshots and assertions for awesome widget tests.
Dart
62
star
10

ArrayAdapter

The missing ArrayAdapter implementation for RecyclerView
Java
37
star
11

git-revision

Git extension to generate a meaningful, human readable revision for each commit in a git repository.
Dart
25
star
12

android-wear-GoPro-Remote

Android Wear Application to control a GoPro with wifi commands
Java
22
star
13

android-GetReactive

GitHub repository search with RxJava (code from talk "Get Reactive" at DroidconUk15/Devoxx15)
Java
13
star
14

nanoid2

Dart
11
star
15

docker-flutterw

Docker image for flutter projects using flutter_wrapper
Dockerfile
10
star
16

kotlin-advent-of-code

Kotlin implementation of http://adventofcode.com/
Kotlin
8
star
17

flutter-tdd-workshop

Flutter TDD workshop
C++
7
star
18

immutability_in_dart

Dart
7
star
19

aoc22_dart_code_golf

AdventOfCode 2022 in Dart focusing on code golf, making the solutions as small as possible
Dart
6
star
20

cgn_code_design_workshop

Android workshop at Code+Design in Cologne
Java
3
star
21

flutterw_sidekick_plugin

Binds the flutter_wrapper Flutter SDK to sidekick CLIs
Dart
3
star
22

android-wear-samples

samples for android wear APIs for the Hackathon in Cologne 5.3.15 http://hackathon.mobile.cologne/
Java
3
star
23

flutter_dependabot_example

Dart
2
star
24

Kata-Kotlin-Pancake-Flipper

Coding challenge in Kotlin from first qualification round of Google code jam 2017
Kotlin
1
star
25

gdg-dus-study-jam

Java
1
star
26

kata-author-collaboration

Coding dojo kata building a shopping basket with discounts
1
star
27

dart-aoc18

Advent of code solutions in dart
Dart
1
star
28

gh-tidy-clone

Clones github projects into ~/Projects/github/{org}/{repo}
Go
1
star