Files
ryan d48942b55d refactor(many files): 页面部分的文件结构调整
1.views 文件夹里面分类,页面相关文件;2.公共组件全部放在components里;3.创建resources文件夹放置资源dart文件4.修改二级菜单文字大小

BREAKING CHANGE: 重构,建议删除本地db,再编译
2019-01-28 17:45:18 +08:00

106 lines
2.9 KiB
Dart
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* @Author: xiaojia.dxj
* @Date: 2019-01-08 15:55:31
* @Last Modified by: xiaojia.dxj
* @Last Modified time: 2019-01-08 15:55:31
*/
import 'package:flutter/material.dart';
import 'package:flutter_go/components/widget_demo.dart';
import './demo.dart' as sizeBox;
// const String _Text = """### **SizeBox简介**
// > 常用的一个控件,设置具体尺寸。
// - sizebox设置widthheight时候强制child宽高为该设置
// - sizebox的widthheigh为nullchild自身设置
// ### **属性**
// > width
// > height
// - ex:200*50 sizebox
// """;
const String _Text0 = """### **简介**
> 一个特定大小的窗口小部件,将其原始约束传递给其子节点,可能会溢出。
### **基本用法**
> alignment对齐
> size 设置部件大小
- ex:为方便看效果,现设置幕布大小为(Container)200*50。图一
- ex:图一基础上添加一个不设置size属性的SizeOverflowBox。图二
- ex:图二添加size属性100*20,图三
- ex:图三,添加 alignment: Alignment.center,
""";
class Demo extends StatefulWidget {
static const String routeName = '/element/Frame/Box/SizeOverflowBox';
_DemoState createState() => _DemoState();
}
class _DemoState extends State<Demo> {
@override
Widget build(BuildContext context) {
return WidgetDemo(
title: 'SizeOverflowBox',
codeUrl: 'elements/Frame/Box/SizedOverflowBox/demo.dart',
contentList: [
// _Text,
_Text0,
_sizedOverflowBoxCreate(),
],
docUrl: 'https://docs.flutter.io/flutter/widgets/SizedBox-class.html',
);
}
Column _sizedOverflowBoxCreate() {
return new Column(
children: <Widget>[
sizeBox.SizeBoxDefault(
curWidth: 200.0,
curHeight: 50.0,
),
SizedBox(height: 20.0),
Container(
margin: new EdgeInsets.only(top: 10.0),
color: Color(0xffd81b60),
width: 200.0,
height: 50.0,
),
Container(
margin: new EdgeInsets.only(top: 10.0),
color: Color(0xffd81b60),
alignment: Alignment.topCenter,
width: 200.0,
height: 50.0,
child: sizeBox.SizeOverflowBoxDefault(
text: "SizeBox",
),
),
Container(
margin: new EdgeInsets.only(top: 10.0),
color: Color(0xffd81b60),
width: 200.0,
height: 50.0,
child: sizeBox.SizeOverflowBoxDefault(
text: "box",
curSizeWidth: 100.0,
curSizeHeight: 20.0,
),
),
Container(
margin: new EdgeInsets.only(top: 10.0),
color: Color(0xffd81b60),
width: 200.0,
height: 50.0,
alignment: Alignment.center,
child: sizeBox.SizeOverflowBoxDefault(
text: "box",
curSizeWidth: 100.0,
curSizeHeight: 20.0,
),
),
],
);
}
}