代码格式优化完毕

This commit is contained in:
toly
2022-03-26 21:25:40 +08:00
parent 36b5adbd7b
commit 59f8125e1a
265 changed files with 1684 additions and 1494 deletions

View File

@@ -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),
);
}