Skip to content

shuyanzi/flutter-in-practice

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flutter in Practice

This project is the reference source code of online video course 叽歪课程 - Flutter 移动应用开发实战, including usage demo of flutter components and a social video app weiguan like tiktok.

How to run

Install flutter sdk

Please refer to flutter official document Install.

Clone repository

git clone git@github.com:jaggerwang/flutter-in-practice.git && cd flutter-in-practice

Install dependent packages

flutter packages get

Connect a device or run a simulator

Connet your Android or iOS device to your computer or run a simulator using the following commands.

$ flutter emulators
2 available emulators:

9.0-1080p           • 9.0-1080p     • Google • android
apple_ios_simulator • iOS Simulator • Apple  • ios

...
$ flutter emulators --launch apple_ios_simulator

Run app

This repository contains several apps.

To run flutter demo:

flutter run -t lib/demo/main.dart

To run weiguan:

flutter run -t lib/weiguan/mobile/main.dart

The video player can not work on iOS simulator, you should use an Android emulator or a real device.

To run weiguan in development mode:

flutter run -t lib/weiguan/mobile/main_dev.dart

The weiguan app default use a mocked api service, you can replace it with a real api service supplied by Sanic in Practice. Please remember to change the main file as the following:

...

void main() async {
  final container = WgContainer(WgConfig(
    ...
    isMockApi: false,
    wgApiBase: 'http://localhost:8000',
  ));
  await container.onReady;

  ...
}

Screenshots

About

Flutter cross platform mobile app development in practice.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dart 98.4%
  • Ruby 1.1%
  • Other 0.5%