Skip to content

Commit

Permalink
流水线提交生成代码
Browse files Browse the repository at this point in the history
  • Loading branch information
Luozf12345 committed Jul 24, 2024
1 parent 9053a09 commit cbc5524
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 24 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Widget _buildBaseSimple(BuildContext context) {
/// 获取navBar尺寸
var renderBox = navBarkey.currentContext!.findRenderObject() as RenderBox;
var renderBox = navBarkey.currentContext?.findRenderObject() as RenderBox?;
return TDButton(
text: '基础抽屉',
isBlock: true,
Expand All @@ -12,7 +12,7 @@ Widget _buildBaseSimple(BuildContext context) {
TDDrawer(
context,
visible: true,
drawerTop: renderBox.size.height,
drawerTop: renderBox?.size.height,
items: List.generate(30, (index) => TDDrawerItem(title: '菜单${_nums[index]}')).toList(),
onItemClick: (index, item) {
print('drawer item被点击,index:$index,title:${item.title}');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Widget _buildBottomSimple(BuildContext context) {
/// 获取navBar尺寸
var renderBox = navBarkey.currentContext!.findRenderObject() as RenderBox;
var renderBox = navBarkey.currentContext?.findRenderObject() as RenderBox?;
return TDButton(
text: '带底部插槽样式',
isBlock: true,
Expand All @@ -12,7 +12,7 @@ Widget _buildBottomSimple(BuildContext context) {
TDDrawer(
context,
visible: true,
drawerTop: renderBox.size.height,
drawerTop: renderBox?.size.height,
title: '标题',
placement: TDDrawerPlacement.left,
items: List.generate(10, (index) => TDDrawerItem(title: '菜单${_nums[index]}')).toList(),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Widget _buildIconSimple(BuildContext context) {
/// 获取navBar尺寸
var renderBox = navBarkey.currentContext!.findRenderObject() as RenderBox;
var renderBox = navBarkey.currentContext?.findRenderObject() as RenderBox?;
return TDButton(
text: '带图标抽屉',
isBlock: true,
Expand All @@ -12,7 +12,7 @@ Widget _buildIconSimple(BuildContext context) {
TDDrawer(
context,
visible: true,
drawerTop: renderBox.size.height,
drawerTop: renderBox?.size.height,
items: List.generate(30, (index) => TDDrawerItem(title: '菜单${_nums[index]}', icon: const Icon(TDIcons.app))).toList(),
);
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Widget _buildTitleSimple(BuildContext context) {
/// 获取navBar尺寸
var renderBox = navBarkey.currentContext!.findRenderObject() as RenderBox;
var renderBox = navBarkey.currentContext?.findRenderObject() as RenderBox?;
return TDButton(
text: '带图标抽屉',
isBlock: true,
Expand All @@ -12,7 +12,7 @@ Widget _buildTitleSimple(BuildContext context) {
TDDrawer(
context,
visible: true,
drawerTop: renderBox.size.height,
drawerTop: renderBox?.size.height,
title: '标题',
placement: TDDrawerPlacement.left,
items: List.generate(10, (index) => TDDrawerItem(title: '菜单${_nums[index]}')).toList(),
Expand Down
32 changes: 16 additions & 16 deletions tdesign-site/src/drawer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import 'package:tdesign_flutter/tdesign_flutter.dart';
<pre slot="Dart" lang="javascript">
Widget _buildBaseSimple(BuildContext context) {
/// 获取navBar尺寸
var renderBox = navBarkey.currentContext!.findRenderObject() as RenderBox;
var renderBox = navBarkey.currentContext?.findRenderObject() as RenderBox?;
return TDButton(
text: '基础抽屉',
isBlock: true,
Expand All @@ -39,7 +39,7 @@ Widget _buildBaseSimple(BuildContext context) {
TDDrawer(
context,
visible: true,
drawerTop: renderBox.size.height,
drawerTop: renderBox?.size.height,
items: List.generate(30, (index) => TDDrawerItem(title: '菜单${_nums[index]}')).toList(),
onItemClick: (index, item) {
print('drawer item被点击,index:$index,title:${item.title}');
Expand All @@ -58,7 +58,7 @@ Widget _buildBaseSimple(BuildContext context) {
<pre slot="Dart" lang="javascript">
Widget _buildBaseSimple(BuildContext context) {
/// 获取navBar尺寸
var renderBox = navBarkey.currentContext!.findRenderObject() as RenderBox;
var renderBox = navBarkey.currentContext?.findRenderObject() as RenderBox?;
return TDButton(
text: '基础抽屉',
isBlock: true,
Expand All @@ -69,7 +69,7 @@ Widget _buildBaseSimple(BuildContext context) {
TDDrawer(
context,
visible: true,
drawerTop: renderBox.size.height,
drawerTop: renderBox?.size.height,
items: List.generate(30, (index) => TDDrawerItem(title: '菜单${_nums[index]}')).toList(),
onItemClick: (index, item) {
print('drawer item被点击,index:$index,title:${item.title}');
Expand All @@ -90,7 +90,7 @@ Widget _buildBaseSimple(BuildContext context) {
<pre slot="Dart" lang="javascript">
Widget _buildIconSimple(BuildContext context) {
/// 获取navBar尺寸
var renderBox = navBarkey.currentContext!.findRenderObject() as RenderBox;
var renderBox = navBarkey.currentContext?.findRenderObject() as RenderBox?;
return TDButton(
text: '带图标抽屉',
isBlock: true,
Expand All @@ -101,7 +101,7 @@ Widget _buildIconSimple(BuildContext context) {
TDDrawer(
context,
visible: true,
drawerTop: renderBox.size.height,
drawerTop: renderBox?.size.height,
items: List.generate(30, (index) => TDDrawerItem(title: '菜单${_nums[index]}', icon: const Icon(TDIcons.app))).toList(),
);
},
Expand All @@ -117,7 +117,7 @@ Widget _buildIconSimple(BuildContext context) {
<pre slot="Dart" lang="javascript">
Widget _buildIconSimple(BuildContext context) {
/// 获取navBar尺寸
var renderBox = navBarkey.currentContext!.findRenderObject() as RenderBox;
var renderBox = navBarkey.currentContext?.findRenderObject() as RenderBox?;
return TDButton(
text: '带图标抽屉',
isBlock: true,
Expand All @@ -128,7 +128,7 @@ Widget _buildIconSimple(BuildContext context) {
TDDrawer(
context,
visible: true,
drawerTop: renderBox.size.height,
drawerTop: renderBox?.size.height,
items: List.generate(30, (index) => TDDrawerItem(title: '菜单${_nums[index]}', icon: const Icon(TDIcons.app))).toList(),
);
},
Expand All @@ -147,7 +147,7 @@ Widget _buildIconSimple(BuildContext context) {
<pre slot="Dart" lang="javascript">
Widget _buildTitleSimple(BuildContext context) {
/// 获取navBar尺寸
var renderBox = navBarkey.currentContext!.findRenderObject() as RenderBox;
var renderBox = navBarkey.currentContext?.findRenderObject() as RenderBox?;
return TDButton(
text: '带图标抽屉',
isBlock: true,
Expand All @@ -158,7 +158,7 @@ Widget _buildTitleSimple(BuildContext context) {
TDDrawer(
context,
visible: true,
drawerTop: renderBox.size.height,
drawerTop: renderBox?.size.height,
title: '标题',
placement: TDDrawerPlacement.left,
items: List.generate(10, (index) => TDDrawerItem(title: '菜单${_nums[index]}')).toList(),
Expand All @@ -176,7 +176,7 @@ Widget _buildTitleSimple(BuildContext context) {
<pre slot="Dart" lang="javascript">
Widget _buildTitleSimple(BuildContext context) {
/// 获取navBar尺寸
var renderBox = navBarkey.currentContext!.findRenderObject() as RenderBox;
var renderBox = navBarkey.currentContext?.findRenderObject() as RenderBox?;
return TDButton(
text: '带图标抽屉',
isBlock: true,
Expand All @@ -187,7 +187,7 @@ Widget _buildTitleSimple(BuildContext context) {
TDDrawer(
context,
visible: true,
drawerTop: renderBox.size.height,
drawerTop: renderBox?.size.height,
title: '标题',
placement: TDDrawerPlacement.left,
items: List.generate(10, (index) => TDDrawerItem(title: '菜单${_nums[index]}')).toList(),
Expand All @@ -207,7 +207,7 @@ Widget _buildTitleSimple(BuildContext context) {
<pre slot="Dart" lang="javascript">
Widget _buildBottomSimple(BuildContext context) {
/// 获取navBar尺寸
var renderBox = navBarkey.currentContext!.findRenderObject() as RenderBox;
var renderBox = navBarkey.currentContext?.findRenderObject() as RenderBox?;
return TDButton(
text: '带底部插槽样式',
isBlock: true,
Expand All @@ -218,7 +218,7 @@ Widget _buildBottomSimple(BuildContext context) {
TDDrawer(
context,
visible: true,
drawerTop: renderBox.size.height,
drawerTop: renderBox?.size.height,
title: '标题',
placement: TDDrawerPlacement.left,
items: List.generate(10, (index) => TDDrawerItem(title: '菜单${_nums[index]}')).toList(),
Expand All @@ -242,7 +242,7 @@ Widget _buildBottomSimple(BuildContext context) {
<pre slot="Dart" lang="javascript">
Widget _buildBottomSimple(BuildContext context) {
/// 获取navBar尺寸
var renderBox = navBarkey.currentContext!.findRenderObject() as RenderBox;
var renderBox = navBarkey.currentContext?.findRenderObject() as RenderBox?;
return TDButton(
text: '带底部插槽样式',
isBlock: true,
Expand All @@ -253,7 +253,7 @@ Widget _buildBottomSimple(BuildContext context) {
TDDrawer(
context,
visible: true,
drawerTop: renderBox.size.height,
drawerTop: renderBox?.size.height,
title: '标题',
placement: TDDrawerPlacement.left,
items: List.generate(10, (index) => TDDrawerItem(title: '菜单${_nums[index]}')).toList(),
Expand Down

0 comments on commit cbc5524

Please sign in to comment.