要构建类似的东西 - 您至少需要 2 个四边形贝塞尔曲线和一个立方体。
我已经举了一个例子来说明如何获得一个看起来与图像上最相似的结果,但它可能需要更多的微调来满足您的需求。
代码没有提供注释,但您可以通过更改变量和刷新应用程序来了解这个想法(您至少需要贝塞尔线如何工作的基本知识)。

import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
appBar: AppBar(
backgroundColor: Colors.blue,
shape: CustomShapeBorder(),
leading: Icon(Icons.menu),
actions: <Widget>[
IconButton(icon: Icon(Icons.notifications),onPressed: (){},)
],
),
body: Container(),
),
);
}
}
class CustomShapeBorder extends ContinuousRectangleBorder {
@override
Path getOuterPath(Rect rect, {TextDirection textDirection}) {
final double innerCircleRadius = 150.0;
Path path = Path();
path.lineTo(0, rect.height);
path.quadraticBezierTo(rect.width / 2 - (innerCircleRadius / 2) - 30, rect.height + 15, rect.width / 2 - 75, rect.height + 50);
path.cubicTo(
rect.width / 2 - 40, rect.height + innerCircleRadius - 40,
rect.width / 2 + 40, rect.height + innerCircleRadius - 40,
rect.width / 2 + 75, rect.height + 50
);
path.quadraticBezierTo(rect.width / 2 + (innerCircleRadius / 2) + 30, rect.height + 15, rect.width, rect.height);
path.lineTo(rect.width, 0.0);
path.close();
return path;
}
}