/do-flutter

Try Flutter!!

Primary LanguageObjective-C

Do Flutter

Try flutter !!

Develop with VSCode

Run simulator

# Type in cli
open -a Simulator

# OR Run in VSCode module
Command + Shift + P > Flutter: Launch Emulator > [Do Stuff for run Simulator]

Run Debugging in Simulator

Debug > Start Debugging > [Do Stuff for run]

Install packages

# In pubspec.yaml
dependencies:
  flutter:
    sdk: flutter
cupertino_icons: ^0.1.2
+   english_words: ^3.1.0
# Type in cli. This command do install modules via the pubspec.yaml
flutter pub get

Using Assets

# In pubspec.yaml
# Add Assets Folders in the root of the project
# Remove Comment in assets section.

flutter:
  ...
  assets:
    - assets/images/loading.gif
  ...
# After add the assets in yaml, do pacakges get.
flutter pub get

VSCode Quick Fix

Command + .

Provider

Use Provider for stores

// Using when read widget context
JoinOrLogin joinOrLogin = Provider.of<JoinOrLogin>(context);
bool isJoin = joinOrLogin.isJoin;

// OR

// Using when cannot read widget context
// Consumer returns the widget context and provider and child widget
Consumer<JoinOrLogin> (
  builder: (BuildContext context, JoinOrLogin value, Widget child) => GestureDetector(
    onTab: () {
      bool isJoin = value.isJoin;
    }
  )
)

Firebase Auth

Using Firebase Auth pub Firebase Auth Pub

  • At least Xcode 10.1
  • Have to add GoogleService-info.plist file in the IOS project > Runner > Runner folder via XCode