BuildCustomChild typedef

BuildCustomChild = Widget? Function(BuildContext context, bool isHover)

create_user: zhengzaihong email:1096877329@qq.com create_date: 2024/2/2 create_time: 16:51 describe: 仿前端 js 鼠标事件可修改文字样式的文本组件

自定义内部子组件

Implementation

// 基础示例:
//     TextExtend(
//         "测试文本鼠标效果 item $index",
//         onTap: (){
//
//         },
//         isSelectable: false,
//         padding: const EdgeInsets.only(left: 20,right: 20,top: 10,bottom: 10),
//         onHoverPadding: const EdgeInsets.only(left: 20,right: 20,top: 10,bottom: 10),
//         borderRadius: BorderRadius.circular(50),
//         splashColor: Colors.purple,
//         highlightColor: Colors.purple,
//         onHoverPrefix: const Icon(Icons.access_alarm),
//         onHoverSuffix:const Icon(Icons.account_circle,color: Colors.blue),
//         suffix: const Icon(Icons.account_circle),
//         decoration: BoxDecoration(
//             color: Colors.transparent,
//             borderRadius: BorderRadius.circular(50),
//             border: Border.all(
//                 color: Colors.purple,
//                 width: 1
//             )
//         ),
//         onHoverDecoration: BoxDecoration(
//             color: Colors.white,
//             borderRadius: BorderRadius.circular(50),
//             border: Border.all(
//                 color: Colors.white,
//                 width: 1
//             )
//         ),
//         style: const TextStyle(
//             fontSize: 18,
//             color: Colors.black,
//             fontWeight: FontWeight.bold
//         ),
//         onHoverStyle: const TextStyle(
//             fontSize: 18,
//             color: Colors.blue,
//             fontWeight: FontWeight.bold
//         ),
//       )

///自定义内部子组件
typedef BuildCustomChild = Widget? Function(BuildContext context,bool isHover);