我想在 flutter 中更改 PopupMenuButton 的形状,想在顶部添加一个三角形,如下图所示,我在 google 上花了很多时间,但没有取得任何成就,请帮助我,我是 flutter 新手,所以我不这样做知道如何更改此默认容器,现在它只有白色圆形容器,白色箭头/三角形未添加在其顶部。请帮忙,提前致谢
popUpMenu= PopupMenuButton<String>(
key: _menuKey,
offset: Offset(50,100),
padding: EdgeInsets.all(0.0),
onSelected: (value) {
if (value == "Tax & Additional Charges") {
endDrawerController.drawerKey.value =
EndDrawerKeys.TaxAndAdditionalChargesEndDrawer;
endDrawerController.scaffoldKey.currentState.openEndDrawer();
print("Entering in tax");
} else if (value == "Hold this Invoice") {
endDrawerController.drawerKey.value =
EndDrawerKeys.HoldInvoiceEndDrawer;
endDrawerController.scaffoldKey.currentState.openEndDrawer();
}
},
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(10.h))),
itemBuilder: (context) => [
PopupMenuItem(
value: "Tax & Additional Charges",
child: popUpMenuSingleItem(
icon: AppAssets.DeliveryIcon,
text: "Tax & Additional Charges",
topMargin: 15.h),
),
PopupMenuItem(
value: "Hold this …Run Code Online (Sandbox Code Playgroud) 我知道一个等边三角形的中心(cx,cy)和外接它的蓝色圆圈的半径(r)。
如果我画一个任意半径(半径)的绿色圆,假设这个圆足够大有这个交点,我能得到6个交点(P1、P2、P3...)的坐标吗?

我正在寻找 P5JS/processing 但任何其他线索都可以帮助我......
先感谢您
我正在研究仅使用算术运算符和单个 for 循环从整数构建弗洛伊德三角形的挑战。有数百个使用双 for 循环和字符串操作的教程,但我还没有看到任何使用数学的教程。
使用重复整数的输出示例:
1
22
333
4444
Run Code Online (Sandbox Code Playgroud)
我正在接近解决方案逻辑,如下所示:
1 * (1) = 1
2 * (1 + 10) = 22
3 * (1 + 10 + 100) = 333
Run Code Online (Sandbox Code Playgroud)
作为一个 Python 新手,我无法构建逻辑循环。有什么想法或替代方法吗?这里不允许进行字符串运算,只有数学运算!