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

70 lines
1.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:56:53
* @Last Modified by: xiaojia.dxj
* @Last Modified time: 2019-01-08 15:56:53
*/
import 'package:flutter/material.dart';
import 'package:flutter_go/components/widget_demo.dart';
import 'demo.dart';
const String _Text = '''
### **简介**
> 添加额外的限制条件到child上
- 比如说你限制child最小高度为50.0像素就可以用constraints: const BoxConstraints(minHeight50
''';
const String _Text1 = '''
### **基本用法**
> 添加额外的限制条件到child上
- ex:添加ConstrainedBox约束如下传入不同Width约束的Container效果
minWidth: 100.0,
minHeight: 20.0,
maxWidth: 300.0,
maxHeight: 50.0
''';
class Demo extends StatefulWidget {
static const String routeName = '/element/Frame/Box/ConstrainedBox';
_DemoState createState() => _DemoState();
}
class _DemoState extends State<Demo> {
@override
Widget build(BuildContext context) {
return WidgetDemo(
title: 'ConstrainedBox',
codeUrl: 'elements/Frame/Box/ConstrainedBox/demo.dart',
contentList: [
_Text,
_Text1,
// maxWidth: 300.0,
ConstrainedBoxCreate(currWidth: 500, describe: "currWidth>maxWidth"),
SizedBox(
height: 10.0,
),
ConstrainedBoxCreate(currWidth: 300, describe: "currWidth=maxWidth"),
SizedBox(
height: 10.0,
),
ConstrainedBoxCreate(currWidth: 200, describe: "currWidth<maxWidth"),
SizedBox(
height: 10.0,
),
// minWidth: 100.0,
ConstrainedBoxCreate(currWidth: 150, describe: "currWidth>minWidth"),
SizedBox(
height: 10.0,
),
ConstrainedBoxCreate(currWidth: 100, describe: "currWidth=minWidth"),
],
docUrl:
'https://docs.flutter.io/flutter/widgets/ConstrainedBox-class.html',
);
}
}