-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
61 lines (58 loc) · 13.5 KB
/
index.html
File metadata and controls
61 lines (58 loc) · 13.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<!--
~ Copyright (C) 2005-present, 58.com. All rights reserved.
~ Use of this source code is governed by a BSD type license that can be
~ found in the LICENSE file.
-->
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Flutter Fair</title>
<meta name="generator" content="VuePress 1.7.1">
<meta name="description" content="A Flutter package used to update widget tree dynamically">
<link rel="preload" href="/assets/css/0.styles.a833e332.css" as="style"><link rel="preload" href="/assets/js/app.7150d990.js" as="script"><link rel="preload" href="/assets/js/2.a909edba.js" as="script"><link rel="preload" href="/assets/js/21.9fdd3e15.js" as="script"><link rel="prefetch" href="/assets/js/10.836c1718.js"><link rel="prefetch" href="/assets/js/11.c752bceb.js"><link rel="prefetch" href="/assets/js/12.b3b34a59.js"><link rel="prefetch" href="/assets/js/13.8273986f.js"><link rel="prefetch" href="/assets/js/14.cb363924.js"><link rel="prefetch" href="/assets/js/15.1c1a5f9d.js"><link rel="prefetch" href="/assets/js/16.8fa55493.js"><link rel="prefetch" href="/assets/js/17.830aaa3c.js"><link rel="prefetch" href="/assets/js/18.9ceb572e.js"><link rel="prefetch" href="/assets/js/19.7a60c8ac.js"><link rel="prefetch" href="/assets/js/20.599b087b.js"><link rel="prefetch" href="/assets/js/22.8d5355a6.js"><link rel="prefetch" href="/assets/js/23.6c99de55.js"><link rel="prefetch" href="/assets/js/24.4302ae4a.js"><link rel="prefetch" href="/assets/js/25.67c70447.js"><link rel="prefetch" href="/assets/js/26.cafa7432.js"><link rel="prefetch" href="/assets/js/27.1677f5e1.js"><link rel="prefetch" href="/assets/js/28.b295f678.js"><link rel="prefetch" href="/assets/js/29.da887c9d.js"><link rel="prefetch" href="/assets/js/3.e719670d.js"><link rel="prefetch" href="/assets/js/30.cb732564.js"><link rel="prefetch" href="/assets/js/31.0a6e24a1.js"><link rel="prefetch" href="/assets/js/32.f883af3b.js"><link rel="prefetch" href="/assets/js/4.9a31cbb2.js"><link rel="prefetch" href="/assets/js/5.57e5c489.js"><link rel="prefetch" href="/assets/js/6.a6275fda.js"><link rel="prefetch" href="/assets/js/7.d06faa33.js"><link rel="prefetch" href="/assets/js/8.f1740b8f.js"><link rel="prefetch" href="/assets/js/9.20fc1ed2.js">
<link rel="stylesheet" href="/assets/css/0.styles.a833e332.css">
</head>
<body>
<div id="app" data-server-rendered="true"><div class="theme-container no-sidebar"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/" aria-current="page" class="home-link router-link-exact-active router-link-active"><!----> <span class="site-name">Flutter Fair</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="Sample Menu" class="dropdown-title"><span class="title">Sample</span> <span class="arrow down"></span></button> <button type="button" aria-label="Sample Menu" class="mobile-dropdown-title"><span class="title">Sample</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/project/hello_fair/" target="_blank" rel="noopener noreferrer" class="nav-link external">
Hello Fair
<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="Languages" class="dropdown-title"><span class="title">Languages</span> <span class="arrow down"></span></button> <button type="button" aria-label="Languages" class="mobile-dropdown-title"><span class="title">Languages</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/" aria-current="page" class="nav-link router-link-exact-active router-link-active">
English
</a></li><li class="dropdown-item"><!----> <a href="/zh/" class="nav-link">
简体中文
</a></li></ul></div></div> <a href="https://github.com/wuba/fair" target="_blank" rel="noopener noreferrer" class="repo-link">
GitHub
<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="Sample Menu" class="dropdown-title"><span class="title">Sample</span> <span class="arrow down"></span></button> <button type="button" aria-label="Sample Menu" class="mobile-dropdown-title"><span class="title">Sample</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/project/hello_fair/" target="_blank" rel="noopener noreferrer" class="nav-link external">
Hello Fair
<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="Languages" class="dropdown-title"><span class="title">Languages</span> <span class="arrow down"></span></button> <button type="button" aria-label="Languages" class="mobile-dropdown-title"><span class="title">Languages</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/" aria-current="page" class="nav-link router-link-exact-active router-link-active">
English
</a></li><li class="dropdown-item"><!----> <a href="/zh/" class="nav-link">
简体中文
</a></li></ul></div></div> <a href="https://github.com/wuba/fair" target="_blank" rel="noopener noreferrer" class="repo-link">
GitHub
<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></nav> <ul class="sidebar-links"><li><section class="sidebar-group depth-0"><p class="sidebar-heading open"><span>Guide</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/guide/" class="sidebar-link">Introduction</a></li><li><a href="/guide/usage.html" class="sidebar-link">Getting started</a></li><li><a href="/guide/simple-demo.html" class="sidebar-link">从零开始写一个Demo</a></li><li><a href="/guide/counting-demo.html" class="sidebar-link">Counting计数器</a></li></ul></section></li><li><section class="sidebar-group depth-0"><p class="sidebar-heading"><span>Advance</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/guide/layout_definition.html" class="sidebar-link">模板格式</a></li><li><a href="/guide/generate_binding.html" class="sidebar-link">编写组件映射表</a></li><li><a href="/guide/generate_bundle.html" class="sidebar-link">Bundle资源</a></li><li><a href="/guide/layout_sugar.html" class="sidebar-link">模板语法【实验】</a></li></ul></section></li><li><section class="sidebar-group depth-0"><p class="sidebar-heading"><span>Resource</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/article/fair_design.html" class="sidebar-link">Flutter Fair: A new package used to update widget tree dynamically</a></li><li><a href="/article/widget_update.html" class="sidebar-link">组件绑定与局部刷新</a></li><li><a href="/article/build_runner.html" class="sidebar-link">bundle编译实现</a></li><li><a href="/article/performance.html" class="sidebar-link">运行性能情况</a></li></ul></section></li></ul> </aside> <main aria-labelledby="main-title" class="home"><header class="hero"><img src="/logo.png" alt="hero"> <h1 id="main-title">
Flutter Fair
</h1> <p class="description">
A Flutter package used to update widget tree dynamically
</p> <p class="action"><a href="/guide/" class="nav-link action-button">
Get Started →
</a></p></header> <div class="features"><div class="feature"><h2>Lightweight Runtime</h2> <p>The core runtime contains only 2.6k lines of Dart. No worry about size.</p></div><div class="feature"><h2>Seamless Integration</h2> <p>Coding with pure Dart. Integrate package with few configuration.</p></div><div class="feature"><h2>Expandable Widgets</h2> <p>Custom/3rd Widgets mapping can be easily extended with annotation.</p></div></div> <div class="theme-default-content custom content__default"><h2 id="quick-start"><a href="#quick-start" class="header-anchor">#</a> Quick Start</h2> <p>Use Flutter Fair require few steps. Add dependency inside <code>pubspec.yaml</code>.</p> <div class="language-yaml line-numbers-mode"><pre class="language-yaml"><code><span class="token key atrule">dependencies</span><span class="token punctuation">:</span>
<span class="token key atrule">fair</span><span class="token punctuation">:</span> ^0.2.0
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br></div></div><p>Wrap your app with FairApp Widget.</p> <div class="language-dart line-numbers-mode"><pre class="language-dart"><code><span class="token keyword">void</span> <span class="token function">main</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
<span class="token function">runApp</span><span class="token punctuation">(</span>
<span class="token function">FairApp</span><span class="token punctuation">(</span>
child<span class="token punctuation">:</span> <span class="token function">MaterialApp</span><span class="token punctuation">(</span>home<span class="token punctuation">:</span> <span class="token function">App</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span>
<span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br></div></div><p>Import a dynamic widget as FairWidget</p> <div class="language-dart line-numbers-mode"><pre class="language-dart"><code><span class="token function">FairWidget</span><span class="token punctuation">(</span>
type<span class="token punctuation">:</span> <span class="token string">'hello_world'</span><span class="token punctuation">,</span>
path<span class="token punctuation">:</span> <span class="token string">'assets/bundle/hello_world.json'</span><span class="token punctuation">,</span>
<span class="token punctuation">)</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br></div></div></div> <div class="footer">
Copyright © 2020 58.com | Powered by The Fair Authors
</div></main></div><div class="global-ui"></div></div>
<script src="/assets/js/app.7150d990.js" defer></script><script src="/assets/js/2.a909edba.js" defer></script><script src="/assets/js/21.9fdd3e15.js" defer></script>
</body>
</html>