Skip to content

Commit 4354333

Browse files
authored
Hide onboarding and datacap in ios (#8466)
* Hide onboarding page and datacap in ios and update build number * code review updates
1 parent 3972ac7 commit 4354333

File tree

4 files changed

+13
-8
lines changed

4 files changed

+13
-8
lines changed

lib/features/home/home.dart

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,9 @@ class _HomeState extends ConsumerState<Home> {
3939

4040
WidgetsBinding.instance.addPostFrameCallback((_) {
4141
final appSetting = ref.read(appSettingProvider);
42-
if(!appSetting.onboardingCompleted){
43-
appLogger.info("User has not completed onboarding, navigating to Onboarding Screen");
42+
if (!appSetting.onboardingCompleted) {
43+
appLogger.info(
44+
"User has not completed onboarding, navigating to Onboarding Screen");
4445
appRouter.push(const Onboarding());
4546
return;
4647
}
@@ -150,8 +151,10 @@ class _HomeState extends ConsumerState<Home> {
150151
if (!isUserPro) ...{
151152
if (serverType == ServerLocationType.privateServer)
152153
InfoRow(text: 'private_server_usage_message'.i18n)
154+
else if (PlatformUtils.isIOS)
155+
const SizedBox.shrink()
153156
else
154-
DataUsage(),
157+
const DataUsage(),
155158
},
156159
SizedBox(height: 8),
157160
_buildSetting(ref),

lib/features/onboarding/onboarding.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ class _OnboardingState extends ConsumerState<Onboarding> {
103103
],
104104
),
105105
slide2(context),
106-
slide3(context),
106+
if (!PlatformUtils.isIOS) slide3(context),
107107
],
108108
),
109109
),
@@ -112,6 +112,10 @@ class _OnboardingState extends ConsumerState<Onboarding> {
112112
pageIndex.value == 0 ? 'get_started'.i18n : 'continue'.i18n,
113113
isTaller: true,
114114
onPressed: () {
115+
if (PlatformUtils.isIOS && pageIndex.value == 1) {
116+
onboardingCompleted();
117+
return;
118+
}
115119
if (pageIndex.value == 2) {
116120
onboardingCompleted();
117121
return;

lib/main.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,7 @@ Future<void> _configureLocalTimeZone() async {
9999
return;
100100
}
101101
tz.initializeTimeZones();
102-
// if (Platform.isWindows) {
103-
// return;
104-
// }
102+
105103
final timeZoneName = await FlutterTimezone.getLocalTimezone();
106104
tz.setLocalLocation(tz.getLocation(timeZoneName.identifier));
107105
}

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
1616
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
1717
# In Windows, build-name is used as the major, minor, and patch parts
1818
# of the product and file versions while build-number is used as the build suffix.
19-
version: 9.0.3+89
19+
version: 9.0.3+90
2020

2121
environment:
2222
sdk: ^3.6.0

0 commit comments

Comments
 (0)