mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
show backbtn on mine page if needed
Closes #1580 Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -271,7 +271,7 @@ class MainController extends GetxController
|
|||||||
const Material(
|
const Material(
|
||||||
child: ViewSafeArea(
|
child: ViewSafeArea(
|
||||||
top: true,
|
top: true,
|
||||||
child: MinePage(),
|
child: MinePage(showBackBtn: true),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -22,7 +22,9 @@ import 'package:get/get.dart';
|
|||||||
import 'package:material_design_icons_flutter/material_design_icons_flutter.dart';
|
import 'package:material_design_icons_flutter/material_design_icons_flutter.dart';
|
||||||
|
|
||||||
class MinePage extends StatefulWidget {
|
class MinePage extends StatefulWidget {
|
||||||
const MinePage({super.key});
|
const MinePage({super.key, this.showBackBtn = false});
|
||||||
|
|
||||||
|
final bool showBackBtn;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<MinePage> createState() => _MediaPageState();
|
State<MinePage> createState() => _MediaPageState();
|
||||||
@@ -138,6 +140,16 @@ class _MediaPageState extends CommonPageState<MinePage, MineController>
|
|||||||
spacing: 5,
|
spacing: 5,
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
children: [
|
children: [
|
||||||
|
if (widget.showBackBtn)
|
||||||
|
const Expanded(
|
||||||
|
child: Align(
|
||||||
|
alignment: Alignment.centerLeft,
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsets.only(left: 8),
|
||||||
|
child: BackButton(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
if (!_mainController.hasHome) ...[
|
if (!_mainController.hasHome) ...[
|
||||||
IconButton(
|
IconButton(
|
||||||
iconSize: 22,
|
iconSize: 22,
|
||||||
|
|||||||
Reference in New Issue
Block a user