forked from lxm_flutter/FlutterUnit
代码格式优化完毕
This commit is contained in:
@@ -20,6 +20,8 @@ import 'package:flutter/material.dart';
|
||||
// }
|
||||
|
||||
class NestedScrollViewViewportDemo extends StatelessWidget {
|
||||
const NestedScrollViewViewportDemo({Key? key}) : super(key: key);
|
||||
|
||||
final String info =
|
||||
'NestedScrollViewViewport 在源码中只有一处使用:'
|
||||
'_NestedScrollViewCustomScrollView 继承自 CustomScrollView,复写了 buildViewport 方法,返回 NestedScrollViewViewport 。'
|
||||
@@ -27,12 +29,13 @@ class NestedScrollViewViewportDemo extends StatelessWidget {
|
||||
'NestedScrollViewViewport 的特点是持有 SliverOverlapAbsorberHandle 类对象 handle,源码中该 handle 在 NestedScrollViewState 中初始化。'
|
||||
'可通过上下文获取,用于 SliverOverlapAbsorber/SliverOverlapInjector 组件,使用详见相关组件。';
|
||||
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
color: Colors.blue.withOpacity(0.1),
|
||||
padding: EdgeInsets.all(10),
|
||||
margin: EdgeInsets.all(10),
|
||||
padding: const EdgeInsets.all(10),
|
||||
margin: const EdgeInsets.all(10),
|
||||
child: Text(info),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user