Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/maintenance mode #1347

Merged
merged 30 commits into from
Nov 11, 2022
Merged

Feat/maintenance mode #1347

merged 30 commits into from
Nov 11, 2022

Conversation

Amean
Copy link
Contributor

@Amean Amean commented Nov 4, 2022

Adds a banner and message whenever app is in maintenance mode, maintenance mode is toggled by setting maintenanceMode to true in home.dart, #1295

@@ -285,6 +320,19 @@ class HomeScreenState extends State<HomeScreen> with SingleTickerProviderStateMi
width: 20.w,
)),
),
if (remoteConfigService.getMaintenanceMode())
Positioned(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to create a widget called MaintenanceBanner and use it everywhere?

@kjawadDeveloper2
Copy link
Collaborator

@Amean can you add the widget test for the banner ?

child: Text(
LocaleKeys.maintenance_mode_header.tr(),
style: TextStyle(
color: Colors.white, fontSize: 10.sp, fontWeight: FontWeight.w700),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

format this code.

if (remoteConfigService.getMaintenanceMode())
Positioned(
top: 0.16.sh,
right: 0,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

format this.

import 'package:flutter_screenutil/flutter_screenutil.dart';

import '../generated/locale_keys.g.dart';
import '../utils/constants.dart';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use absolute path instead of relative one.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good suggestion i will add a linter for this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you.

@@ -22,6 +23,7 @@ import 'package:pylons_wallet/utils/screen_responsive.dart';
import 'package:pylons_wallet/utils/svg_util.dart';

import '../../generated/locale_keys.g.dart';
import '../../services/third_party_services/remote_config_service/remote_config_service.dart';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use absolute path

@@ -171,6 +177,12 @@ class HomeScreenState extends State<HomeScreen> with SingleTickerProviderStateMi
width: 20.w,
)),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code formatting not done properly

@@ -18,6 +18,9 @@ abstract class RemoteConfigService {

/// This method returns the ios app version in the remote config
String getIOSAppVersion();

/// This method returns whether the app is in maintenance mode or not
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update documentation it should be like this
/// This method tells whether the app is in maintenance mode or not
/// Output: return [bool] true if in maintenance mode else will return false

@kjawadDeveloper2 kjawadDeveloper2 merged commit 72b96a1 into main Nov 11, 2022
@kjawadDeveloper2 kjawadDeveloper2 deleted the feat/maintenance_mode branch November 11, 2022 15:50
@zube zube bot removed the [zube]: Done label Feb 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants