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

fix: mandarin and cantonese state is saved across app restarts. #1552

Merged
merged 6 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions packages/dart/npt_flutter/lib/styles/sizes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,6 @@ class SizeConfig {

deviceTextFactor = _mediaQueryData.textScaler.scale(20) / 20;

// print("height is::: $screenHeight");

if (screenHeight < 1200) {
blockSizeHorizontal = screenWidth / 100;
blockSizeVertical = screenHeight / 100;
Expand Down Expand Up @@ -180,7 +178,6 @@ class SizeConfig {
// }
double res = (val / refWidth) * 100;
double temp = res * blockSizeHorizontal;
// print("width$temp");

return temp;
}
Expand All @@ -205,7 +202,7 @@ class SizeConfig {
} else {
temp = res * safeBlockVertical + (val * 0.2473919523099851) * textFactor;
}
// print('$val,$temp,$refHeight,$refWidth');

final maxSize = val + Sizes.p4;
if (temp > maxSize) {
return maxSize;
Expand Down
4 changes: 2 additions & 2 deletions packages/dart/npt_flutter/lib/util/language.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ enum Language {
spanish,
@JsonValue("pt-br")
portuguese,
@JsonValue("cn")
@JsonValue("zh-hans-cn")
mandarin,
@JsonValue("hk")
@JsonValue("zh-hant-hk")
cantonese,
}

Expand Down
4 changes: 2 additions & 2 deletions packages/dart/npt_flutter/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1549,10 +1549,10 @@ packages:
dependency: transitive
description:
name: vm_service
sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d"
sha256: f652077d0bdf60abe4c1f6377448e8655008eef28f128bc023f7b5e8dfeb48fc
url: "https://pub.dev"
source: hosted
version: "14.2.5"
version: "14.2.4"
watcher:
dependency: transitive
description:
Expand Down