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

55 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: 一凨
* @Date: 2018-12-10 20:30:53
* @Last Modified by: 一凨
* @Last Modified time: 2018-12-14 20:36:57
*/
import 'package:flutter/material.dart';
import 'package:flutter_go/components/widget_demo.dart';
import './demo.dart';
const String contentText0 = '''
### **简介**
> 一个可以使内容滚动的Widget
可滚动的 widget 包含三部分
- 一个Scrollable的widget可以用来监听用户的一些手势事件
- 例如Viewport和ShrinkWrappingViewport的视图widget可以通过在滚动视图中仅展示部分widget来进行可视化设计
- 一个或者多个组件,可以通过组合来实现各种滚动效果。例如列表、网格等
''';
const String contentText1 = '''
### **基本用法**
> ScrollView 属于抽象类,不能直接实例化.
例如ListView widget是通过继承 BoxScrollView 然后BoxScrollView通过继承ScrollView来实现继承
- ListView 一个常用的ScrollView,它显示子窗口小部件的滚动线性列表
- PageView同样是一个可滚动的视图列表但是他每一个子widget都是视口窗口的大小
- GridView: 一个显示二维子widget的ScrollView
- CustomScrollView: 一个使用 Slivers来创建各种自定义滚动效果的ScrollView
- SingleChildScrollView一个只有一个子widget的ScrollView
- ScrollNotification、NotificationListener它可以用于在不使用ScrollController的情况下查看滚动位置的widget
''';
class Demo extends StatefulWidget {
static const String routeName = '/components/Scroll/ScrollView';
_DemoState createState() => _DemoState();
}
class _DemoState extends State<Demo> {
@override
Widget build(BuildContext context) {
return WidgetDemo(
codeUrl: 'components/Scroll/ScrollView/demo.dart',
contentList: [
contentText0,
contentText1,
ScrollViewDemo(),
],
docUrl: 'https://docs.flutter.io/flutter/widgets/ScrollView-class.html',
title: 'ScrollView',
);
}
}