This commit is contained in:
DeckeDeng
2019-02-19 12:25:13 +08:00
parent 5f1ed65a6b
commit 47116f18c4
68 changed files with 392 additions and 539 deletions

View File

@ -1,7 +1,7 @@
/// @Author: 一凨
/// @Date: 2019-01-11 14:39:48
/// @Last Modified by: 一凨
/// @Last Modified time: 2019-01-11 14:40:09
/// Author: 一凨
/// Date: 2019-01-11 14:39:48
/// Last Modified by: 一凨
/// Last Modified time: 2019-01-11 14:40:09
import 'package:flutter/material.dart';

View File

@ -7,10 +7,8 @@
import 'package:flutter/material.dart';
/*
* DropdownButton 默认按钮的实例
* isDisabled:是否是禁用isDisabled 默认为true
* */
// DropdownButton 默认按钮的实例
// isDisabled:是否是禁用isDisabled 默认为true
var selectItValue;
var selectItemValue;
@ -104,9 +102,7 @@ List<DropdownMenuItem> getListData(){
return items;
}
/*
* DropdownButton 自定义的实例
* */
// DropdownButton 自定义的实例
class DropdownButtonCustom extends StatelessWidget {
final widget;
final parent;

View File

@ -6,13 +6,13 @@
/// target: DropdownButton 的示例
/// 对应文档地址:https://docs.flutter.io/flutter/material/DropdownButton-class.html
import 'package:flutter_go/components/widget_demo.dart';
import 'package:flutter/material.dart';
import 'package:flutter_markdown/flutter_markdown.dart';
import './demo.dart' as dropdownButton;
import 'package:flutter/material.dart';
import 'package:flutter_go/components/widget_demo.dart';
import 'demo.dart' as dropdownButton;
const String _dropdownText0 =
"""### **简介**
@ -56,9 +56,7 @@ class _DemoState extends State<Demo> {
}
}
/*
* 所有的 DropdownButton 按钮
*/
// 所有的 DropdownButton 按钮
Widget allDropdownButtons(BuildContext context,_DemoState that){
return Container(
//padding: EdgeInsets.only(bottom: 20.0, top: 20.0, left: 0, right: 0),
@ -82,9 +80,7 @@ Widget allDropdownButtons(BuildContext context,_DemoState that){
);
}
/*
* 带align的text
* */
// 带align的text
Widget textAlignBar(String txt){
//style: TextStyle(fontSize: 15.5, height: 1.2),textAlign:TextAlign.left
return Align(

View File

@ -28,8 +28,8 @@ class FlatButtonDefault extends StatelessWidget {
// FlatButton.icon 默认按钮的实例
// * Create a text button from a pair of widgets that serve as the button's icon and label
// * isDisabled:是否是禁用
// Create a text button from a pair of widgets that serve as the button's icon and label
// isDisabled:是否是禁用
class FlatButtonIconDefault extends StatelessWidget {
final bool isDisabled;
final IconData icon;

View File

@ -6,15 +6,14 @@
/// target: FlatButton 的示例
/// 对应文档地址:https://docs.flutter.io/flutter/material/FlatButton-class.html
import 'package:flutter_go/components/widget_demo.dart';
import 'package:flutter/material.dart';
import 'package:flutter_markdown/flutter_markdown.dart';
import 'package:flutter/material.dart';
import 'package:flutter_go/components/widget_demo.dart';
import './demo.dart' as flatButton;
const String _flatText0 =
"""### **简介**
> FlatButton 是显示在零高程material widget 上的文本标签
@ -58,9 +57,7 @@ class _DemoState extends State<Demo> {
}
}
/*
* 所有的 FlatButton 按钮
*/
// 所有的 FlatButton 按钮
Widget allFlatButtons(BuildContext context){
return Container(
//padding: EdgeInsets.only(bottom: 20.0, top: 20.0, left: 0, right: 0),
@ -115,10 +112,8 @@ Widget allFlatButtons(BuildContext context){
);
}
/*
* alert 弹框
* context:容器的父级
* */
// alert 弹框
// context:容器的父级
void _showMessage(String name, BuildContext context) {
showDialog(
// alert 的父级
@ -140,9 +135,7 @@ void _showMessage(String name, BuildContext context) {
);
}
/*
* 带align的text
* */
// 带align的text
Widget textAlignBar(String txt){
//style: TextStyle(fontSize: 15.5, height: 1.2),textAlign:TextAlign.left
return Align(

View File

@ -6,11 +6,13 @@
/// target: FloatingActionButton 的示例
/// 对应文档地址:https://docs.flutter.io/flutter/material/FloatingActionButton-class.html
import 'package:flutter_go/components/widget_demo.dart';
import 'dart:math';
import 'package:flutter/material.dart';
import 'package:flutter_markdown/flutter_markdown.dart';
import 'package:flutter/material.dart';
import 'package:flutter_go/components/widget_demo.dart';
import './demo.dart' as floatingActionButton;
@ -67,9 +69,7 @@ class _DemoState extends State<Demo> {
}
}
/*
* 所有的 FloatingActionButton 按钮
*/
// 所有的 FloatingActionButton 按钮
Widget allFloatingActionButtons(BuildContext context,_DemoState that){
final ShapeBorder buttonShape = drawShape(that.buttonShapeType);
return Container(
@ -100,10 +100,8 @@ Widget allFloatingActionButtons(BuildContext context,_DemoState that){
);
}
/*
* alert 弹框
* context:容器的父级
* */
// alert 弹框
// context:容器的父级
// void _showMessage(String name, BuildContext context) {
// showDialog(
// // alert 的父级
@ -125,9 +123,7 @@ Widget allFloatingActionButtons(BuildContext context,_DemoState that){
// );
// }
/*
* 带align的text
* */
// 带align的text
Widget textAlignBar(String txt){
//style: TextStyle(fontSize: 15.5, height: 1.2),textAlign:TextAlign.left
return Align(
@ -141,9 +137,7 @@ Widget textAlignBar(String txt){
);
}
/*
* 绘制边框信息,比如是否有边框,是否是圆角
* */
// 绘制边框信息,比如是否有边框,是否是圆角
ShapeBorder drawShape(String type){
final Color _color = _randomColor();
final borderWidth = Random.secure().nextInt(5).toDouble();
@ -178,9 +172,7 @@ ShapeBorder drawShape(String type){
}
}
/*
* 取随机颜色
* */
// 取随机颜色
Color _randomColor() {
var red = Random.secure().nextInt(255);
var greed = Random.secure().nextInt(255);

View File

@ -7,11 +7,13 @@
/// target: IconButton 的示例
/// 对应文档地址:https://docs.flutter.io/flutter/material/IconButton-class.html
import 'package:flutter_go/components/widget_demo.dart';
import 'dart:math';
import 'package:flutter/material.dart';
import 'package:flutter_markdown/flutter_markdown.dart';
import 'dart:math';
import 'package:flutter/material.dart';
import 'package:flutter_go/components/widget_demo.dart';
import './demo.dart' as iconButton;
@ -62,7 +64,7 @@ class _DemoState extends State<Demo> {
}
}
/// 所有的 IconButton 按钮
// 所有的 IconButton 按钮
Widget allIconButtons(BuildContext context,_DemoState that){
final ShapeBorder buttonShape = drawShape(that.buttonShapeType);
return Container(
@ -102,7 +104,7 @@ Widget allIconButtons(BuildContext context,_DemoState that){
);
}
/// 带align的text
// 带align的text
Widget textAlignBar(String txt){
//style: TextStyle(fontSize: 15.5, height: 1.2),textAlign:TextAlign.left
return Align(
@ -117,7 +119,7 @@ Widget textAlignBar(String txt){
}
/// 绘制边框信息,比如是否有边框,是否是圆角
// 绘制边框信息,比如是否有边框,是否是圆角
ShapeBorder drawShape(String type){
final Color _color = _randomColor();
final borderWidth = Random.secure().nextInt(5).toDouble();
@ -153,7 +155,7 @@ ShapeBorder drawShape(String type){
}
/// 取随机颜色
// 取随机颜色
Color _randomColor() {
var red = Random.secure().nextInt(255);
var greed = Random.secure().nextInt(255);

View File

@ -8,10 +8,8 @@
import 'dart:math';
import 'package:flutter/material.dart';
/*
* OutlineButton 默认按钮的实例
* isDisabled:是否是禁用isDisabled 默认为true
* */
// OutlineButton 默认按钮的实例
// isDisabled:是否是禁用isDisabled 默认为true
class OutlineButtonDefault extends StatelessWidget {
final bool isDisabled;
@ -28,11 +26,9 @@ class OutlineButtonDefault extends StatelessWidget {
}
}
/*
* OutlineButton.icon 默认按钮的实例
* Create a text button from a pair of widgets that serve as the button's icon and label
* isDisabled:是否是禁用
* */
// OutlineButton.icon 默认按钮的实例
// Create a text button from a pair of widgets that serve as the button's icon and label
// isDisabled:是否是禁用
class OutlineButtonIconDefault extends StatelessWidget {
final bool isDisabled;
final IconData icon;
@ -55,9 +51,7 @@ class OutlineButtonIconDefault extends StatelessWidget {
}
}
/*
* OutlineButton 自定义的实例
* */
// OutlineButton 自定义的实例
class OutlineButtonCustom extends StatelessWidget {
final String txt;
final Color color;

View File

@ -6,11 +6,14 @@
/// target: OutlineButton 的示例
/// 对应文档地址:https://docs.flutter.io/flutter/material/OutlineButton-class.html
import 'package:flutter_go/components/widget_demo.dart';
import 'dart:math';
import 'package:flutter/material.dart';
import 'dart:math';
import 'package:flutter_markdown/flutter_markdown.dart';
import 'package:flutter/material.dart';
import 'package:flutter_go/components/widget_demo.dart';
import './demo.dart' as outlineButton;
@ -70,9 +73,7 @@ class _DemoState extends State<Demo> {
}
}
/*
* 所有的 OutlineButton 按钮
*/
// 所有的 OutlineButton 按钮
Widget allOutlineButtons(BuildContext context,_DemoState that){
final ShapeBorder buttonShape = drawShape(that.buttonShapeType);
return Container(
@ -127,10 +128,8 @@ Widget allOutlineButtons(BuildContext context,_DemoState that){
);
}
/*
* alert 弹框
* context:容器的父级
* */
// alert 弹框
// context:容器的父级
// void _showMessage(String name, BuildContext context) {
// showDialog(
// // alert 的父级
@ -152,9 +151,7 @@ Widget allOutlineButtons(BuildContext context,_DemoState that){
// );
// }
/*
* 带align的text
* */
// 带align的text
Widget textAlignBar(String txt){
//style: TextStyle(fontSize: 15.5, height: 1.2),textAlign:TextAlign.left
return Align(
@ -168,9 +165,7 @@ Widget textAlignBar(String txt){
);
}
/*
* 绘制边框信息,比如是否有边框,是否是圆角
* */
// 绘制边框信息,比如是否有边框,是否是圆角
ShapeBorder drawShape(String type){
final Color _color = _randomColor();
final borderWidth = Random.secure().nextInt(5).toDouble();
@ -205,9 +200,7 @@ ShapeBorder drawShape(String type){
}
}
/*
* 取随机颜色
* */
// 取随机颜色
Color _randomColor() {
var red = Random.secure().nextInt(255);
var greed = Random.secure().nextInt(255);

View File

@ -7,10 +7,8 @@
import 'package:flutter/material.dart';
/*
* RaisedButton 默认按钮的实例
* isDisabled:是否是禁用isDisabled 默认为true
* */
// RaisedButton 默认按钮的实例
// isDisabled:是否是禁用isDisabled 默认为true
enum WhyFarther { harder, smarter, selfStarter, tradingCharter }
class PopupMenuButtonDefault extends StatelessWidget {

View File

@ -6,10 +6,10 @@
/// target: PopupMenusButton 的示例
/// 对应文档地址:https://docs.flutter.io/flutter/material/PopupMenuButton-class.html
import 'package:flutter_go/components/widget_demo.dart';
import 'package:flutter_markdown/flutter_markdown.dart';
import 'package:flutter/material.dart';
import 'package:flutter_markdown/flutter_markdown.dart';
import 'package:flutter_go/components/widget_demo.dart';
import './demo.dart' as popupMenuButton;
const String _titleText0 = """

View File

@ -6,11 +6,13 @@
/// target: RaisedButton 的示例
/// 对应文档地址:https://docs.flutter.io/flutter/material/RaisedButton-class.html
import 'package:flutter_go/components/widget_demo.dart';
import 'dart:math';
import 'package:flutter/material.dart';
import 'package:flutter_markdown/flutter_markdown.dart';
import 'dart:math';
import 'package:flutter/material.dart';
import 'package:flutter_go/components/widget_demo.dart';
import './demo.dart' as raisedButton;
@ -69,9 +71,7 @@ class _DemoState extends State<Demo> {
}
}
/*
* 所有的 RaisedButton 按钮
*/
// 所有的 RaisedButton 按钮
Widget allRaisedButtons(BuildContext context,_DemoState that){
final ShapeBorder buttonShape = drawShape(that.buttonShapeType);
return Container(
@ -151,9 +151,7 @@ Widget allRaisedButtons(BuildContext context,_DemoState that){
// );
// }
/*
* 带align的text
* */
// 带align的text
Widget textAlignBar(String txt){
//style: TextStyle(fontSize: 15.5, height: 1.2),textAlign:TextAlign.left
return Align(
@ -167,9 +165,7 @@ Widget textAlignBar(String txt){
);
}
/*
* 绘制边框信息,比如是否有边框,是否是圆角
* */
// 绘制边框信息,比如是否有边框,是否是圆角
ShapeBorder drawShape(String type){
final Color _color = _randomColor();
final borderWidth = Random.secure().nextInt(5).toDouble();
@ -204,9 +200,7 @@ ShapeBorder drawShape(String type){
}
}
/*
* 取随机颜色
* */
// 取随机颜色
Color _randomColor() {
var red = Random.secure().nextInt(255);
var greed = Random.secure().nextInt(255);

View File

@ -5,12 +5,11 @@
/// email: zhu.yan@alibaba-inc.com
/// target: RawMaterialButton 的示例
/// 对应文档地址:https://docs.flutter.io/flutter/material/RawMaterialButton-class.html
import 'package:flutter_go/components/widget_demo.dart';
import 'dart:math';
import 'package:flutter/material.dart';
import 'package:flutter_markdown/flutter_markdown.dart';
import 'dart:math';
import 'package:flutter/material.dart';
import 'package:flutter_go/components/widget_demo.dart';
import './demo.dart' as rawMaterialButton;
@ -59,9 +58,8 @@ class _DemoState extends State<Demo> {
}
}
/*
* 所有的 RawMaterialButton 按钮
*/
// 所有的 RawMaterialButton 按钮
Widget allRawMaterialButtons(BuildContext context,_DemoState that){
final ShapeBorder buttonShape = drawShape(that.buttonShapeType);
return Container(
@ -124,9 +122,7 @@ Widget allRawMaterialButtons(BuildContext context,_DemoState that){
// );
// }
/*
* 带align的text
* */
// 带align的text
Widget textAlignBar(String txt){
//style: TextStyle(fontSize: 15.5, height: 1.2),textAlign:TextAlign.left
return Align(
@ -140,9 +136,7 @@ Widget textAlignBar(String txt){
);
}
/*
* 绘制边框信息,比如是否有边框,是否是圆角
* */
// 绘制边框信息,比如是否有边框,是否是圆角
ShapeBorder drawShape(String type){
final Color _color = _randomColor();
final borderWidth = Random.secure().nextInt(5).toDouble();
@ -177,9 +171,7 @@ ShapeBorder drawShape(String type){
}
}
/*
* 取随机颜色
* */
// 取随机颜色
Color _randomColor() {
var red = Random.secure().nextInt(255);
var greed = Random.secure().nextInt(255);

View File

@ -6,11 +6,11 @@
/// target: Checkbox 的示例
/// 对应文档地址:https://docs.flutter.io/flutter/material/Checkbox-class.html
import 'package:flutter_go/components/widget_demo.dart';
import 'package:flutter_markdown/flutter_markdown.dart';
import 'package:flutter/material.dart';
import 'package:flutter_markdown/flutter_markdown.dart';
import 'package:flutter_go/components/widget_demo.dart';
import './demo.dart' as checkbox;
const String _checkboxText0 =
@ -53,9 +53,7 @@ class _DemoState extends State<Demo> {
}
}
/*
* 所有的 Checkbox 按钮
*/
// 所有的 Checkbox 按钮
Widget allCheckboxs(BuildContext context,_DemoState that){
return Container(
//padding: EdgeInsets.only(bottom: 20.0, top: 20.0, left: 0, right: 0),
@ -92,9 +90,7 @@ Widget allCheckboxs(BuildContext context,_DemoState that){
);
}
/*
* 带align的text
* */
// 带align的text
Widget textAlignBar(String txt){
return Align(
alignment: FractionalOffset.centerLeft,

View File

@ -5,11 +5,10 @@
/// email: zhu.yan@alibaba-inc.com
/// target: CheckboxListTile 的示例
import 'package:flutter_go/components/widget_demo.dart';
import 'package:flutter_markdown/flutter_markdown.dart';
import 'package:flutter/material.dart';
import 'package:flutter_markdown/flutter_markdown.dart';
import 'package:flutter_go/components/widget_demo.dart';
import './demo.dart' as CheckboxListTileDemo;
const String _CheckboxListTileText0 =
@ -53,11 +52,9 @@ class _DemoState extends State<Demo> {
}
}
/*
* 所有的 CheckboxListTile widget
* context: 运行上下文
* that: 指向有状态的 StatefulWidget
*/
// 所有的 CheckboxListTile widget
// context: 运行上下文
// that: 指向有状态的 StatefulWidget
Widget allCheckboxs(BuildContext context, _DemoState that) {
return Container(
//padding: EdgeInsets.only(bottom: 20.0, top: 20.0, left: 0, right: 0),
@ -74,9 +71,7 @@ Widget allCheckboxs(BuildContext context, _DemoState that) {
);
}
/*
* 带align的text
* */
// 带align的text
Widget textAlignBar(String txt) {
return Align(
alignment: FractionalOffset.centerLeft,

View File

@ -1,11 +1,9 @@
/**
* Created with Android Studio.
* User: 三帆
* Date: 22/11/2018
* Time: 19:37
* email: sanfan.hx@alibaba-inc.com
* target: xxx
*/
/// Created with Android Studio.
/// User: 三帆
/// Date: 22/11/2018
/// Time: 19:37
/// email: sanfan.hx@alibaba-inc.com
/// target: xxx
import 'package:flutter/material.dart';

View File

@ -1,15 +1,14 @@
/**
* Created with Android Studio.
* User: 三帆
* Date: 22/11/2018
* Time: 19:17
* email: sanfan.hx@alibaba-inc.com
* target: Radio相关
*/
/// Created with Android Studio.
/// User: 三帆
/// Date: 22/11/2018
/// Time: 19:17
/// email: sanfan.hx@alibaba-inc.com
/// target: Radio相关
import 'package:flutter/material.dart';
import 'package:flutter_go/components/widget_demo.dart';
import 'demo.dart';
const content1 = """
### **简介**
> material design 风格的单选按钮

View File

@ -1,11 +1,9 @@
/**
* Created with Android Studio.
* User: 三帆
* Date: 20/12/2018
* Time: 14:32
* email: sanfan.hx@alibaba-inc.com
* target: xxx
*/
/// Created with Android Studio.
/// User: 三帆
/// Date: 20/12/2018
/// Time: 14:32
/// email: sanfan.hx@alibaba-inc.com
/// target: xxx
import 'package:flutter/material.dart';

View File

@ -1,11 +1,9 @@
/**
* Created with Android Studio.
* User: 三帆
* Date: 22/11/2018
* Time: 19:17
* email: sanfan.hx@alibaba-inc.com
* target: Radio相关
*/
/// Created with Android Studio.
/// User: 三帆
/// Date: 22/11/2018
/// Time: 19:17
/// email: sanfan.hx@alibaba-inc.com
/// target: Radio相关
import 'package:flutter/material.dart';
import 'package:flutter_go/components/widget_demo.dart';

View File

@ -1,11 +1,9 @@
/**
* Created with Android Studio.
* User: 三帆
* Date: 20/12/2018
* Time: 17:51
* email: sanfan.hx@alibaba-inc.com
* target: xxx
*/
/// Created with Android Studio.
/// User: 三帆
/// Date: 20/12/2018
/// Time: 17:51
/// email: sanfan.hx@alibaba-inc.com
/// target: xxx
import 'package:flutter/material.dart';

View File

@ -1,11 +1,9 @@
/**
* Created with Android Studio.
* User: 三帆
* Date: 20/12/2018
* Time: 17:43
* email: sanfan.hx@alibaba-inc.com
* target: xxx
*/
/// Created with Android Studio.
/// User: 三帆
/// Date: 20/12/2018
/// Time: 17:43
/// email: sanfan.hx@alibaba-inc.com
/// target: xxx
import 'package:flutter/material.dart';
import 'package:flutter_go/components/widget_demo.dart';

View File

@ -1,11 +1,9 @@
/**
* Created with Android Studio.
* User: 三帆
* Date: 27/12/2018
* Time: 14:40
* email: sanfan.hx@alibaba-inc.com
* target: xxx
*/
/// Created with Android Studio.
/// User: 三帆
/// Date: 27/12/2018
/// Time: 14:40
/// email: sanfan.hx@alibaba-inc.com
/// target: xxx
import 'package:flutter/material.dart';

View File

@ -1,11 +1,9 @@
/**
* Created with Android Studio.
* User: 三帆
* Date: 20/12/2018
* Time: 17:43
* email: sanfan.hx@alibaba-inc.com
* target: xxx
*/
/// Created with Android Studio.
/// User: 三帆
/// Date: 20/12/2018
/// Time: 17:43
/// email: sanfan.hx@alibaba-inc.com
/// target: xxx
import 'package:flutter/material.dart';
import 'package:flutter_go/components/widget_demo.dart';

View File

@ -1,11 +1,9 @@
/**
* Created with Android Studio.
* User: 三帆
* Date: 27/12/2018
* Time: 14:40
* email: sanfan.hx@alibaba-inc.com
* target: xxx
*/
/// Created with Android Studio.
/// User: 三帆
/// Date: 27/12/2018
/// Time: 14:40
/// email: sanfan.hx@alibaba-inc.com
/// target: xxx
import 'package:flutter/material.dart';

View File

@ -1,11 +1,9 @@
/**
* Created with Android Studio.
* User: 三帆
* Date: 20/12/2018
* Time: 17:43
* email: sanfan.hx@alibaba-inc.com
* target: xxx
*/
/// Created with Android Studio.
/// User: 三帆
/// Date: 20/12/2018
/// Time: 17:43
/// email: sanfan.hx@alibaba-inc.com
/// target: xxx
import 'package:flutter/material.dart';
import 'package:flutter_go/components/widget_demo.dart';

View File

@ -1,11 +1,9 @@
/**
* Created with Android Studio.
* User: 三帆
* Date: 28/12/2018
* Time: 19:58
* email: sanfan.hx@alibaba-inc.com
* target: xxx
*/
/// Created with Android Studio.
/// User: 三帆
/// Date: 28/12/2018
/// Time: 19:58
/// email: sanfan.hx@alibaba-inc.com
/// target: xxx
import 'package:flutter/material.dart';

View File

@ -1,11 +1,9 @@
/**
* Created with Android Studio.
* User: 三帆
* Date: 28/12/2018
* Time: 19:54
* email: sanfan.hx@alibaba-inc.com
* target: xxx
*/
/// Created with Android Studio.
/// User: 三帆
/// Date: 28/12/2018
/// Time: 19:54
/// email: sanfan.hx@alibaba-inc.com
/// target: xxx
import 'package:flutter/material.dart';
import 'package:flutter_go/components/widget_demo.dart';

View File

@ -1,11 +1,9 @@
/**
* Created with Android Studio.
* User: 三帆
* Date: 27/12/2018
* Time: 17:30
* email: sanfan.hx@alibaba-inc.com
* target: xxx
*/
/// Created with Android Studio.
/// User: 三帆
/// Date: 27/12/2018
/// Time: 17:30
/// email: sanfan.hx@alibaba-inc.com
/// target: xxx
import 'package:flutter/material.dart';

View File

@ -1,11 +1,9 @@
/**
* Created with Android Studio.
* User: 三帆
* Date: 20/12/2018
* Time: 17:43
* email: sanfan.hx@alibaba-inc.com
* target: xxx
*/
/// Created with Android Studio.
/// User: 三帆
/// Date: 20/12/2018
/// Time: 17:43
/// email: sanfan.hx@alibaba-inc.com
/// target: xxx
import 'package:flutter/material.dart';
import 'package:flutter_go/components/widget_demo.dart';

View File

@ -1,11 +1,9 @@
/**
* Created with Android Studio.
* User: 三帆
* Date: 28/12/2018
* Time: 15:48
* email: sanfan.hx@alibaba-inc.com
* target: xxx
*/
/// Created with Android Studio.
/// User: 三帆
/// Date: 28/12/2018
/// Time: 15:48
/// email: sanfan.hx@alibaba-inc.com
/// target: xxx
import 'package:flutter/material.dart';

View File

@ -1,11 +1,9 @@
/**
* Created with Android Studio.
* User: 三帆
* Date: 28/12/2018
* Time: 15:48
* email: sanfan.hx@alibaba-inc.com
* target: xxx
*/
/// Created with Android Studio.
/// User: 三帆
/// Date: 28/12/2018
/// Time: 15:48
/// email: sanfan.hx@alibaba-inc.com
/// target: xxx
import 'package:flutter/material.dart';
import 'package:flutter_go/components/widget_demo.dart';

View File

@ -1,11 +1,9 @@
/**
* Created with Android Studio.
* User: 三帆
* Date: 14/01/2019
* Time: 19:02
* email: sanfan.hx@alibaba-inc.com
* target: xxx
*/
/// Created with Android Studio.
/// User: 三帆
/// Date: 14/01/2019
/// Time: 19:02
/// email: sanfan.hx@alibaba-inc.com
/// target: xxx
import 'package:flutter/material.dart';

View File

@ -1,14 +1,13 @@
/**
* Created with Android Studio.
* User: 三帆
* Date: 20/01/2019
* Time: 22:28
* email: sanfan.hx@alibaba-inc.com
* target: CupertinoTabBar
*/
/// Created with Android Studio.
/// User: 三帆
/// Date: 20/01/2019
/// Time: 22:28
/// email: sanfan.hx@alibaba-inc.com
/// target: CupertinoTabBar
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
class TextDemo extends StatefulWidget {
_Demo createState() => _Demo();

View File

@ -1,14 +1,11 @@
import 'package:flutter/widgets.dart';
/*
* Author: xiaojia.dxj
* Date: 2018/11/22
* Email: xiaojia.dxj@alibaba-inc.com
* LastUpdateTime: 2018/11/22
* LastUpdateBy: xj.deng
*
* Describle:Align描述
*/
/// Author: xiaojia.dxj
/// Date: 2018/11/22
/// Email: xiaojia.dxj@alibaba-inc.com
/// LastUpdateTime: 2018/11/22
/// LastUpdateBy: xj.deng
/// Describle:Align描述
class AlignAlignment extends StatelessWidget {
final Alignment status;

View File

@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter_markdown/flutter_markdown.dart';
import 'package:flutter_go/components/widget_demo.dart';
import './demo.dart';
@ -35,7 +35,7 @@ class _DemoState extends State<Demo> {
title: 'Align',
codeUrl: "elements/Frame/Align/Align/demo.dart",
docUrl: 'https://docs.flutter.io/flutter/widgets/Align-class.html',
contentList: [_flatText0, _alignCreate()],
contentList: [_flatText0, _alignCreate(),_flatText1,_alignCreates()],
);
}
@ -69,7 +69,16 @@ class _DemoState extends State<Demo> {
],
),
SizedBox(height: 10.0),
MarkdownBody(data: _flatText1),
],
);
}
}
Column _alignCreates(){
return Column(
children: <Widget>[
Container(
margin: EdgeInsets.only(top: 20.0, bottom: 20.0),
color: Color(0xffe91e63),
@ -84,8 +93,7 @@ class _DemoState extends State<Demo> {
AlignFactor(Alignment.topLeft, 2.0, 2.0, 'topleft'),
AlignFactor(Alignment.topRight, null, null, 'topleft'),
AlignFactor(Alignment.center, null, null, 'center'),
AlignFactor(Alignment.bottomLeft, null, null, 'bottomLeft'),
AlignFactor(Alignment.bottomLeft, null, null, 'bottomLeft')
],
);
}
}

View File

@ -1,15 +1,12 @@
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
/*
* Author: xiaojia.dxj
* Date: 2018/11/22
* Email: xiaojia.dxj@alibaba-inc.com
* LastUpdateTime: 2018/11/22
* LastUpdateBy: xj.deng
*
* Describle:ConstrainedBox描述
*/
/// Author: xiaojia.dxj
/// Date: 2018/11/22
/// Email: xiaojia.dxj@alibaba-inc.com
/// LastUpdateTime: 2018/11/22
/// LastUpdateBy: xj.deng
/// Describle:ConstrainedBox描述
class ConstrainedBoxCreate extends StatelessWidget {
final double currWidth;
final String describe;

View File

@ -1,14 +1,11 @@
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
/*
* Author: xiaojia.dxj
* Date: 2018/11/22
* Email: xiaojia.dxj@alibaba-inc.com
* LastUpdateTime: 2018/11/22
* LastUpdateBy: xj.deng
*
*/
/// Author: xiaojia.dxj
/// Date: 2018/11/22
/// Email: xiaojia.dxj@alibaba-inc.com
/// LastUpdateTime: 2018/11/22
/// LastUpdateBy: xj.deng
class DecoratedBoxCreate extends StatelessWidget {
DecoratedBoxCreate({
Key key,

View File

@ -1,15 +1,12 @@
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
/*
* Author: xiaojia.dxj
* Date: 2018/12/2
* Email: xiaojia.dxj@alibaba-inc.com
* LastUpdateTime: 2018/12/2
* LastUpdateBy: xj.deng
*
* Describle:FittedBox
*/
/// Author: xiaojia.dxj
/// Date: 2018/12/2
/// Email: xiaojia.dxj@alibaba-inc.com
/// LastUpdateTime: 2018/12/2
/// LastUpdateBy: xj.deng
/// Describle:FittedBox
class FittedBoxDefault extends StatelessWidget {
final BoxFit curfit;

View File

@ -11,30 +11,30 @@ class ColumnDefault extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Column(
/// - MainAxisAlignment.spaceEvenly/spaceAround/spaceBetween,
/// - spaceEvenly将主轴方向空白区域均分使得children之间空间相等包括首尾childre
/// - spaceAround将主轴方向空白区域均分使得children之间空间相等但是首尾childre的空白部分为一半
/// - spaceBetween将主轴方向空白区域均分使得children之间空间相等但是首尾childre靠近收尾没有空细逢
// - MainAxisAlignment.spaceEvenly/spaceAround/spaceBetween,
// - spaceEvenly将主轴方向空白区域均分使得children之间空间相等包括首尾childre
// - spaceAround将主轴方向空白区域均分使得children之间空间相等但是首尾childre的空白部分为一半
// - spaceBetween将主轴方向空白区域均分使得children之间空间相等但是首尾childre靠近收尾没有空细逢
/// - MainAxisAlignment.start/end/center,
/// - start将children放置在主轴起点方向
/// - end将children放置在主轴末尾方向
/// - center将children放置在主轴中间方向
// - MainAxisAlignment.start/end/center,
// - start将children放置在主轴起点方向
// - end将children放置在主轴末尾方向
// - center将children放置在主轴中间方向
mainAxisAlignment: MainAxisAlignment.center,
/// > mainAxisSize 属性
/// - 一行的高度是有mainAxisSize属性控制默认是max
/// - mainAxisSize: MainAxisSize.min,一行的宽度是child传入的约束
/// - mainAxisSize: MainAxisSize.max,一行的宽度的最大宽度是传入的约束。
/// > mainAxisAlignment属性
// > mainAxisSize 属性
// - 一行的高度是有mainAxisSize属性控制默认是max
// - mainAxisSize: MainAxisSize.min,一行的宽度是child传入的约束
// - mainAxisSize: MainAxisSize.max,一行的宽度的最大宽度是传入的约束。
// > mainAxisAlignment属性
/// mainAxisSize: MainAxisSize.max,
///- crossAxisAlignment: CrossAxisAlignment.center/end/start,
/// - 即,根据设定的位置交叉对齐
/// - center/end/start: children在交叉轴上居中/末端/起点 对齐展示
/// - stretch让children填满交叉轴方向
/// - baseline在交叉轴方向使得于这个baseline对齐如果主轴是垂直的那么这个值是当作开始
// mainAxisSize: MainAxisSize.max,
//- crossAxisAlignment: CrossAxisAlignment.center/end/start,
// - 即,根据设定的位置交叉对齐
// - center/end/start: children在交叉轴上居中/末端/起点 对齐展示
// - stretch让children填满交叉轴方向
// - baseline在交叉轴方向使得于这个baseline对齐如果主轴是垂直的那么这个值是当作开始
children: <Widget>[
Container(

View File

@ -8,24 +8,24 @@ import 'package:flutter/widgets.dart';
/// Describle:Row
class RowMainAxisAlignment extends StatelessWidget {
///> mainAxisAlignment属性
/// - MainAxisAlignment.spaceEvenly/spaceAround/spaceBetween,
/// - spaceEvenly将主轴方向空白区域均分使得children之间空间相等包括首尾childre
/// - spaceAround将主轴方向空白区域均分使得children之间空间相等但是首尾childre的空白部分为一半
/// - spaceBetween将主轴方向空白区域均分使得children之间空间相等但是首尾childre靠近收尾没有空细逢
/// - MainAxisAlignment.start/end/center,
/// - start将children放置在主轴起点方向
/// - end将children放置在主轴末尾方向
/// - center将children放置在主轴中间方向
//> mainAxisAlignment属性
// - MainAxisAlignment.spaceEvenly/spaceAround/spaceBetween,
// - spaceEvenly将主轴方向空白区域均分使得children之间空间相等包括首尾childre
// - spaceAround将主轴方向空白区域均分使得children之间空间相等但是首尾childre的空白部分为一半
// - spaceBetween将主轴方向空白区域均分使得children之间空间相等但是首尾childre靠近收尾没有空细逢
// - MainAxisAlignment.start/end/center,
// - start将children放置在主轴起点方向
// - end将children放置在主轴末尾方向
// - center将children放置在主轴中间方向
final MainAxisAlignment status;
/// > CrossAxisAlignment 属性
/// - crossAxisAlignment: CrossAxisAlignment.center/end/start,
/// - 即,根据设定的位置交叉对齐
/// - center/end/start: children在交叉轴上居中/末端/起点 对齐展示
/// - stretch让children填满交叉轴方向
/// - baseline在交叉轴方向使得于这个baseline对齐如果主轴是垂直的那么这个值是当作开始
// > CrossAxisAlignment 属性
// - crossAxisAlignment: CrossAxisAlignment.center/end/start,
// - 即,根据设定的位置交叉对齐
// - center/end/start: children在交叉轴上居中/末端/起点 对齐展示
// - stretch让children填满交叉轴方向
// - baseline在交叉轴方向使得于这个baseline对齐如果主轴是垂直的那么这个值是当作开始
final CrossAxisAlignment crossStatus;

View File

@ -1,9 +1,7 @@
/*
* @Author: 一凨
* @Date: 2018-11-28 20:42:40
* @Last Modified by: 一凨
* @Last Modified time: 2018-11-28 20:42:40
*/
/// @Author: 一凨
/// @Date: 2018-11-28 20:42:40
/// @Last Modified by: 一凨
/// @Last Modified time: 2018-11-28 20:42:40
import 'package:flutter/material.dart';

View File

@ -1,9 +1,7 @@
/*
* @Author: 一凨
* @Date: 2018-11-28 20:44:13
* @Last Modified by: 一凨
* @Last Modified time: 2019-01-14 17:02:20
*/
/// @Author: 一凨
/// @Date: 2018-11-28 20:44:13
/// @Last Modified by: 一凨
/// @Last Modified time: 2019-01-14 17:02:20
import 'package:flutter/material.dart';
import 'package:flutter_go/components/widget_demo.dart';
import './animatedPadding_demo.dart';

View File

@ -1,9 +1,7 @@
/*
* @Author: 一凨
* @Date: 2018-11-28 20:25:24
* @Last Modified by: 一凨
* @Last Modified time: 2019-01-14 17:01:55
*/
/// Author: 一凨
/// Date: 2018-11-28 20:25:24
/// Last Modified by: 一凨
/// Last Modified time: 2019-01-14 17:01:55
import 'package:flutter/material.dart';
import 'package:flutter_go/components/widget_demo.dart';
import './padding_demo.dart';

View File

@ -1,10 +1,9 @@
import 'package:flutter/material.dart';
/*
* @Author: 一凨
* @Date: 2018-11-28 20:20:04
* @Last Modified by: 一凨
* @Last Modified time: 2019-01-14 16:30:16
*/
////
/// @Author: 一凨
/// @Date: 2018-11-28 20:20:04
/// @Last Modified by: 一凨
/// @Last Modified time: 2019-01-14 16:30:16
class PaddingDemo extends StatelessWidget {
@override

View File

@ -1,9 +1,7 @@
/*
* @Author: 一凨
* @Date: 2018-11-28 20:26:16
* @Last Modified by: 一凨
* @Last Modified time: 2019-01-14 17:06:36
*/
/// @Author: 一凨
/// @Date: 2018-11-28 20:26:16
/// @Last Modified by: 一凨
/// @Last Modified time: 2019-01-14 17:06:36
import 'package:flutter/material.dart';
import 'package:flutter_go/components/widget_demo.dart';
import './sliverpadding_demo.dart';

View File

@ -1,9 +1,7 @@
/*
* @Author: 一凨
* @Date: 2018-11-28 20:36:17
* @Last Modified by: 一凨
* @Last Modified time: 2018-11-28 20:36:17
*/
/// @Author: 一凨
/// @Date: 2018-11-28 20:36:17
/// @Last Modified by: 一凨
/// @Last Modified time: 2018-11-28 20:36:17
import 'package:flutter/material.dart';
import 'package:flutter_go/widgets/components/Scroll/CustomScrollView/product_list.dart';

View File

@ -1,9 +1,7 @@
/*
* @Author: 一凨
* @Date: 2018-11-28 20:52:35
* @Last Modified by: 一凨
* @Last Modified time: 2018-11-28 20:59:50
*/
/// @Author: 一凨
/// @Date: 2018-11-28 20:52:35
/// @Last Modified by: 一凨
/// @Last Modified time: 2018-11-28 20:59:50
import 'package:flutter/material.dart';
class TableDemo extends StatelessWidget {

View File

@ -1,7 +1,8 @@
import 'package:flutter/material.dart';
import 'demo.dart';
import 'package:flutter_go/components/widget_demo.dart';
import 'demo.dart';
const Text = '''
### **简介**

View File

@ -1,9 +1,7 @@
/*
* @Author: 一凨
* @Date: 2018-11-16 15:09:12
* @Last Modified by: 一凨
* @Last Modified time: 2018-11-16 15:09:12
*/
/// @Author: 一凨
/// @Date: 2018-11-16 15:09:12
/// @Last Modified by: 一凨
/// @Last Modified time: 2018-11-16 15:09:12
import 'package:flutter/material.dart';
import 'package:flutter_go/components/widget_demo.dart';
import './assetImage_demo.dart';

View File

@ -1,9 +1,7 @@
/*
* @Author: 一凨
* @Date: 2018-11-16 15:09:12
* @Last Modified by: 一凨
* @Last Modified time: 2018-11-16 15:12:39
*/
/// @Author: 一凨
/// @Date: 2018-11-16 15:09:12
/// @Last Modified by: 一凨
/// @Last Modified time: 2018-11-16 15:12:39
import 'package:flutter/material.dart';
import 'package:flutter_go/components/widget_demo.dart';
import './decorationImage_demo.dart';

View File

@ -1,9 +1,7 @@
/*
* @Author: 一凨
* @Date: 2018-11-16 15:09:12
* @Last Modified by: 一凨
* @Last Modified time: 2018-11-16 15:09:12
*/
/// @Author: 一凨
/// @Date: 2018-11-16 15:09:12
/// @Last Modified by: 一凨
/// @Last Modified time: 2018-11-16 15:09:12
import 'package:flutter/material.dart';
import 'package:flutter_go/components/widget_demo.dart';

View File

@ -1,9 +1,7 @@
/*
* @Author: 一凨
* @Date: 2018-12-08 13:29:34
* @Last Modified by: 一凨
* @Last Modified time: 2018-12-08 14:12:21
*/
/// @Author: 一凨
/// @Date: 2018-12-08 13:29:34
/// @Last Modified by: 一凨
/// @Last Modified time: 2018-12-08 14:12:21
import 'package:flutter/material.dart';
import 'package:flutter_go/components/widget_demo.dart';
import './exact_asset_image_demo.dart';

View File

@ -1,9 +1,7 @@
/*
* @Author: 一凨
* @Date: 2018-12-08 16:08:41
* @Last Modified by: 一凨
* @Last Modified time: 2018-12-08 16:22:50
*/
/// @Author: 一凨
/// @Date: 2018-12-08 16:08:41
/// @Last Modified by: 一凨
/// @Last Modified time: 2018-12-08 16:22:50
import 'package:flutter/material.dart';
class FadeInImageDemo extends StatelessWidget {

View File

@ -1,9 +1,7 @@
/*
* @Author: 一凨
* @Date: 2018-12-08 14:26:00
* @Last Modified by: 一凨
* @Last Modified time: 2018-12-08 16:10:55
*/
/// @Author: 一凨
/// @Date: 2018-12-08 14:26:00
/// @Last Modified by: 一凨
/// @Last Modified time: 2018-12-08 16:10:55
import 'package:flutter/material.dart';
import 'package:flutter_go/components/widget_demo.dart';

View File

@ -1,9 +1,7 @@
/*
* @Author: 一凨
* @Date: 2018-12-08 16:20:17
* @Last Modified by: 一凨
* @Last Modified time: 2018-12-08 17:18:39
*/
/// @Author: 一凨
/// @Date: 2018-12-08 16:20:17
/// @Last Modified by: 一凨
/// @Last Modified time: 2018-12-08 17:18:39
import 'dart:async';

View File

@ -1,9 +1,7 @@
/*
* @Author: 一凨
* @Date: 2018-12-08 16:20:33
* @Last Modified by: 一凨
* @Last Modified time: 2018-12-08 19:24:33
*/
/// @Author: 一凨
/// @Date: 2018-12-08 16:20:33
/// @Last Modified by: 一凨
/// @Last Modified time: 2018-12-08 19:24:33
import 'package:flutter/material.dart';
import 'package:flutter_go/components/widget_demo.dart';

View File

@ -1,9 +1,7 @@
/*
* @Author: 一凨
* @Date: 2019-01-07 15:33:49
* @Last Modified by: 一凨
* @Last Modified time: 2019-01-07 15:45:29
*/
/// @Author: 一凨
/// @Date: 2019-01-07 15:33:49
/// @Last Modified by: 一凨
/// @Last Modified time: 2019-01-07 15:45:29
import 'package:flutter/material.dart';
class ImageDemo extends StatelessWidget {

View File

@ -1,9 +1,7 @@
/*
* @Author: 一凨
* @Date: 2019-01-07 15:33:42
* @Last Modified by: 一凨
* @Last Modified time: 2019-01-07 15:42:54
*/
/// @Author: 一凨
/// @Date: 2019-01-07 15:33:42
/// @Last Modified by: 一凨
/// @Last Modified time: 2019-01-07 15:42:54
import 'package:flutter/material.dart';
import './demo.dart';
import 'package:flutter_go/components/widget_demo.dart';

View File

@ -1,9 +1,7 @@
/*
* @Author: 一凨
* @Date: 2018-11-16 15:09:12
* @Last Modified by: 一凨
* @Last Modified time: 2018-12-08 20:48:28
*/
/// @Author: 一凨
/// @Date: 2018-11-16 15:09:12
/// @Last Modified by: 一凨
/// @Last Modified time: 2018-12-08 20:48:28
import 'package:flutter/material.dart';
import 'package:flutter_go/components/widget_demo.dart';
import './memory_image_demo.dart';

View File

@ -1,13 +1,13 @@
/*
* @Author: 一凨
* @Date: 2018-12-08 17:49:19
* @Last Modified by: 一凨
* @Last Modified time: 2018-12-08 20:46:37
*/
/// @Author: 一凨
/// @Date: 2018-12-08 17:49:19
/// @Last Modified by: 一凨
/// @Last Modified time: 2018-12-08 20:46:37
import 'dart:typed_data';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart' show rootBundle;
import 'dart:typed_data';
class MemoryImageDemo extends StatefulWidget {
_MemoryImageDemoState createState() => _MemoryImageDemoState();

View File

@ -1,9 +1,7 @@
/*
* @Author: 一凨
* @Date: 2018-11-16 15:09:12
* @Last Modified by: 一凨
* @Last Modified time: 2018-12-08 17:32:57
*/
/// @Author: 一凨
/// @Date: 2018-11-16 15:09:12
/// @Last Modified by: 一凨
/// @Last Modified time: 2018-12-08 17:32:57
import 'package:flutter/material.dart';
import 'package:flutter_go/components/widget_demo.dart';
import './network_image_demo.dart';

View File

@ -1,9 +1,7 @@
/*
* @Author: 一凨
* @Date: 2018-12-08 17:20:37
* @Last Modified by: 一凨
* @Last Modified time: 2018-12-08 17:35:36
*/
/// @Author: 一凨
/// @Date: 2018-12-08 17:20:37
/// @Last Modified by: 一凨
/// @Last Modified time: 2018-12-08 17:35:36
import 'package:flutter/material.dart';
class NetworkImageDemo extends StatelessWidget {

View File

@ -1,9 +1,7 @@
/*
* @Author: 一凨
* @Date: 2018-11-16 15:09:12
* @Last Modified by: 一凨
* @Last Modified time: 2018-12-08 20:11:44
*/
/// @Author: 一凨
/// @Date: 2018-11-16 15:09:12
/// @Last Modified by: 一凨
/// @Last Modified time: 2018-12-08 20:11:44
import 'package:flutter/material.dart';
import './raw_image_demo.dart';
import 'package:flutter_go/components/widget_demo.dart';

View File

@ -1,9 +1,7 @@
/*
* @Author: 一凨
* @Date: 2018-12-08 17:47:25
* @Last Modified by: 一凨
* @Last Modified time: 2018-12-08 20:09:32
*/
/// @Author: 一凨
/// @Date: 2018-12-08 17:47:25
/// @Last Modified by: 一凨
/// @Last Modified time: 2018-12-08 20:09:32
import 'dart:async';
import 'package:flutter/material.dart';

View File

@ -1,9 +1,7 @@
/*
* @Author: 一凨
* @Date: 2018-11-16 15:09:12
* @Last Modified by: 一凨
* @Last Modified time: 2018-12-08 20:19:01
*/
/// @Author: 一凨
/// @Date: 2018-11-16 15:09:12
/// @Last Modified by: 一凨
/// @Last Modified time: 2018-12-08 20:19:01
import 'package:flutter/material.dart';
import 'package:flutter_go/components/widget_demo.dart';

View File

@ -1,9 +1,7 @@
/*
* @Author: 一凨
* @Date: 2018-12-08 17:46:57
* @Last Modified by: 一凨
* @Last Modified time: 2018-12-08 17:46:57
*/
/// @Author: 一凨
/// @Date: 2018-12-08 17:46:57
/// @Last Modified by: 一凨
/// @Last Modified time: 2018-12-08 17:46:57
import 'package:flutter/material.dart';
class PaintImageDemo extends StatelessWidget {

View File

@ -1,9 +1,7 @@
/*
* @Author: 一凨
* @Date: 2018-11-16 15:09:12
* @Last Modified by: 一凨
* @Last Modified time: 2018-11-16 15:09:12
*/
/// @Author: 一凨
/// @Date: 2018-11-16 15:09:12
/// @Last Modified by: 一凨
/// @Last Modified time: 2018-11-16 15:09:12
import 'package:flutter/material.dart';
class Demo extends StatefulWidget {

View File

@ -1,9 +1,7 @@
/*
* @Author: 一凨
* @Date: 2018-12-08 17:47:57
* @Last Modified by: 一凨
* @Last Modified time: 2018-12-08 17:48:20
*/
/// @Author: 一凨
/// @Date: 2018-12-08 17:47:57
/// @Last Modified by: 一凨
/// @Last Modified time: 2018-12-08 17:48:20
import 'package:flutter/material.dart';
class PrecacheImageDemo extends StatelessWidget {