import 'package:flutter/material.dart'; class RecordPage extends StatefulWidget { const RecordPage({Key? key}) : super(key: key); @override State createState() => _RecordPageState(); } class _RecordPageState extends State { @override Widget build(BuildContext context) { return WillPopScope( onWillPop: () async { Navigator.of(context).pop(); return false; }, child: Scaffold( appBar: AppBar( title: const Text('记账'), leading: IconButton( icon: const Icon(Icons.arrow_back), onPressed: () => Navigator.of(context).pop(), ), ), body: const Center( child: Text('记账页面'), ), ), ); } }