43 lines
1.1 KiB
Dart
43 lines
1.1 KiB
Dart
import 'package:flutter/cupertino.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:remixicon/remixicon.dart';
|
|
|
|
import 'widget/avatar_name.dart';
|
|
import 'widget/profile_section.dart';
|
|
|
|
class MyPage extends StatefulWidget {
|
|
final GlobalKey<ScaffoldState> scaffoldKey;
|
|
|
|
const MyPage({super.key, required this.scaffoldKey});
|
|
|
|
@override
|
|
State<MyPage> createState() => _MyPageState();
|
|
}
|
|
|
|
class _MyPageState extends State<MyPage> {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return CupertinoPageScaffold(
|
|
backgroundColor: Colors.white,
|
|
navigationBar: CupertinoNavigationBar(
|
|
middle: Text("个人资料"),
|
|
leading: IconButton(
|
|
onPressed: () {
|
|
widget.scaffoldKey.currentState?.closeDrawer();
|
|
},
|
|
icon: Icon(RemixIcons.close_circle_line, size: 25),
|
|
),
|
|
),
|
|
child: SafeArea(
|
|
child: ListView(
|
|
padding: EdgeInsets.symmetric(horizontal: 30, vertical: 20),
|
|
children: [
|
|
AvatarName(),
|
|
ProfileSection(),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|