|
|
@@ -36,37 +36,44 @@ class RecordPage extends BasePage<RecordController> {
|
|
|
|
|
|
@override
|
|
|
Widget buildBody(BuildContext context) {
|
|
|
- return Stack(alignment: Alignment.bottomCenter, children: [
|
|
|
- _buildBottomGradient(),
|
|
|
- Scaffold(
|
|
|
- appBar: AppBar(
|
|
|
- leading: IconButton(
|
|
|
- icon: const Icon(Icons.arrow_back_ios_new_rounded),
|
|
|
- color: ColorName.white,
|
|
|
- onPressed: () {
|
|
|
- controller.onBackClick();
|
|
|
- },
|
|
|
+ return PopScope(
|
|
|
+ canPop: false,
|
|
|
+ onPopInvokedWithResult: (bool didPop, dynamic result) async {
|
|
|
+ await controller.canPop();
|
|
|
+ Get.back();
|
|
|
+ },
|
|
|
+ child: Stack(alignment: Alignment.bottomCenter, children: [
|
|
|
+ _buildBottomGradient(),
|
|
|
+ Scaffold(
|
|
|
+ appBar: AppBar(
|
|
|
+ leading: IconButton(
|
|
|
+ icon: const Icon(Icons.arrow_back_ios_new_rounded),
|
|
|
+ color: ColorName.white,
|
|
|
+ onPressed: () {
|
|
|
+ controller.onBackClick();
|
|
|
+ },
|
|
|
+ ),
|
|
|
+ scrolledUnderElevation: 0,
|
|
|
+ backgroundColor: ColorName.transparent,
|
|
|
+ systemOverlayStyle: SystemUiOverlayStyle.light,
|
|
|
+ actions: [
|
|
|
+ _buildAddShortcut(true),
|
|
|
+ ],
|
|
|
),
|
|
|
- scrolledUnderElevation: 0,
|
|
|
backgroundColor: ColorName.transparent,
|
|
|
- systemOverlayStyle: SystemUiOverlayStyle.light,
|
|
|
- actions: [
|
|
|
- _buildAddShortcut(true),
|
|
|
- ],
|
|
|
- ),
|
|
|
- backgroundColor: ColorName.transparent,
|
|
|
- body: Flex(
|
|
|
- direction: Axis.vertical,
|
|
|
- children: [
|
|
|
- _buildRecordStatus(),
|
|
|
- const Spacer(flex: 271),
|
|
|
- _buildRecordAnim(),
|
|
|
- const Spacer(flex: 407),
|
|
|
- _buildRecordControl(),
|
|
|
- ],
|
|
|
+ body: Flex(
|
|
|
+ direction: Axis.vertical,
|
|
|
+ children: [
|
|
|
+ _buildRecordStatus(),
|
|
|
+ const Spacer(flex: 271),
|
|
|
+ _buildRecordAnim(),
|
|
|
+ const Spacer(flex: 407),
|
|
|
+ _buildRecordControl(),
|
|
|
+ ],
|
|
|
+ ),
|
|
|
),
|
|
|
- ),
|
|
|
- ]);
|
|
|
+ ]),
|
|
|
+ );
|
|
|
}
|
|
|
|
|
|
Widget _buildAddShortcut(bool visible) {
|