Files
2021-04-03 19:41:21 +08:00

34 lines
1.2 KiB
Dart
Raw Permalink 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.
import 'package:flutter/material.dart';
/// create by 张风捷特烈 on 2020/9/21
/// contact me by email 1981462002@qq.com
/// 说明: 289 RenderObjectToWidgetAdapter 根组件 RenderObject 和 Element 树的桥梁。
///
// {
// "widgetId": 289,
// "name": 'RenderObjectToWidgetAdapter 介绍',
// "priority": 1,
// "subtitle":
// "【container】 : 渲染对象 【RenderObjectWithChildMixin<T>】\n"
// "【child】 : 子组件 【Widget】\n"
// "【debugShortDescription】 : 调试简介 【String】",
// }
class RenderObjectToWidgetAdapterDemo extends StatelessWidget {
final String info =
'该组件并没有什么太大的使用价值,但却非常有纪念意义。它是 Flutter 框架中最顶层的 Widget它的 child 是 runApp 传入的组件,在 attachRootWidget 方法中被实例化。'
'它持有根渲染对象 RenderView ,负责创建根元素 RenderObjectToWidgetElement是一个无名英雄一个深藏功与名的组件。';
@override
Widget build(BuildContext context) {
return Container(
color: Colors.blue.withOpacity(0.1),
padding: EdgeInsets.all(10),
margin: EdgeInsets.all(10),
child: Text(info),
);
}
}