mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-01-23 09:16:54 +00:00
Implement root page pushing after extending volume button
This commit is contained in:
parent
89c907b109
commit
35a617065e
|
@ -6,6 +6,8 @@ import 'package:selfprivacy/logic/models/disk_size.dart';
|
||||||
import 'package:selfprivacy/ui/components/brand_button/filled_button.dart';
|
import 'package:selfprivacy/ui/components/brand_button/filled_button.dart';
|
||||||
import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart';
|
import 'package:selfprivacy/ui/components/brand_hero_screen/brand_hero_screen.dart';
|
||||||
import 'package:selfprivacy/logic/models/disk_status.dart';
|
import 'package:selfprivacy/logic/models/disk_status.dart';
|
||||||
|
import 'package:selfprivacy/ui/pages/root_route.dart';
|
||||||
|
import 'package:selfprivacy/utils/route_transitions/basic.dart';
|
||||||
|
|
||||||
class ExtendingVolumePage extends StatefulWidget {
|
class ExtendingVolumePage extends StatefulWidget {
|
||||||
const ExtendingVolumePage({
|
const ExtendingVolumePage({
|
||||||
|
@ -137,11 +139,15 @@ class _ExtendingVolumePageState extends State<ExtendingVolumePage> {
|
||||||
title: 'providers.storage.extend_volume_button.title'.tr(),
|
title: 'providers.storage.extend_volume_button.title'.tr(),
|
||||||
onPressed: _isError
|
onPressed: _isError
|
||||||
? null
|
? null
|
||||||
: () => {
|
: () {
|
||||||
context.read<ApiProviderVolumeCubit>().resizeVolume(
|
context.read<ApiProviderVolumeCubit>().resizeVolume(
|
||||||
widget.diskVolumeToResize,
|
widget.diskVolumeToResize,
|
||||||
_currentSliderGbValue.round(),
|
_currentSliderGbValue.round(),
|
||||||
),
|
);
|
||||||
|
Navigator.of(context).pushAndRemoveUntil(
|
||||||
|
materialRoute(const RootPage()),
|
||||||
|
(final predicate) => false,
|
||||||
|
);
|
||||||
},
|
},
|
||||||
disabled: _isError,
|
disabled: _isError,
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in a new issue