New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flutter 简介 #3

Open
zilongc opened this Issue Sep 27, 2017 · 0 comments

Comments

Projects
None yet
1 participant
@zilongc
Copy link
Owner

zilongc commented Sep 27, 2017

Flutter makes it easy and fast to build beautiful mobile apps

Flutter 是一个创建移动应用的SDK,同一份代码,可以在Android和IOS

特点

  • Deliver features faster
    Refresh times so fast, you can "paint" your app to life on hardware, emulators, and simulators
    应用更流畅

  • Craftbeautiful UIs
    Delight your users and make your brand stand out with rich motion, smooth scrolling, and beautiful customizable components.
    界面更漂亮

  • Used by Google
    Flutter is used by Google and others in production, works with Firebase and other mobile app SDKs, and is open source.
    google已经在生产环境中使用

Flutter is an alpha, open-source project. 但是当前还在alpha阶段

Fast development 快速开发

Flutter's hot reload helps you quickly and easily experiment, build UIs, add features, and fix bug faster. Experience sub-second reload times, without losing state, on emulators, simulators, and hardware for iOS and Android.
热加载特性使开发和实验和方便,并且不可以丢当前状态
ccc

Expressive, beautiful UIs 简明 漂亮的UI

Delight your users with Flutter's built-in beautiful Material Design and Cupertino (iOS-flavor) widgets, rich motion APIs, smooth natural scrolling, and platform awareness.

Modern, reactive framework 现代响应式框架

Easily compose your UI with Flutter's modern reactive framework and rich set of platform, layout, and foundation widgets. Solve your tough UI challenges with powerful and flexible APIs for 2D, animation, gestures, effects, and more.

class CounterState extends State<Counter> {
  int counter = 0;

  void increment() {
    // Tells the Flutter framework that state has changed,
    // so the framework can run build() and update the display.
  // 通知Flutter组件的状态已经变化,需要重新执行build方法,更新UI
    setState(() {
      counter++;
    });
  }

  Widget build(BuildContext context) {
    // This method is rerun every time setState is called.
    // The Flutter framework has been optimized to make rerunning
    // build methods fast, so that you can just rebuild anything that
    // needs updating rather than having to individually change
    // instances of widgets.
 // 当前方法就是在组件状态变化时,调用的方法。
// Flutter 重新执行需要重新渲染的组件的build方法。
    return new Row(
      children: <Widget>[
        new RaisedButton(
          onPressed: increment,
          child: new Text('Increment'),
        ),
        new Text('Count: $counter'),
      ],
    );
  }
}

Browse the widget catalog and learn more about the reactive framework.

Access native features and SDKs

Make your app come to life with platform APIs, 3rd party SDKs, and native code. Flutter lets you reuse your existing Java, Swift, and ObjC code, and access native features and SDKs on iOS and Android.

在项目中可以使用平台Api、第三方SDK、本地代码,例如Java、swift、Object-C等

Accessing platform features is easy. Here is a snippet from our interop example:

Future<Null> getBatteryLevel() async {
  var batteryLevel = 'unknown';
  try {
    int result = await methodChannel.invokeMethod('getBatteryLevel');
    batteryLevel = 'Battery level: $result%';
  } on PlatformException {
    batteryLevel = 'Failed to get battery level.';
  }
  setState(() {
    _batteryLevel = batteryLevel;
  });
}

Learn how to use packages, or write platform channels, to access native code, APIs, and SDKs.

Unified app development

Flutter has the tools and libraries to help you easily bring your ideas to life on iOS and Android. If you don't have any mobile development experience, Flutter is an easy and fast way to build beautiful mobile apps. If you are an experienced iOS or Android developer, you can use Flutter for your views and leverage much of your existing Java/ObjC/Swift investment.

Build

Beautiful app UIs

Rich 2D GPU-accelerated APIs
Reactive framework
Animation/motion APIs
Material Design and iOS widgets
Fluid coding experience

Sub-second, stateful hot reload
IntelliJ: refactor, code completion, etc
Dart language and core libs
Package manager
Full-features apps

Interop with mobile OS APIs & SDKs
Maven/Java
Cocoapods/ObjC/Swift
Optimize

Test

Unit testing
Integration testing
On-device testing
Debug

IDE debugger
Web-based debugger
async/await aware
Expression evaluator
Profile

Timeline
CPU and memory
In-app perf charts
Deploy

Compile

Native ARM code
Dead code elimination
Distribution

App Store
Play Store
Learn more about what makes Flutter special in the technical overview.

@zilongc zilongc added the flutter label Sep 27, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment