Skip to content

ScreenUtil switch fix #114

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

Merged
merged 1 commit into from
Oct 17, 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
9 changes: 5 additions & 4 deletions lib/domain/entity/platforms_list/platforms_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class PlatformsList with _$PlatformsList {
bool get mobile => android || ios;

List<String> asList() {
List<String> platforms = [];
final platforms = <String>[];

if (android) platforms.add('android');
if (ios) platforms.add('ios');
Expand All @@ -35,11 +35,12 @@ class PlatformsList with _$PlatformsList {
}

List<String> asPlatformCommandsList() {
List<String> commands = [];
final commands = <String>[];

if (android) {
commands.add('apk');
commands.add('appbundle');
commands
..add('apk')
..add('appbundle');
}
if (ios) commands.add('ios');
if (web) commands.add('web');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ class PlatformsScreenBloc extends BaseBloc<PlatformsScreenEvent,
}
emit(
state.copyWith(
config: state.config.copyWith(platformsList: copiedPlatforms),
config: state.config.copyWith(
platformsList: copiedPlatforms,
screenUtil: !copiedPlatforms.webOnly && state.config.screenUtil,
),
),
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ class ProjectSettingsScreenBloc extends BaseBloc<ProjectSettingsScreenEvent,
state.copyWith(
config: state.config.copyWith(
screenUtil:
!state.config.platformsList.webOnly && state.config.screenUtil,
!state.config.platformsList.webOnly && !state.config.screenUtil,
),
),
);
Expand Down
3 changes: 1 addition & 2 deletions lib/presentation/widget/inputs/labeled_checkbox.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import 'package:flutter/material.dart';
import 'package:gap/gap.dart';
import 'package:msh_checkbox/msh_checkbox.dart';
import 'package:onix_flutter_bricks/presentation/style/theme/theme_extension/ext.dart';
import 'package:recase/recase.dart';

class LabeledCheckbox extends StatelessWidget {
final String label;
Expand Down Expand Up @@ -51,7 +50,7 @@ class LabeledCheckbox extends StatelessWidget {
),
const Gap(10),
Text(
label.titleCase,
label,
style: context.appTextStyles.fs18,
),
],
Expand Down