GithubHelp home page GithubHelp logo

silverlovesl / gm_tutorial Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 27.93 MB

GM flutter project structure

Makefile 0.49% Kotlin 0.16% Ruby 3.41% Swift 1.84% Objective-C 0.05% Dart 37.20% CMake 23.84% C++ 28.85% C 1.81% HTML 2.35%

gm_tutorial's Introduction

Setup

Documentation

Installation

# Download flutter installer
curl https://storage.googleapis.com/flutter_infra_release/releases/stable/macos/flutter_macos_arm64_3.7.5-stable.zip --output flutter_macos_arm64_3.7.5-stable.zip

# Unzip
sudo unzip ./flutter_macos_arm64_3.7.5-stable.zip -d /usr/local/flutter

 # Set to .bash_profile
export PATH=/usr/local/flutter/bin:$PATH

source ~/.bash_profile

# Check install
flutter doctor

# Run upgrade if need
flutter upgrade

Proxy

Configuring Flutter to use a mirror site

# Set to .bash_profile
export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
source ~/.bash_profile

Code Style

To make sure that all developers in the team use same code formatting. Set following into .vscode/settings

{
  "dart.lineLength": 160,
  "[dart]": {
    "editor.formatOnSave": true,
    "editor.formatOnType": true,
    "editor.selectionHighlight": false,
    "editor.suggest.snippetsPreventQuickSuggestions": false,
    "editor.suggestSelection": "first",
    "editor.tabCompletion": "onlySnippets",
    "editor.wordBasedSuggestions": false,
    "editor.codeActionsOnSave": {
      "source.fixAll": true
    }
  }
}

Start app

https://go.microsoft.com/fwlink/?linkid=830387

From CLI

# List all available devices
flutter devices

#iPhone 14 Pro Max (mobile) • E5AC5E49-308D-461C-A175-EEA7FA718FA9 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-16-2 (simulator)
#macOS (desktop)            • macos                                • darwin-arm64   • macOS 13.2.1 22D68 darwin-arm64
#Chrome (web)               • chrome                               • web-javascript • Google Chrome 110.0.5481.100

flutter run -d E5AC5E49-308D-461C-A175-EEA7FA718FA9 # Your device UUID

From vscode runner

Generate Freezed Code

make freeze

Localization

How to internationalize Flutter apps

make i18n

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.