Skip to content

Commit 41ff93f

Browse files
authored
Merge pull request #13 from Onix-Systems/feat/version_rising
update 1.0.14
2 parents 8069183 + 7eff347 commit 41ff93f

File tree

50 files changed

+382
-343
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+382
-343
lines changed

bricks/flutter_clean_base/__brick__/{{project_name.snakeCase()}}/analysis_options.yaml

Lines changed: 41 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
include: package:flutter_lints/flutter.yaml
22

33
analyzer:
4-
plugins:
5-
- dart_code_metrics
64
exclude:
75
- "build/**"
86
- "**/*.g.dart"
@@ -14,6 +12,8 @@ analyzer:
1412
- "**/*.tailor.dart"
1513
- "ios/**"
1614
- "test/**"
15+
- "lib/core/app/localization/**"
16+
1717
errors:
1818
prefer_mixin: ignore
1919
flutter_style_todos: ignore
@@ -49,6 +49,12 @@ analyzer:
4949
use_build_context_synchronously: info
5050
use_key_in_widget_constructors: info
5151
valid_regexps: error
52+
missing_required_param: error
53+
missing_return: error
54+
collection_methods_unrelated_type: warning
55+
avoid_final_parameters: error
56+
cast_nullable_to_non_nullable: warning
57+
implicit_call_tearoffs: info
5258

5359
linter:
5460
rules:
@@ -75,8 +81,7 @@ linter:
7581
control_flow_in_finally: true
7682
empty_statements: true
7783
hash_and_equals: true
78-
iterable_contains_unrelated_type: true
79-
list_remove_unrelated_type: true
84+
collection_methods_unrelated_type: true
8085
literal_only_boolean_expressions: true
8186
no_adjacent_strings_in_list: true
8287
no_duplicate_case_values: true
@@ -90,6 +95,8 @@ linter:
9095
use_build_context_synchronously: true
9196
use_key_in_widget_constructors: true
9297
valid_regexps: true
98+
avoid_dynamic_calls: true
99+
invalid_case_patterns: true
93100

94101
# Style rules.
95102
always_declare_return_types: true
@@ -155,7 +162,6 @@ linter:
155162
prefer_conditional_assignment: true
156163
prefer_constructors_over_static_methods: true
157164
prefer_contains: true
158-
prefer_equal_for_default_values: true
159165
prefer_final_fields: true
160166
prefer_final_in_for_each: true
161167
prefer_final_locals: true
@@ -181,7 +187,7 @@ linter:
181187
recursive_getters: true
182188
sized_box_for_whitespace: true
183189
slash_for_doc_comments: true
184-
sort_child_properties_last: false
190+
sort_child_properties_last: true
185191
sort_constructors_first: false
186192
sort_unnamed_constructors_first: false
187193
type_annotate_public_apis: true
@@ -214,7 +220,7 @@ linter:
214220
use_string_buffers: true
215221
use_to_and_as_if_applicable: true
216222
void_checks: true
217-
lines_longer_than_80_chars: false
223+
lines_longer_than_80_chars: true
218224
flutter_style_todos: true
219225
conditional_uri_does_not_exist: true
220226
no_leading_underscores_for_library_prefixes: true
@@ -223,9 +229,37 @@ linter:
223229
sized_box_shrink_expand: true
224230
use_decorated_box: true
225231
use_colored_box: true
232+
avoid_double_and_int_checks: true
233+
avoid_final_parameters: true
234+
avoid_redundant_argument_values: true
235+
cast_nullable_to_non_nullable: true
236+
combinators_ordering: true
237+
dangling_library_doc_comments: true
238+
eol_at_end_of_file: true
239+
implicit_call_tearoffs: true
240+
join_return_with_assignment: true
241+
library_private_types_in_public_api: true
242+
no_default_cases: true
243+
noop_primitive_operations: true
244+
null_check_on_nullable_type_parameter: true
245+
package_prefixed_library_names: true
246+
prefer_asserts_with_message: true
247+
prefer_int_literals: true
248+
prefer_null_aware_method_calls: true
249+
require_trailing_commas: true
250+
tighten_type_of_initializing_formals: true
251+
unnecessary_constructor_name: true
252+
unnecessary_library_directive: true
253+
unnecessary_to_list_in_spreads: true
254+
use_enums: true
255+
use_string_in_part_of_directives: true
256+
use_super_parameters: true
257+
use_test_throws_matchers: true
258+
unnecessary_breaks: true
226259

227260
# Pub rules.
228261
package_names: true
262+
depend_on_referenced_packages: true
229263

230264
#https://github.com/dart-lang/lints/blob/main/lib/core.yaml
231265
#https://github.com/dart-lang/lints/blob/main/lib/recommended.yaml

bricks/flutter_clean_base/__brick__/{{project_name.snakeCase()}}/lib/app.gen.dart

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';{{/web_only}}
66
import 'package:{{project_name}}/core/arch/bloc/base_block_state.dart';
77
import 'package:{{project_name}}/app/bloc/app_bloc_imports.dart';
88
import 'package:{{project_name}}/presentation/style/theme/theme_imports.dart';
9-
{{#isGoRouter}}import 'package:{{project_name}}/core/router/app_router.dart';{{/isGoRouter}}
9+
{{#isGoRouter}}import 'package:{{project_name}}/app/router/app_router.dart';{{/isGoRouter}}
1010
{{^isGoRouter}}import 'package:{{project_name}}/core/di/app.dart';{{/isGoRouter}}
1111
{{^handLocalization}}import 'package:flutter_localizations/flutter_localizations.dart';{{/handLocalization}}
12-
{{#handLocalization}}import 'package:{{project_name}}/core/app/localization/common_app_localization_ext.dart';
12+
{{#handLocalization}}import 'package:{{project_name}}/app/localization/common_app_localization_ext.dart';
1313
import 'package:flutter_gen/gen_l10n/app_localizations.dart';{{/handLocalization}}
1414
{{#flavorizr}}import 'package:{{project_name}}/core/arch/widget/common/flavor_banner.dart';{{/flavorizr}}
15-
{{^handLocalization}}import 'package:{{project_name}}/core/app/localization/generated/l10n.dart';{{/handLocalization}}
15+
{{^handLocalization}}import 'package:{{project_name}}/app/localization/generated/l10n.dart';{{/handLocalization}}
1616

1717
class App extends StatefulWidget {
1818
const App({super.key});
@@ -29,21 +29,19 @@ class _AppState extends BaseState<AppScreenState, AppBloc, AppSR, App> {
2929
Widget buildWidget(BuildContext context) {
3030
{{#isGoRouter}}AppRouter.init();{{/isGoRouter}}
3131
return {{^web_only}}GlobalLoaderOverlay(
32-
useDefaultLoading: true,
3332
overlayColor: Colors.black,
3433
overlayOpacity: 0.5,
3534
child: ScreenUtilInit(
3635
designSize: const Size(375, 812),
3736
minTextAdapt: true,
38-
splitScreenMode: false,
3937
builder: (context, child) {
4038
return{{/web_only}} blocConsumer(
4139
stateListener: (state) {
4240
return MaterialApp.router(
4341
debugShowCheckedModeBanner: false,
4442
builder: (context, widget) {
4543
return MediaQuery(
46-
data: MediaQuery.of(context).copyWith(textScaleFactor: 1.0),
44+
data: MediaQuery.of(context).copyWith(textScaleFactor: 1),
4745
{{#flavorizr}}
4846
child: FlavorBanner(
4947
child: widget ?? const SizedBox(),

bricks/flutter_clean_base/__brick__/{{project_name.snakeCase()}}/lib/core/app/app_initialization.dart renamed to bricks/flutter_clean_base/__brick__/{{project_name.snakeCase()}}/lib/app/app_initialization.dart

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
import 'package:get_it/get_it.dart';
22
import 'package:{{project_name}}/core/di/app.dart';
33
import 'package:{{project_name}}/core/di/injection.dart';
4-
import 'package:{{project_name}}/core/di/services.dart';
54

6-
class AppInitialization {
7-
static final AppInitialization _instance =
8-
AppInitialization._privateConstructor();
5+
class Initialization {
6+
static final Initialization _instance = Initialization._privateConstructor();
97

10-
static AppInitialization get I => _instance;
8+
static Initialization get I => _instance;
119

12-
AppInitialization._privateConstructor();
10+
Initialization._privateConstructor();
1311

1412
Future<void> initApp() async {
1513
//TODO init firebase / Crashlytics / Messaging

bricks/flutter_clean_base/__brick__/{{project_name.snakeCase()}}/lib/core/app/app_service.dart renamed to bricks/flutter_clean_base/__brick__/{{project_name.snakeCase()}}/lib/app/app_service.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class AppService {
2626
}
2727
}
2828

29-
await dotenv.load(fileName: '.env');
29+
await dotenv.load();
3030
return true;
3131
}
3232

bricks/flutter_clean_base/__brick__/{{project_name.snakeCase()}}/lib/app/banned_app.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ class BannedApp extends StatelessWidget {
99
home: Scaffold(
1010
body: Center(
1111
child: Padding(
12-
padding: EdgeInsets.all(8.0),
12+
padding: EdgeInsets.all(8),
1313
child: Text(
1414
'App is not working on jail broken or rooted device.',
1515
textAlign: TextAlign.center,
16-
style: TextStyle(fontSize: 32.0),
16+
style: TextStyle(fontSize: 32),
1717
),
1818
),
1919
),
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
class Constants {
2+
static const String filterParamAll = 'All';
3+
}

bricks/flutter_clean_base/__brick__/{{project_name.snakeCase()}}/lib/core/app/localization/l10n/app_en.arb renamed to bricks/flutter_clean_base/__brick__/{{project_name.snakeCase()}}/lib/app/localization/l10n/app_en.arb

File renamed without changes.

bricks/flutter_clean_base/__brick__/{{project_name.snakeCase()}}/lib/core/app/localization/l10n/intl_en.arb renamed to bricks/flutter_clean_base/__brick__/{{project_name.snakeCase()}}/lib/app/localization/l10n/intl_en.arb

File renamed without changes.

bricks/flutter_clean_base/__brick__/{{project_name.snakeCase()}}/lib/core/app/localization/{{#handLocalization}}common_app_localization_ext.dart{{/handLocalization}} renamed to bricks/flutter_clean_base/__brick__/{{project_name.snakeCase()}}/lib/app/localization/{{#handLocalization}}common_app_localization_ext.dart{{/handLocalization}}

File renamed without changes.

bricks/flutter_clean_base/__brick__/{{project_name.snakeCase()}}/lib/core/router/app_router.dart renamed to bricks/flutter_clean_base/__brick__/{{project_name.snakeCase()}}/lib/app/router/app_router.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{{#isGoRouter}}import 'package:flutter_bloc/flutter_bloc.dart';{{/isGoRouter}}
44
import 'package:flutter/material.dart';
55
{{#isGoRouter}}import 'package:go_router/go_router.dart';{{/isGoRouter}}
6-
{{^isGoRouter}}import 'package:{{project_name}}/core/router/guard/init_guard.dart';{{/isGoRouter}}
6+
{{^isGoRouter}}import 'package:{{project_name}}/app/router/guard/init_guard.dart';{{/isGoRouter}}
77
import 'package:{{project_name}}/presentation/screen/home_screen.dart';
88
//{imports end}
99

0 commit comments

Comments
 (0)