- 
  Notifications
 You must be signed in to change notification settings 
- Fork 151
navigaor组件 #14
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
 
  Merged
 
 
 
 
  Merged
 navigaor组件 #14
Changes from all commits
 Commits
 
 
 File filter
Filter by extension
Conversations
 Failed to load comments. 
 
 
 
  Loading
 
 Jump to
 
 Jump to file
 
 
 
 Failed to load files. 
 
 
 
  Loading
 
 Diff view
Diff view
There are no files selected for viewing
 
 
 
 1 change: 1 addition & 0 deletions
 
 
 
 docs/widget/navigator/appbar/index.md
 
 
 
 
  
 
 
 
 
 
 
 This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
 Learn more about bidirectional Unicode characters
 
 
 
 
 | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ## **AppBar** | 
 
 
 
 34 changes: 34 additions & 0 deletions
 
 
 
 docs/widget/navigator/scaffold/index.md
 
 
 
 
  
 
 
 
 
 
 
 This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
 Learn more about bidirectional Unicode characters
 
 
 
 
 | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| ## **Scallold** | ||
| > | ||
| 页面的基础布局结构控件, | ||
|  | ||
| ### 构造方法 | ||
| ``` dart | ||
| Scaffold({ | ||
| Key key, | ||
| PreferredSizeWidget appBar, | ||
| Widget body, | ||
| Widget floatingActionButton, | ||
| FloatingActionButtonLocation floatingActionButtonLocation, | ||
| FloatingActionButtonAnimator floatingActionButtonAnimator, | ||
| List<Widget> persistentFooterButtons, | ||
| Widget drawer, | ||
| Widget endDrawer, | ||
| Widget bottomNavigationBar, | ||
| Widget bottomSheet, | ||
| Color backgroundColor, | ||
| bool resizeToAvoidBottomPadding, | ||
| bool resizeToAvoidBottomInset, | ||
| bool primary: true, | ||
| DragStartBehavior drawerDragStartBehavior: DragStartBehavior.down }) | ||
| ``` | ||
|  | ||
| ### 属性介绍 | ||
| * appBar: 头部导航条 | ||
| * backgroundColor: 页面背景颜色 | ||
| * body : 整个scaffold主要显示模块内容 | ||
| * bottomNavigationBar:页面地方导航条 | ||
| * bottomSheet: 持久可见的底部sheet,即使用户在和其他页面部分有交互,底部sheet依然是可见的。 | ||
| 可以使用showBottomSheet函数创建和显示模态底部sheet。如果用ShowBottomSheet这个函数 | ||
| 创建了bottomSheet,那么在build一个含有bottomSheet的新的Scaffold的时候,当前的bottomSheet必须关闭。bottomSheet可以是任何形式的widget | ||
| * drawer :页面的抽屉,有从左向右或者从右向左的显示效果 | 
 
 
 
 3 changes: 2 additions & 1 deletion
 
 
 
 lib/widget/index.dart
 
 
 
 
  
 
 
 
 
 
 
 This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
 Learn more about bidirectional Unicode characters
 
 
 
 
 | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -1,9 +1,10 @@ | ||
| import 'scrollview/index.dart' as scrollview; | ||
| import 'regular/index.dart' as regular; | ||
|  | ||
| import 'navigator/index.dart' as navigator; | ||
| List getAllWidgets() { | ||
| List routerMap =[]; | ||
| routerMap.addAll(scrollview.widgetMap); | ||
| routerMap.addAll(regular.widgetMap); | ||
| routerMap.addAll(navigator.widgetMap); | ||
| return routerMap; | ||
| } | 
 
 
 
 43 changes: 43 additions & 0 deletions
 
 
 
 lib/widget/navigator/appbar/demo.dart
 
 
 
 
  
 
 
 
 
 
 
 This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
 Learn more about bidirectional Unicode characters
 
 
 
 
 | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| import 'package:flutter/material.dart'; | ||
|  | ||
| class Index extends StatefulWidget { | ||
| @override | ||
| _IndexState createState() => _IndexState(); | ||
| } | ||
|  | ||
| class _IndexState extends State<Index> { | ||
| _airDress (){ | ||
| print( '_airDress'); | ||
| } | ||
| _restitchDress (){ | ||
| print( '_restitchDress'); | ||
| } | ||
| _repairDress (){ | ||
| print( '_repairDress'); | ||
| } | ||
| @override | ||
| Widget build(BuildContext context) { | ||
| return Scaffold( | ||
| appBar: AppBar( | ||
| title: Text('My Fancy Dress'), | ||
| actions: <Widget>[ | ||
| IconButton( | ||
| icon: Icon(Icons.playlist_play), | ||
| tooltip: 'Air it', | ||
| onPressed: _airDress, | ||
| ), | ||
| IconButton( | ||
| icon: Icon(Icons.playlist_add), | ||
| tooltip: 'Restitch it', | ||
| onPressed: _restitchDress, | ||
| ), | ||
| IconButton( | ||
| icon: Icon(Icons.playlist_add_check), | ||
| tooltip: 'Repair it', | ||
| onPressed: _repairDress, | ||
| ), | ||
| ], | ||
| ) | ||
| ); | ||
| } | ||
| } | 
 
 
 
 26 changes: 26 additions & 0 deletions
 
 
 
 lib/widget/navigator/appbar/index.dart
 
 
 
 
  
 
 
 
 
 
 
 This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
 Learn more about bidirectional Unicode characters
 
 
 
 
 | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| import 'package:flutter/material.dart'; | ||
| import 'package:efox_flutter/components/widgetComp.dart' as WidgetComp; | ||
| import 'demo.dart' as Demo; | ||
|  | ||
| class Index extends StatefulWidget { | ||
| static String title = 'AppBar'; | ||
| static String originCodeUrl = 'https://docs.flutter.io/flutter/material/AppBar-class.html'; | ||
| static String mdUrl = 'docs/widget/navigator/appbar/index.md'; | ||
|  | ||
| @override | ||
| _IndexState createState() => _IndexState(); | ||
| } | ||
|  | ||
| class _IndexState extends State<Index> { | ||
| @override | ||
| Widget build(BuildContext context) { | ||
| return WidgetComp.Index( | ||
| title: Index.title, | ||
| originCodeUrl: Index.originCodeUrl, | ||
| mdUrl: Index.mdUrl, | ||
| demoChild: <Widget>[ | ||
| Demo.Index() | ||
| ], | ||
| ); | ||
| } | ||
| } | 
 
 
 
 26 changes: 26 additions & 0 deletions
 
 
 
 lib/widget/navigator/index.dart
 
 
 
 
  
 
 
 
 
 
 
 This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
 Learn more about bidirectional Unicode characters
 
 
 
 
 | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| import 'package:efox_flutter/store/objects/widget_info.dart'; | ||
| import 'appbar/index.dart' as appbar; | ||
| import 'scaffold/index.dart' as scaffold; | ||
| const nameSpaces = '/navigator_'; | ||
|  | ||
| List widgets = [ | ||
| ItemInfo( | ||
| widget: scaffold.Index(), | ||
| code: 57439, // playlist_play | ||
| title: scaffold.Index.title, | ||
| ), | ||
| ItemInfo( | ||
| widget: appbar.Index(), | ||
| code: 58729, // near_me | ||
| title: appbar.Index.title, | ||
| ), | ||
| ]; | ||
|  | ||
| List widgetMap = [ | ||
| ItemListInfo( | ||
| nameSpaces: nameSpaces, | ||
| widgetList: widgets, | ||
| typeName: 'navigator', | ||
| code: 58717, | ||
| ) | ||
| ]; | 
 
 
 
 33 changes: 33 additions & 0 deletions
 
 
 
 lib/widget/navigator/scaffold/demo.dart
 
 
 
 
  
 
 
 
 
 
 
 This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
 Learn more about bidirectional Unicode characters
 
 
 
 
 | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| import 'package:flutter/material.dart'; | ||
|  | ||
| class Index extends StatefulWidget { | ||
| @override | ||
| _IndexState createState() => _IndexState(); | ||
| } | ||
|  | ||
| class _IndexState extends State<Index> { | ||
| int _count = 0 ; | ||
| @override | ||
| Widget build(BuildContext context) { | ||
| return Scaffold( | ||
| appBar: AppBar( | ||
| title: Text('Sample Code'), | ||
| ), | ||
| body: Center( | ||
| child: Text('You have pressed the button $_count times.'), | ||
| ), | ||
| bottomNavigationBar: BottomAppBar( | ||
| child: Container(height: 50.0,), | ||
| ), | ||
| bottomSheet: Text( 'bottomSheet123123'), | ||
| floatingActionButton: FloatingActionButton( | ||
| onPressed: () => setState(() { | ||
| _count++; | ||
| }), | ||
| tooltip: 'Increment Counter', | ||
| child: Icon(Icons.add), | ||
| ), | ||
| floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked, | ||
| ); | ||
| } | ||
| } | 
 
 
 
 26 changes: 26 additions & 0 deletions
 
 
 
 lib/widget/navigator/scaffold/index.dart
 
 
 
 
  
 
 
 
 
 
 
 This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
 Learn more about bidirectional Unicode characters
 
 
 
 
 | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| import 'package:flutter/material.dart'; | ||
| import 'package:efox_flutter/components/widgetComp.dart' as WidgetComp; | ||
| import 'demo.dart' as Demo; | ||
|  | ||
| class Index extends StatefulWidget { | ||
| static String title = 'Scaffold'; | ||
| static String originCodeUrl = 'https://docs.flutter.io/flutter/material/Scaffold-class.html'; | ||
| static String mdUrl = 'docs/widget/navigator/scaffold/index.md'; | ||
|  | ||
| @override | ||
| _IndexState createState() => _IndexState(); | ||
| } | ||
|  | ||
| class _IndexState extends State<Index> { | ||
| @override | ||
| Widget build(BuildContext context) { | ||
| return WidgetComp.Index( | ||
| title: Index.title, | ||
| originCodeUrl: Index.originCodeUrl, | ||
| mdUrl: Index.mdUrl, | ||
| demoChild: <Widget>[ | ||
| Demo.Index() | ||
| ], | ||
| ); | ||
| } | ||
| } | 
 
 
 This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
 Learn more about bidirectional Unicode characters
 
 
 
 
 
 Add this suggestion to a batch that can be applied as a single commit.
 This suggestion is invalid because no changes were made to the code.
 Suggestions cannot be applied while the pull request is closed.
 Suggestions cannot be applied while viewing a subset of changes.
 Only one suggestion per line can be applied in a batch.
 Add this suggestion to a batch that can be applied as a single commit.
 Applying suggestions on deleted lines is not supported.
 You must change the existing code in this line in order to create a valid suggestion.
 Outdated suggestions cannot be applied.
 This suggestion has been applied or marked resolved.
 Suggestions cannot be applied from pending reviews.
 Suggestions cannot be applied on multi-line comments.
 Suggestions cannot be applied while the pull request is queued to merge.
 Suggestion cannot be applied right now. Please check back later.