Skip to content

Commit cce3028

Browse files
committed
feat(update_26/addons): sync with dev
1 parent fccd53c commit cce3028

File tree

5 files changed

+11
-12
lines changed

5 files changed

+11
-12
lines changed

lib/core/arch/data/local/prefs/base_preferences.dart

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@ class BasePreferences {
66
T result;
77

88
switch (defaultValue.runtimeType) {
9-
case String:
9+
case const (String):
1010
final value = prefs.getString(key) as T?;
1111
result = value ?? defaultValue;
1212
break;
13-
case bool:
13+
case const (bool):
1414
final value = prefs.getBool(key) as T?;
1515
result = value ?? defaultValue;
1616
break;
17-
case double:
17+
case const (double):
1818
final value = prefs.getDouble(key) as T?;
1919
result = value ?? defaultValue;
2020
break;
21-
case int:
21+
case const (int):
2222
final value = prefs.getInt(key) as T?;
2323
result = value ?? defaultValue;
2424
break;
@@ -31,16 +31,16 @@ class BasePreferences {
3131
Future<void> put<T>(String key, T value) async {
3232
final prefs = await SharedPreferences.getInstance();
3333
switch (value.runtimeType) {
34-
case String:
34+
case const (String):
3535
await prefs.setString(key, value as String);
3636
break;
37-
case bool:
37+
case const (bool):
3838
await prefs.setBool(key, value as bool);
3939
break;
40-
case double:
40+
case const (double):
4141
await prefs.setDouble(key, value as double);
4242
break;
43-
case int:
43+
case const (int):
4444
await prefs.setInt(key, value as int);
4545
break;
4646
}

lib/domain/service/file_generator_service/data_component_generators/component_class_generator.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ class ComponentClassGenerator implements BaseGenerationService<bool> {
2222
if (params is! DataComponentParams) {
2323
return false;
2424
}
25-
final codeLines = List<String>.empty(growable: true);
2625

2726
final sourceName = params.dataComponent.sourceName;
2827
final name = params.dataComponent.name;

lib/domain/service/file_generator_service/screen_generators/gen/screen_code_content.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,6 @@ class ScreenCodeContent {
212212
required String screenName,
213213
}) {
214214
final screenClassName = screenName.pascalCase;
215-
final screenClassImport = screenName.snakeCase;
216215
final codeLines = List<String>.empty(growable: true);
217216

218217
///Add imports

lib/domain/service/file_generator_service/style_generator/gen/theme_text_styles_file_content.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class ThemeTextStylesFileContent implements BaseGenerationService<String> {
6363
StyleGeneratorConst.darkColorSuffix, e, useScreenUtil, colors);
6464
},
6565
).toList();
66-
codeLines.addAll(lightColorsDeclarations);
66+
codeLines.addAll(darkColorsDeclarations);
6767
codeLines.add(');');
6868
codeLines.addNewLine();
6969

lib/domain/usecase/output/get_generation_output_stream_usecase.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import 'package:onix_flutter_bricks/domain/entity/config/output_line.dart';
22
import 'package:onix_flutter_bricks/domain/service/output_service/output_service.dart';
3+
import 'package:onix_flutter_bricks/util/enum/output_type.dart';
34

45
class GetGenerationOutputStream {
56
final OutputService _outputService;
@@ -10,7 +11,7 @@ class GetGenerationOutputStream {
1011
_outputService.clear();
1112
return _outputService.outputStream.map(
1213
(event) {
13-
if (_outputService.outputLines.last.tag == '{#progress}') {
14+
if (_outputService.outputLines.last.tag == OutputType.progress) {
1415
_outputService.outputLines.removeLast();
1516
}
1617
return _outputService.outputLines;

0 commit comments

Comments
 (0)