TF-1014: add covert bytes to gb and edit UI
This commit is contained in:
@@ -0,0 +1,7 @@
|
|||||||
|
import 'dart:math';
|
||||||
|
|
||||||
|
class DoubleConvert {
|
||||||
|
static double bytesToGigaBytes(num bytes) {
|
||||||
|
return double.tryParse((bytes * 9.31 * pow(10, -10)).toStringAsFixed(2)) ?? 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -80,7 +80,7 @@ class MailboxController extends BaseMailboxController {
|
|||||||
final _imagePaths = Get.find<ImagePaths>();
|
final _imagePaths = Get.find<ImagePaths>();
|
||||||
final _responsiveUtils = Get.find<ResponsiveUtils>();
|
final _responsiveUtils = Get.find<ResponsiveUtils>();
|
||||||
final _uuid = Get.find<Uuid>();
|
final _uuid = Get.find<Uuid>();
|
||||||
|
final isMailboxListScrollable = false.obs;
|
||||||
final GetAllMailboxInteractor _getAllMailboxInteractor;
|
final GetAllMailboxInteractor _getAllMailboxInteractor;
|
||||||
final RefreshAllMailboxInteractor _refreshAllMailboxInteractor;
|
final RefreshAllMailboxInteractor _refreshAllMailboxInteractor;
|
||||||
final CreateNewMailboxInteractor _createNewMailboxInteractor;
|
final CreateNewMailboxInteractor _createNewMailboxInteractor;
|
||||||
@@ -200,6 +200,10 @@ class MailboxController extends BaseMailboxController {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void handleScrollEnable() {
|
||||||
|
isMailboxListScrollable.value = mailboxListScrollController.hasClients && mailboxListScrollController.position.maxScrollExtent > 0;
|
||||||
|
}
|
||||||
|
|
||||||
void _registerListenerWorker() {
|
void _registerListenerWorker() {
|
||||||
accountIdWorker = ever(mailboxDashBoardController.accountId, (accountId) {
|
accountIdWorker = ever(mailboxDashBoardController.accountId, (accountId) {
|
||||||
if (accountId is AccountId) {
|
if (accountId is AccountId) {
|
||||||
|
|||||||
@@ -44,56 +44,56 @@ class MailboxView extends GetWidget<MailboxController> {
|
|||||||
body: Column(
|
body: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Column(children: [
|
child: Column(children: [
|
||||||
_buildHeaderMailbox(context),
|
_buildHeaderMailbox(context),
|
||||||
Obx(() => controller.isSearchActive()
|
Obx(() => controller.isSearchActive()
|
||||||
? SafeArea(bottom: false, top: false, right: false,
|
? SafeArea(bottom: false, top: false, right: false,
|
||||||
child: _buildInputSearchFormWidget(context))
|
child: _buildInputSearchFormWidget(context))
|
||||||
: const SizedBox.shrink()),
|
: const SizedBox.shrink()),
|
||||||
Expanded(child: Obx(() => Container(
|
Expanded(child: Obx(() => Container(
|
||||||
color: controller.isSearchActive()
|
color: controller.isSearchActive()
|
||||||
? Colors.white
|
? Colors.white
|
||||||
: AppColor.colorBgMailbox,
|
: AppColor.colorBgMailbox,
|
||||||
child: RefreshIndicator(
|
child: RefreshIndicator(
|
||||||
color: AppColor.primaryColor,
|
color: AppColor.primaryColor,
|
||||||
onRefresh: () async => controller.refreshAllMailbox(),
|
onRefresh: () async => controller.refreshAllMailbox(),
|
||||||
child: SafeArea(top: false, right: false,
|
child: SafeArea(top: false, right: false,
|
||||||
bottom: !controller.isSelectionEnabled(),
|
bottom: !controller.isSelectionEnabled(),
|
||||||
child: controller.isSearchActive()
|
child: controller.isSearchActive()
|
||||||
? _buildListMailboxSearched(context)
|
? _buildListMailboxSearched(context)
|
||||||
: Padding(
|
: Padding(
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
bottom: _responsiveUtils.isLandscapeMobile(context)
|
bottom: _responsiveUtils.isLandscapeMobile(context)
|
||||||
|| controller.isSelectionEnabled() ? 0 : 24),
|
|| controller.isSelectionEnabled() ? 0 : 24),
|
||||||
child: _buildListMailbox(context))
|
child: _buildListMailbox(context))
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
))),
|
))),
|
||||||
Obx(() => controller.isSelectionEnabled()
|
Obx(() => controller.isSelectionEnabled()
|
||||||
? _buildOptionSelectionMailbox(context)
|
? _buildOptionSelectionMailbox(context)
|
||||||
: const SizedBox.shrink()),
|
: const SizedBox.shrink()),
|
||||||
]),
|
]),
|
||||||
),
|
),
|
||||||
Obx(() => controller.isSelectionEnabled()
|
Obx(() => controller.isMailboxListScrollable.isTrue && !controller.isSelectionEnabled()
|
||||||
? const SizedBox.shrink()
|
? const QuotasFooterWidget(padding: EdgeInsets.only(left: 24, right: 24, bottom: 8))
|
||||||
: const QuotasFooterWidget(padding: EdgeInsets.only(left: 24, right: 24, bottom: 8)),
|
: const SizedBox.shrink(),
|
||||||
),
|
),
|
||||||
Obx(() {
|
Obx(() {
|
||||||
final appInformation = controller.mailboxDashBoardController.appInformation.value;
|
final appInformation = controller.mailboxDashBoardController.appInformation.value;
|
||||||
if (appInformation != null
|
if (appInformation != null
|
||||||
&& !controller.isSearchActive()
|
&& !controller.isSearchActive()
|
||||||
&& !controller.isSelectionEnabled()) {
|
&& !controller.isSelectionEnabled()) {
|
||||||
if (_responsiveUtils.isLandscapeMobile(context)) {
|
if (_responsiveUtils.isLandscapeMobile(context)) {
|
||||||
return const SizedBox.shrink();
|
return const SizedBox.shrink();
|
||||||
}
|
}
|
||||||
return Align(
|
return Align(
|
||||||
alignment: Alignment.bottomCenter,
|
alignment: Alignment.bottomCenter,
|
||||||
child: _buildVersionInformation(context, appInformation));
|
child: _buildVersionInformation(context, appInformation));
|
||||||
} else {
|
} else {
|
||||||
return const SizedBox.shrink();
|
return const SizedBox.shrink();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
]),
|
]),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@@ -216,28 +216,38 @@ class MailboxView extends GetWidget<MailboxController> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildListMailbox(BuildContext context) {
|
Widget _buildListMailbox(BuildContext context) {
|
||||||
return SingleChildScrollView(
|
return NotificationListener(
|
||||||
controller: controller.mailboxListScrollController,
|
onNotification: (_) {
|
||||||
key: const PageStorageKey('mailbox_list'),
|
controller.handleScrollEnable();
|
||||||
physics: const ClampingScrollPhysics(),
|
return true;
|
||||||
padding: EdgeInsets.only(bottom: controller.isSelectionEnabled() ? 16 : 0),
|
},
|
||||||
child: Column(children: [
|
child: SingleChildScrollView(
|
||||||
Obx(() {
|
controller: controller.mailboxListScrollController,
|
||||||
if (controller.isSelectionEnabled() && _responsiveUtils.isLandscapeMobile(context)) {
|
key: const PageStorageKey('mailbox_list'),
|
||||||
return const SizedBox.shrink();
|
physics: const ClampingScrollPhysics(),
|
||||||
}
|
padding: EdgeInsets.only(bottom: controller.isSelectionEnabled() ? 16 : 0),
|
||||||
return _buildUserInformation(context);
|
child: Column(children: [
|
||||||
}),
|
Obx(() {
|
||||||
_buildSearchBarWidget(context),
|
if (controller.isSelectionEnabled() && _responsiveUtils.isLandscapeMobile(context)) {
|
||||||
_buildLoadingView(),
|
return const SizedBox.shrink();
|
||||||
Obx(() => controller.defaultMailboxTree.value.root.childrenItems?.isNotEmpty ?? false
|
}
|
||||||
? _buildMailboxCategory(context, MailboxCategories.exchange, controller.defaultMailboxTree.value.root)
|
return _buildUserInformation(context);
|
||||||
: const SizedBox.shrink()),
|
}),
|
||||||
const SizedBox(height: 12),
|
_buildSearchBarWidget(context),
|
||||||
Obx(() => controller.folderMailboxTree.value.root.childrenItems?.isNotEmpty ?? false
|
_buildLoadingView(),
|
||||||
? _buildMailboxCategory(context, MailboxCategories.folders, controller.folderMailboxTree.value.root)
|
Obx(() => controller.defaultMailboxTree.value.root.childrenItems?.isNotEmpty ?? false
|
||||||
: const SizedBox.shrink()),
|
? _buildMailboxCategory(context, MailboxCategories.exchange, controller.defaultMailboxTree.value.root)
|
||||||
])
|
: const SizedBox.shrink()),
|
||||||
|
const SizedBox(height: 12),
|
||||||
|
Obx(() => controller.folderMailboxTree.value.root.childrenItems?.isNotEmpty ?? false
|
||||||
|
? _buildMailboxCategory(context, MailboxCategories.folders, controller.folderMailboxTree.value.root)
|
||||||
|
: const SizedBox.shrink()),
|
||||||
|
Obx(() => controller.isMailboxListScrollable.isFalse && !controller.isSelectionEnabled()
|
||||||
|
? const QuotasFooterWidget(padding: EdgeInsets.only(left: 24, right: 24, bottom: 8, top: 8))
|
||||||
|
: const SizedBox.shrink(),
|
||||||
|
),
|
||||||
|
])
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -73,7 +73,7 @@ import 'package:tmail_ui_user/features/mailbox_dashboard/presentation/controller
|
|||||||
import 'package:tmail_ui_user/features/mailbox_dashboard/presentation/controller/mailbox_dashboard_controller.dart';
|
import 'package:tmail_ui_user/features/mailbox_dashboard/presentation/controller/mailbox_dashboard_controller.dart';
|
||||||
import 'package:tmail_ui_user/features/mailbox_dashboard/presentation/controller/search_controller.dart';
|
import 'package:tmail_ui_user/features/mailbox_dashboard/presentation/controller/search_controller.dart';
|
||||||
import 'package:tmail_ui_user/features/manage_account/domain/usecases/log_out_oidc_interactor.dart';
|
import 'package:tmail_ui_user/features/manage_account/domain/usecases/log_out_oidc_interactor.dart';
|
||||||
import 'package:tmail_ui_user/features/quotas/presentation/quotas_bindings.dart';
|
import 'package:tmail_ui_user/features/quotas/presentation/quotas_controller_bindings.dart';
|
||||||
import 'package:tmail_ui_user/features/search/domain/usecases/refresh_changes_search_email_interactor.dart';
|
import 'package:tmail_ui_user/features/search/domain/usecases/refresh_changes_search_email_interactor.dart';
|
||||||
import 'package:tmail_ui_user/features/search/presentation/search_email_bindings.dart';
|
import 'package:tmail_ui_user/features/search/presentation/search_email_bindings.dart';
|
||||||
import 'package:tmail_ui_user/features/thread/data/datasource/thread_datasource.dart';
|
import 'package:tmail_ui_user/features/thread/data/datasource/thread_datasource.dart';
|
||||||
@@ -103,7 +103,7 @@ class MailboxDashBoardBindings extends BaseBindings {
|
|||||||
ThreadBindings().dependencies();
|
ThreadBindings().dependencies();
|
||||||
EmailBindings().dependencies();
|
EmailBindings().dependencies();
|
||||||
SearchEmailBindings().dependencies();
|
SearchEmailBindings().dependencies();
|
||||||
QuotasBindings().dependencies();
|
QuotasControllerBindings().dependencies();
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|||||||
@@ -36,6 +36,5 @@ class QuotasAPI {
|
|||||||
} else {
|
} else {
|
||||||
throw NotFoundQuotasException();
|
throw NotFoundQuotasException();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
import 'dart:ui';
|
|
||||||
|
|
||||||
import 'package:core/core.dart';
|
import 'package:core/core.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
import 'package:tmail_ui_user/main/localizations/app_localizations.dart';
|
import 'package:tmail_ui_user/main/localizations/app_localizations.dart';
|
||||||
|
|
||||||
enum QuotasState {
|
enum QuotasState {
|
||||||
|
notAvailable,
|
||||||
normal,
|
normal,
|
||||||
runningOutOfStorage,
|
runningOutOfStorage,
|
||||||
runOutOfStorage;
|
runOutOfStorage;
|
||||||
|
|
||||||
Color getColorProgress() {
|
Color getColorProgress() {
|
||||||
switch(this) {
|
switch(this) {
|
||||||
|
case QuotasState.notAvailable:
|
||||||
case QuotasState.normal:
|
case QuotasState.normal:
|
||||||
return AppColor.primaryColor;
|
return AppColor.primaryColor;
|
||||||
case QuotasState.runningOutOfStorage:
|
case QuotasState.runningOutOfStorage:
|
||||||
@@ -22,6 +22,7 @@ enum QuotasState {
|
|||||||
|
|
||||||
Color getColorQuotasFooterText() {
|
Color getColorQuotasFooterText() {
|
||||||
switch(this) {
|
switch(this) {
|
||||||
|
case QuotasState.notAvailable:
|
||||||
case QuotasState.normal:
|
case QuotasState.normal:
|
||||||
case QuotasState.runningOutOfStorage:
|
case QuotasState.runningOutOfStorage:
|
||||||
return AppColor.loginTextFieldHintColor;
|
return AppColor.loginTextFieldHintColor;
|
||||||
@@ -32,6 +33,7 @@ enum QuotasState {
|
|||||||
|
|
||||||
String getQuotasFooterText(BuildContext context, num usedCapacity, num softLimitCapacity) {
|
String getQuotasFooterText(BuildContext context, num usedCapacity, num softLimitCapacity) {
|
||||||
switch(this) {
|
switch(this) {
|
||||||
|
case QuotasState.notAvailable:
|
||||||
case QuotasState.normal:
|
case QuotasState.normal:
|
||||||
case QuotasState.runningOutOfStorage:
|
case QuotasState.runningOutOfStorage:
|
||||||
return AppLocalizations.of(context).textQuotasUsed(
|
return AppLocalizations.of(context).textQuotasUsed(
|
||||||
@@ -45,6 +47,7 @@ enum QuotasState {
|
|||||||
|
|
||||||
String getIconWarningBanner(ImagePaths imagePaths) {
|
String getIconWarningBanner(ImagePaths imagePaths) {
|
||||||
switch(this) {
|
switch(this) {
|
||||||
|
case QuotasState.notAvailable:
|
||||||
case QuotasState.normal:
|
case QuotasState.normal:
|
||||||
case QuotasState.runningOutOfStorage:
|
case QuotasState.runningOutOfStorage:
|
||||||
return imagePaths.icQuotasWarning;
|
return imagePaths.icQuotasWarning;
|
||||||
@@ -55,6 +58,7 @@ enum QuotasState {
|
|||||||
|
|
||||||
Color getBackgroundColorWarningBanner() {
|
Color getBackgroundColorWarningBanner() {
|
||||||
switch(this) {
|
switch(this) {
|
||||||
|
case QuotasState.notAvailable:
|
||||||
case QuotasState.normal:
|
case QuotasState.normal:
|
||||||
case QuotasState.runningOutOfStorage:
|
case QuotasState.runningOutOfStorage:
|
||||||
return AppColor.colorBackgroundQuotasWarning.withOpacity(0.12);
|
return AppColor.colorBackgroundQuotasWarning.withOpacity(0.12);
|
||||||
@@ -65,6 +69,7 @@ enum QuotasState {
|
|||||||
|
|
||||||
String getTitleWarningBanner(BuildContext context, num progress) {
|
String getTitleWarningBanner(BuildContext context, num progress) {
|
||||||
switch(this) {
|
switch(this) {
|
||||||
|
case QuotasState.notAvailable:
|
||||||
case QuotasState.normal:
|
case QuotasState.normal:
|
||||||
case QuotasState.runningOutOfStorage:
|
case QuotasState.runningOutOfStorage:
|
||||||
return AppLocalizations.of(context).textQuotasRunningOutOfStorageTitle(progress.toDouble() * 100);
|
return AppLocalizations.of(context).textQuotasRunningOutOfStorageTitle(progress.toDouble() * 100);
|
||||||
@@ -75,6 +80,7 @@ enum QuotasState {
|
|||||||
|
|
||||||
String getContentWarningBanner(BuildContext context) {
|
String getContentWarningBanner(BuildContext context) {
|
||||||
switch(this) {
|
switch(this) {
|
||||||
|
case QuotasState.notAvailable:
|
||||||
case QuotasState.normal:
|
case QuotasState.normal:
|
||||||
case QuotasState.runningOutOfStorage:
|
case QuotasState.runningOutOfStorage:
|
||||||
return AppLocalizations.of(context).textQuotasRunningOutOfStorageContent;
|
return AppLocalizations.of(context).textQuotasRunningOutOfStorageContent;
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import 'package:core/core.dart';
|
import 'package:core/core.dart';
|
||||||
|
import 'package:core/utils/double_convert.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:jmap_dart_client/jmap/account_id.dart';
|
import 'package:jmap_dart_client/jmap/account_id.dart';
|
||||||
import 'package:jmap_dart_client/jmap/core/capability/capability_identifier.dart';
|
import 'package:jmap_dart_client/jmap/core/capability/capability_identifier.dart';
|
||||||
@@ -17,8 +18,7 @@ class QuotasController extends BaseController {
|
|||||||
final usedCapacity = Rx<num>(0);
|
final usedCapacity = Rx<num>(0);
|
||||||
final limitCapacity = Rx<num>(0);
|
final limitCapacity = Rx<num>(0);
|
||||||
final warningLimitCapacity = Rx<num>(0);
|
final warningLimitCapacity = Rx<num>(0);
|
||||||
final enableShowQuotas = false.obs;
|
final quotasState = QuotasState.notAvailable.obs;
|
||||||
final quotasState = QuotasState.normal.obs;
|
|
||||||
final warningProgressConstant = 0.9;
|
final warningProgressConstant = 0.9;
|
||||||
late Worker accountIdWorker;
|
late Worker accountIdWorker;
|
||||||
|
|
||||||
@@ -27,7 +27,7 @@ class QuotasController extends BaseController {
|
|||||||
: 0;
|
: 0;
|
||||||
|
|
||||||
bool get enableShowWarningQuotas =>
|
bool get enableShowWarningQuotas =>
|
||||||
enableShowQuotas.isTrue &&
|
quotasState.value != QuotasState.notAvailable &&
|
||||||
(quotasState.value == QuotasState.runningOutOfStorage
|
(quotasState.value == QuotasState.runningOutOfStorage
|
||||||
|| quotasState.value == QuotasState.runOutOfStorage);
|
|| quotasState.value == QuotasState.runOutOfStorage);
|
||||||
|
|
||||||
@@ -36,14 +36,6 @@ class QuotasController extends BaseController {
|
|||||||
|
|
||||||
QuotasController(this._getQuotasInteractor);
|
QuotasController(this._getQuotasInteractor);
|
||||||
|
|
||||||
void _initWorker() {
|
|
||||||
accountIdWorker = ever(mailboxDashBoardController.accountId, (accountId) {
|
|
||||||
if (accountId is AccountId && mailboxDashBoardController.sessionCurrent!= null) {
|
|
||||||
_getQuotasAction(accountId, mailboxDashBoardController.sessionCurrent!);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
void _getQuotasAction(AccountId accountId, Session session) {
|
void _getQuotasAction(AccountId accountId, Session session) {
|
||||||
try {
|
try {
|
||||||
requireCapability(session, accountId, [CapabilityIdentifier.jmapQuota]);
|
requireCapability(session, accountId, [CapabilityIdentifier.jmapQuota]);
|
||||||
@@ -72,9 +64,9 @@ class QuotasController extends BaseController {
|
|||||||
void _handleGetQuotasSuccess(GetQuotasSuccess success) {
|
void _handleGetQuotasSuccess(GetQuotasSuccess success) {
|
||||||
try {
|
try {
|
||||||
final quotas = success.quotas.firstWhere((e) => e.resourceType == ResourceType.octets);
|
final quotas = success.quotas.firstWhere((e) => e.resourceType == ResourceType.octets);
|
||||||
usedCapacity.value = quotas.used.value;
|
usedCapacity.value = DoubleConvert.bytesToGigaBytes(quotas.used.value);
|
||||||
warningLimitCapacity.value = quotas.limit.value * warningProgressConstant;
|
warningLimitCapacity.value = DoubleConvert.bytesToGigaBytes(quotas.limit.value * warningProgressConstant);
|
||||||
limitCapacity.value = quotas.limit.value;
|
limitCapacity.value = DoubleConvert.bytesToGigaBytes(quotas.limit.value);
|
||||||
if(usedCapacity.value >= limitCapacity.value) {
|
if(usedCapacity.value >= limitCapacity.value) {
|
||||||
quotasState.value = QuotasState.runOutOfStorage;
|
quotasState.value = QuotasState.runOutOfStorage;
|
||||||
} else if (usedCapacity.value >= warningLimitCapacity.value) {
|
} else if (usedCapacity.value >= warningLimitCapacity.value) {
|
||||||
@@ -82,13 +74,24 @@ class QuotasController extends BaseController {
|
|||||||
} else {
|
} else {
|
||||||
quotasState.value = QuotasState.normal;
|
quotasState.value = QuotasState.normal;
|
||||||
}
|
}
|
||||||
enableShowQuotas.value = true;
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
enableShowQuotas.value = false;
|
quotasState.value = QuotasState.notAvailable;
|
||||||
logError('QuotasController::_handleGetQuotasSuccess():[NotFoundException]: $e');
|
logError('QuotasController::_handleGetQuotasSuccess():[NotFoundException]: $e');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void covertBytesToGB() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void _initWorker() {
|
||||||
|
accountIdWorker = ever(mailboxDashBoardController.accountId, (accountId) {
|
||||||
|
if (accountId is AccountId && mailboxDashBoardController.sessionCurrent!= null) {
|
||||||
|
_getQuotasAction(accountId, mailboxDashBoardController.sessionCurrent!);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onInit() {
|
void onInit() {
|
||||||
_initWorker();
|
_initWorker();
|
||||||
|
|||||||
+2
-2
@@ -9,7 +9,7 @@ import 'package:tmail_ui_user/features/quotas/domain/use_case/get_quotas_interac
|
|||||||
import 'package:tmail_ui_user/features/quotas/presentation/quotas_controller.dart';
|
import 'package:tmail_ui_user/features/quotas/presentation/quotas_controller.dart';
|
||||||
import 'package:tmail_ui_user/main/exceptions/remote_exception_thrower.dart';
|
import 'package:tmail_ui_user/main/exceptions/remote_exception_thrower.dart';
|
||||||
|
|
||||||
class QuotasBindings extends BaseBindings {
|
class QuotasControllerBindings extends BaseBindings {
|
||||||
@override
|
@override
|
||||||
void bindingsController() {
|
void bindingsController() {
|
||||||
Get.put(QuotasController(Get.find<GetQuotasInteractor>()));
|
Get.put(QuotasController(Get.find<GetQuotasInteractor>()));
|
||||||
@@ -17,7 +17,7 @@ class QuotasBindings extends BaseBindings {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
void bindingsDataSource() {
|
void bindingsDataSource() {
|
||||||
Get.lazyPut<QuotasDataSource>(() => Get.find<QuotasDataSourceImpl>());
|
Get.lazyPut<QuotasDataSource>(() => (Get.find<QuotasDataSourceImpl>()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -2,6 +2,7 @@ import 'package:core/core.dart';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_svg/flutter_svg.dart';
|
import 'package:flutter_svg/flutter_svg.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:tmail_ui_user/features/quotas/presentation/model/quotas_state.dart';
|
||||||
import 'package:tmail_ui_user/features/quotas/presentation/quotas_controller.dart';
|
import 'package:tmail_ui_user/features/quotas/presentation/quotas_controller.dart';
|
||||||
import 'package:tmail_ui_user/main/localizations/app_localizations.dart';
|
import 'package:tmail_ui_user/main/localizations/app_localizations.dart';
|
||||||
|
|
||||||
@@ -11,7 +12,7 @@ class QuotasFooterWidget extends GetWidget<QuotasController> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Obx(
|
return Obx(
|
||||||
() => controller.enableShowQuotas.value
|
() => controller.quotasState.value != QuotasState.notAvailable
|
||||||
? Container(
|
? Container(
|
||||||
color: AppColor.colorBgDesktop,
|
color: AppColor.colorBgDesktop,
|
||||||
padding: padding ?? const EdgeInsets.all(24),
|
padding: padding ?? const EdgeInsets.all(24),
|
||||||
|
|||||||
+3
-3
@@ -21,7 +21,7 @@ packages:
|
|||||||
name: archive
|
name: archive
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.3.2"
|
version: "3.3.4"
|
||||||
args:
|
args:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -757,7 +757,7 @@ packages:
|
|||||||
description:
|
description:
|
||||||
path: "."
|
path: "."
|
||||||
ref: master
|
ref: master
|
||||||
resolved-ref: ea636193b15a49e9d59dab143e957f529e1bd836
|
resolved-ref: "66ef334ac2cf4d5cb30835b30094a51802fae2ba"
|
||||||
url: "https://github.com/linagora/jmap-dart-client.git"
|
url: "https://github.com/linagora/jmap-dart-client.git"
|
||||||
source: git
|
source: git
|
||||||
version: "0.0.1"
|
version: "0.0.1"
|
||||||
@@ -1075,7 +1075,7 @@ packages:
|
|||||||
name: pub_semver
|
name: pub_semver
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.2"
|
version: "2.1.3"
|
||||||
pubspec_parse:
|
pubspec_parse:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|||||||
Reference in New Issue
Block a user