Skip to content

Commit 8069183

Browse files
authored
Merge pull request #8 from Onix-Systems/dev
Dev
2 parents c098b52 + 4a49ced commit 8069183

File tree

6 files changed

+59
-39
lines changed

6 files changed

+59
-39
lines changed

lib/data/repository/source_repository_impl.dart

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -283,12 +283,33 @@ class SourceRepositoryImpl implements SourceRepository {
283283
}
284284

285285
for (final response in responses) {
286-
final schema = response.value.containsKey('content')
287-
? response.value['content']['schema'] ??
288-
response.value['content'].containsKey('application/json')
289-
? response.value['content']['application/json']['schema']
290-
: response.value['content']['*/*']['schema']
291-
: response.value['schema'];
286+
Map<String, dynamic>? schema;
287+
288+
if (response.value.containsKey('content')) {
289+
final content = response.value['content'];
290+
if (content.containsKey('schema')) {
291+
schema = content['schema'];
292+
} else {
293+
if (content.keys
294+
.any((e) => e.toString().contains('application/json'))) {
295+
schema = content[content.keys.firstWhere(
296+
(e) => e.toString().contains('application/json'))]['schema'];
297+
} else if (content.keys.any((e) => e.toString().contains('json'))) {
298+
schema = content[content.keys
299+
.firstWhere((e) => e.toString().contains('json'))]['schema'];
300+
} else if (content.keys.any((e) => e.toString().contains('*/*'))) {
301+
schema = content[content.keys
302+
.firstWhere((e) => e.toString().contains('*/*'))]['schema'];
303+
} else if (content.keys
304+
.any((e) => e.toString().contains('text/plain'))) {
305+
schema = content[content.keys
306+
.firstWhere((e) => e.toString().contains('text/plain'))]
307+
['schema'];
308+
}
309+
}
310+
} else {
311+
schema = response.value['schema'];
312+
}
292313

293314
if (schema == null) {
294315
return;
@@ -310,9 +331,8 @@ class SourceRepositoryImpl implements SourceRepository {
310331
'List<${TypeMatcher.getDartType(schema['items']['type'])}>');
311332
}
312333
} else {
313-
if (schema is Map &&
314-
(schema.containsKey('additionalProperties') ||
315-
schema.containsKey('properties'))) {
334+
if (schema.containsKey('additionalProperties') ||
335+
schema.containsKey('properties')) {
316336
method.setResponseRuntimeType('Map<String, dynamic>');
317337
} else {
318338
method.setResponseRuntimeType(

lib/presentation/screen/generation_screen/bloc/generation_screen_bloc.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ class GenerationScreenBloc extends BaseBloc<GenerationScreenEvent,
100100
workingDirectory: state.config.projectPath);
101101

102102
gitGetBrickProcess.stdin.writeln(
103-
'curl -L https://github.com/Onix-Systems/onix-flutter-project-generator/archive/refs/heads/main.zip --output brick.zip && unzip -qq -f brick.zip "onix-flutter-project-generator-main/bricks/*" -d bricks && rm brick.zip');
103+
'curl -L https://github.com/Onix-Systems/onix-flutter-project-generator/archive/refs/heads/main.zip --output brick.zip && unzip -qq brick.zip -d bricks && rm brick.zip');
104104

105105
gitGetBrickProcess.stdin.writeln('echo "Complete with exit code: 0"');
106106
await gitGetBrickProcess.exitCode;

macos/Flutter/GeneratedPluginRegistrant.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
1919
ConnectivityPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlugin"))
2020
FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin"))
2121
FlutterSecureStoragePlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStoragePlugin"))
22-
FLTPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlusPlugin"))
22+
FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin"))
2323
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
2424
ScreenRetrieverPlugin.register(with: registry.registrar(forPlugin: "ScreenRetrieverPlugin"))
2525
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))

macos/Podfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,4 @@ SPEC CHECKSUMS:
7676

7777
PODFILE CHECKSUM: 33dc0a74a37eaaaa9a4d991374cc1fb2ce00b9ca
7878

79-
COCOAPODS: 1.12.1
79+
COCOAPODS: 1.13.0

pubspec.lock

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -189,10 +189,10 @@ packages:
189189
dependency: "direct main"
190190
description:
191191
name: connectivity_plus
192-
sha256: "94d51c6f1299133a2baa4c5c3d2c11ec7d7fb4768dee5c52a56f7d7522fcf70e"
192+
sha256: b502a681ba415272ecc41400bd04fe543ed1a62632137dc84d25a91e7746f55f
193193
url: "https://pub.dev"
194194
source: hosted
195-
version: "5.0.0"
195+
version: "5.0.1"
196196
connectivity_plus_platform_interface:
197197
dependency: transitive
198198
description:
@@ -402,10 +402,10 @@ packages:
402402
dependency: "direct dev"
403403
description:
404404
name: flutter_lints
405-
sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04
405+
sha256: ad76540d21c066228ee3f9d1dad64a9f7e46530e8bb7c85011a88bc1fd874bc5
406406
url: "https://pub.dev"
407407
source: hosted
408-
version: "2.0.3"
408+
version: "3.0.0"
409409
flutter_localizations:
410410
dependency: "direct main"
411411
description: flutter
@@ -489,10 +489,10 @@ packages:
489489
dependency: "direct dev"
490490
description:
491491
name: freezed
492-
sha256: "2df89855fe181baae3b6d714dc3c4317acf4fccd495a6f36e5e00f24144c6c3b"
492+
sha256: "21bf2825311de65501d22e563e3d7605dff57fb5e6da982db785ae5372ff018a"
493493
url: "https://pub.dev"
494494
source: hosted
495-
version: "2.4.1"
495+
version: "2.4.5"
496496
freezed_annotation:
497497
dependency: "direct main"
498498
description:
@@ -529,10 +529,10 @@ packages:
529529
dependency: "direct main"
530530
description:
531531
name: go_router
532-
sha256: "2ccd74480706e0a70a0e0dfa9543dede41bc11d0fe3b146a6ad7b7686f6b4407"
532+
sha256: a206cc4621a644531a2e05e7774616ab4d9d85eab1f3b0e255f3102937fccab1
533533
url: "https://pub.dev"
534534
source: hosted
535-
version: "11.1.4"
535+
version: "12.0.0"
536536
graphs:
537537
dependency: transitive
538538
description:
@@ -601,10 +601,10 @@ packages:
601601
dependency: "direct main"
602602
description:
603603
name: intl_utils
604-
sha256: "0d38f605f292321c0729f8c0632b845be77aa12d272b7bc5e3022bb670a7309e"
604+
sha256: "5cad11e11ff7662c3cd0ef04729248591d71ed023d4ef0903a137528b4568adf"
605605
url: "https://pub.dev"
606606
source: hosted
607-
version: "2.8.4"
607+
version: "2.8.5"
608608
io:
609609
dependency: transitive
610610
description:
@@ -641,10 +641,10 @@ packages:
641641
dependency: transitive
642642
description:
643643
name: lints
644-
sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452"
644+
sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290
645645
url: "https://pub.dev"
646646
source: hosted
647-
version: "2.1.1"
647+
version: "3.0.0"
648648
loader_overlay:
649649
dependency: "direct main"
650650
description:
@@ -737,10 +737,10 @@ packages:
737737
dependency: "direct main"
738738
description:
739739
name: package_info_plus
740-
sha256: "6ff267fcd9d48cb61c8df74a82680e8b82e940231bb5f68356672fde0397334a"
740+
sha256: "7e76fad405b3e4016cd39d08f455a4eb5199723cf594cd1b8916d47140d93017"
741741
url: "https://pub.dev"
742742
source: hosted
743-
version: "4.1.0"
743+
version: "4.2.0"
744744
package_info_plus_platform_interface:
745745
dependency: transitive
746746
description:
@@ -865,10 +865,10 @@ packages:
865865
dependency: "direct main"
866866
description:
867867
name: process_run
868-
sha256: ceacfac6d566a36c895d64edc7e429efb2d6b6303b5e28d5c13bc59fe6e8974e
868+
sha256: "1cb96f835ec02ba1a35af4e6f99f937618023b6d2ffba88f0c0f1041af2e9f12"
869869
url: "https://pub.dev"
870870
source: hosted
871-
version: "0.13.1"
871+
version: "0.13.2"
872872
provider:
873873
dependency: transitive
874874
description:
@@ -921,10 +921,10 @@ packages:
921921
dependency: "direct main"
922922
description:
923923
name: searchfield
924-
sha256: "0ec59811b013868bd2044c770e6ec19ecffc2455796ef4023bb948cd54b93a3a"
924+
sha256: f087957e607a13add3c15e23ac7f9f63110c4e7a2964df81b1448e353e83b9b2
925925
url: "https://pub.dev"
926926
source: hosted
927-
version: "0.8.5"
927+
version: "0.8.6"
928928
shared_preferences:
929929
dependency: "direct main"
930930
description:

pubspec.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: Onix Flutter Clean Architecture
33

44
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
55

6-
version: 1.0.12+12
6+
version: 1.0.13+13
77

88
environment:
99
sdk: '>=3.0.0 <4.0.0'
@@ -19,7 +19,7 @@ dependencies:
1919
flutter_svg: ^2.0.7
2020
window_manager: ^0.3.7
2121
recase: ^4.1.0
22-
process_run: ^0.13.1
22+
process_run: ^0.13.2
2323
logger: ^2.0.2+1
2424
get_it: ^7.6.4
2525
file_selector: ^1.0.1
@@ -29,7 +29,7 @@ dependencies:
2929
json_annotation: ^4.8.1
3030
http: ^1.1.0
3131
collection: ^1.17.0
32-
package_info_plus: ^4.1.0
32+
package_info_plus: ^4.2.0
3333
yaml: ^3.1.2
3434
url_launcher: ^6.1.14
3535
encrypt: ^5.0.3
@@ -38,27 +38,27 @@ dependencies:
3838
loader_overlay: ^2.3.2
3939
dio: ^5.3.3
4040
retry: ^3.1.2
41-
connectivity_plus: ^5.0.0
41+
connectivity_plus: ^5.0.1
4242
internet_connection_checker: ^1.0.0+1
4343
shared_preferences: ^2.2.2
4444
dio_cache_interceptor: ^3.4.4
4545
dio_cache_interceptor_hive_store: ^3.2.1
4646
hive_flutter: ^1.1.0
4747
pretty_dio_logger: ^1.3.1
4848
fluttertoast: ^8.2.2
49-
go_router: ^11.1.4
49+
go_router: ^12.0.0
5050
intl: ^0.18.1
51-
intl_utils: ^2.8.4
51+
intl_utils: ^2.8.5
5252
dropdown_button2: ^2.3.9
53-
searchfield: ^0.8.5
53+
searchfield: ^0.8.6
5454

5555
dev_dependencies:
5656
flutter_test:
5757
sdk: flutter
5858

59-
flutter_lints: ^2.0.3
59+
flutter_lints: ^3.0.0
6060
build_runner: ^2.4.6
61-
freezed: ^2.4.1
61+
freezed: ^2.4.5
6262
json_serializable: ^6.7.1
6363

6464
flutter:

0 commit comments

Comments
 (0)