Files
2019-02-19 11:53:15 +08:00

46 lines
1.7 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-20 14:18:36
/// @Last Modified by: 一凨
/// @Last Modified time: 2018-12-20 14:19:15
import 'package:flutter/material.dart';
import 'package:flutter_go/components/widget_demo.dart';
import './demo.dart';
const String content0 = '''
### **简介**
> 一个可以嵌在另一个滚动视图中的Scroll view本质上他们的滚动是连接着的
- 最常见的用例就是一个可滚动的视图,包含一个 flexible SliverAppBar并且包含TabBar和TabBarView
- 在普通的ScrollView中包含一系列 slivers ,会出现滚动冲突的问题
- NestedScrollView 通过为外部ScrollView和内部的ScrollViews提供自定义的ScrollController来解决滚动冲突的问题将他们“连接”起来以便他们滚动时看起来更像是一个整体
''';
const String content1 = '''
### **基本用法**
> Demo演示NestedScrollView最常见的使用实例
- 头部为一个SliverAppBar折叠部分的内容都放在了flexibleSpace中
- 由 headerSliverBuilder 构建出来一个包含TabBar的SliverAppBar并且在body中包含 TabBarView
''';
class Demo extends StatefulWidget {
static const String routeName = '/components/Scroll/NestedScrollView';
_DemoState createState() => _DemoState();
}
class _DemoState extends State<Demo> {
@override
Widget build(BuildContext context) {
return WidgetDemo(
codeUrl: 'components/Scroll/NestedScrollView/demo.dart',
docUrl:
'https://docs.flutter.io/flutter/widgets/NestedScrollView-class.html',
contentList: [
content0,
content1,
NestedScrollViewDemo(),
],
title: 'NestedScrollView',
);
}
}