A top-level repo containing some exemplar flutter projects.
Hmmmm… well this was a little bit of an ordeal. The web is is your best bet, but, here are some notes for a VSCode setup for linux (skip any you already may have done):
Install Java (EE)
Java8
.Install Dart SDK
Install via apt:
#!/bin/bash
function install() {
# Add repository
sudo apt-get update
sudo apt-get install apt-transport-https
sudo sh -c 'curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -'
sudo sh -c 'curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list'
# Install stable
sudo apt-get update
sudo apt-get install dart
# Install dev
# sudo sh -c 'curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_unstable.list > /etc/apt/sources.list.d/dart_unstable.list'
# sudo apt-get update
# sudo apt-get install dart
} && install
Install Flutter SDK
Install via curl:
#!/bin/bash
# https://flutter.io/setup-linux/
# https://flutter.io/sdk-archive/#linux
# https://storage.googleapis.com/flutter_infra/releases/beta/linux/flutter_linux_v0.7.3-beta.tar.xz
function install() {
local version="v0.7.3-beta"
local binary="flutter_linux_${version}.tar.xz"
local url="https://storage.googleapis.com/flutter_infra/releases/beta/linux/${binary}"
if [ ! -f "${binary}" ]; then
curl -O "${url}"
fi
tar xvf "${binary}"
local install_dir="${TEMOS_BIN}"
mv flutter "${install_dir}"
sudo apt-get install lib32stdc++6
# Remember to add 'flutter/bin' to path!
PATH=${PATH}:"${TEMOS_BIN}/flutter/bin"
flutter doctor
rm -Rf "${binary}"
} && install
Install Android Studio
Manually download, unzip, and move to desired home: https://developer.android.com/studio/#downloads
Unzip and move to desired bin
directory.
Update .bashrc to add binaries to your path and smooth over some kinks:
ANDROID_STUDIO_HOME="${TEMOS_BIN}/android-studio"
if [ -d "${ANDROID_STUDIO_HOME}" ]; then
export "${ANDROID_STUDIO_HOME}"
export PATH=${PATH}:"${ANDROID_STUDIO_HOME}/bin"
alias sdkmanager="JAVA_OPTS='-XX:+IgnoreUnrecognizedVMOptions --add-modules java.se.ee' sdkmanager"
alias android-studio="${ANDROID_STUDIO_HOME}/bin/studio.sh &"
fi
Install Android Studio Dart Plugin (from IDE plugin manager).
Install Android Studio Flutter Plugin (from IDE plugin manager).
Create an emulator device
sudo apt install qemu-kvm
sudo adduser $USER kvm
Install VSCode.
Test
flutter doctor --android-licenses
.flutter create flutter_demo
<ctrl+shift+p> Setup Device
.<ctrl+shift+p> Flutter Launch Emulator
.flutter run
flutter create <project name>
flutter run
flutter doctor --android-licenses
flutter channel beta
flutter upgrade
flutter config --enable-web
Author: tc-playground
Source Code: https://github.com/tc-playground/flutter-playground
#flutter #dart #mobile-apps