From 49f22363c6929f36a8a06084d451b6b49965c012 Mon Sep 17 00:00:00 2001 From: Hamatoma Date: Sun, 30 Jan 2022 16:47:28 +0100 Subject: [PATCH] Refactoring: removing warnings * Refactoring: ** "empty" method onInitialized() commented out ** using annotation no_logic_in_create_state ** all source files formatted --- lib/meta/module_meta_data.dart | 4 +- lib/meta/modules.dart | 4 +- lib/meta/scopes_meta.dart | 6 +- lib/page/benchmarks/benchmark_data.dart | 150 +++++++++++------- .../benchmarks/create_benchmark_page.dart | 4 +- .../benchmarks/delete_benchmark_page.dart | 4 +- lib/page/benchmarks/edit_benchmark_page.dart | 4 +- lib/page/benchmarks/list_benchmark_page.dart | 4 +- lib/page/roles/create_role_page.dart | 4 +- lib/page/roles/edit_role_page.dart | 4 +- lib/page/roles/list_role_page.dart | 4 +- lib/page/roles/role_data.dart | 84 ++++++---- .../rolestarter/list_rolestarter_page.dart | 4 +- .../rolestarter/mapping_rolestarter_page.dart | 4 +- lib/page/rolestarter/role_starter_data.dart | 106 ++++++++----- lib/page/scopes/create_scope_page.dart | 4 +- lib/page/scopes/delete_scope_page.dart | 4 +- lib/page/scopes/edit_scope_page.dart | 4 +- lib/page/scopes/list_scope_page.dart | 4 +- lib/page/scopes/scope_data.dart | 117 +++++++++----- lib/page/starters/create_starter_page.dart | 4 +- lib/page/starters/delete_starter_page.dart | 4 +- lib/page/starters/edit_starter_page.dart | 4 +- lib/page/starters/list_starter_page.dart | 4 +- lib/page/starters/starter_data.dart | 106 ++++++++----- lib/page/users/create_user_page.dart | 4 +- lib/page/users/delete_user_page.dart | 4 +- lib/page/users/edit_user_page.dart | 4 +- lib/page/users/list_user_page.dart | 4 +- lib/page/users/user_data.dart | 128 +++++++++------ lib/setting/global_data.dart | 3 +- lib/widget/date_time_form_field.dart | 85 +++++----- lib/widget/widget_form.dart | 8 +- 33 files changed, 536 insertions(+), 349 deletions(-) diff --git a/lib/meta/module_meta_data.dart b/lib/meta/module_meta_data.dart index 397d768..ffd71ae 100644 --- a/lib/meta/module_meta_data.dart +++ b/lib/meta/module_meta_data.dart @@ -357,8 +357,8 @@ class ModuleMetaData { /// Returns the meta data of a property given by its [name] or null if missing. PropertyMetaData? propertyByName(String name) { PropertyMetaData? rc; - for (final element in propertyList){ - if (element.name == name){ + for (final element in propertyList) { + if (element.name == name) { rc = element; break; } diff --git a/lib/meta/modules.dart b/lib/meta/modules.dart index bc1a2f0..feebb94 100644 --- a/lib/meta/modules.dart +++ b/lib/meta/modules.dart @@ -6,6 +6,7 @@ import 'rolestarter_meta.dart'; import 'scopes_meta.dart'; import 'starters_meta.dart'; import 'users_meta.dart'; + /// Returns the meta data of the module given by [name]. /// Returns null if not found. ModuleMetaData? moduleByName(String name) { @@ -34,8 +35,9 @@ ModuleMetaData? moduleByName(String name) { } return rc; } + /// Returns the module names as string list. -List moduleNames(){ +List moduleNames() { return [ 'Benchmarks', 'Roles', diff --git a/lib/meta/scopes_meta.dart b/lib/meta/scopes_meta.dart index 770aa31..f29ecee 100644 --- a/lib/meta/scopes_meta.dart +++ b/lib/meta/scopes_meta.dart @@ -38,11 +38,11 @@ class ScopesMeta extends ModuleMetaData { 'changedBy', i18n.tr('Changed by'), DataType.string, ':hidden:', size: 32), ], [ - PageMetaData('New Scope', PageType.create, + PageMetaData('New Scope', PageType.create, fields: [CopyDbFields('fields')]), - PageMetaData('Change Scope', PageType.edit, + PageMetaData('Change Scope', PageType.edit, fields: [CopyDbFields('fields')]), - PageMetaData('Delete Scope', PageType.delete, + PageMetaData('Delete Scope', PageType.delete, fields: [CopyDbFields('fields')]), ListPageMetaData( 'Scopes Overview', diff --git a/lib/page/benchmarks/benchmark_data.dart b/lib/page/benchmarks/benchmark_data.dart index 012564d..c693772 100644 --- a/lib/page/benchmarks/benchmark_data.dart +++ b/lib/page/benchmarks/benchmark_data.dart @@ -2,7 +2,8 @@ import '../../base/defines.dart'; import '../../base/helper.dart'; import '../../persistence/data_record.dart'; -class BenchmarkData extends DataRecord{ + +class BenchmarkData extends DataRecord { int? id; String? lastName; String? firstName; @@ -15,78 +16,117 @@ class BenchmarkData extends DataRecord{ String? createdBy; DateTime? changedAt; String? changedBy; - BenchmarkData({ - this.id, this.lastName, this.firstName, this.email, this.birthday, this.active, this.weight, this.income, this.createdAt, this.createdBy, this.changedAt, this.changedBy}); + BenchmarkData( + {this.id, + this.lastName, + this.firstName, + this.email, + this.birthday, + this.active, + this.weight, + this.income, + this.createdAt, + this.createdBy, + this.changedAt, + this.changedBy}); BenchmarkData.createFromMap(DataMap map) { fromMap(map); } @override void fromMap(DataMap map) { - id = map.containsKey('benchmark_id') ? fromString(map['benchmark_id'], dataType: DataType.reference) : null; - lastName = map.containsKey('benchmark_lastname') ? fromString(map['benchmark_lastname'], dataType: DataType.string) : null; - firstName = map.containsKey('benchmark_firstname') ? fromString(map['benchmark_firstname'], dataType: DataType.string) : null; - email = map.containsKey('benchmark_email') ? fromString(map['benchmark_email'], dataType: DataType.string) : null; - birthday = map.containsKey('benchmark_birthday') ? fromString(map['benchmark_birthday'], dataType: DataType.date) : null; - active = map.containsKey('benchmark_active') ? fromString(map['benchmark_active'], dataType: DataType.bool) : null; - weight = map.containsKey('benchmark_weight') ? fromString(map['benchmark_weight'], dataType: DataType.float) : null; - income = map.containsKey('benchmark_income') ? fromString(map['benchmark_income'], dataType: DataType.currency) : null; - createdAt = map.containsKey('benchmark_createdat') ? fromString(map['benchmark_createdat'], dataType: DataType.datetime) : null; - createdBy = map.containsKey('benchmark_createdby') ? fromString(map['benchmark_createdby'], dataType: DataType.string) : null; - changedAt = map.containsKey('benchmark_changedat') ? fromString(map['benchmark_changedat'], dataType: DataType.datetime) : null; - changedBy = map.containsKey('benchmark_changedby') ? fromString(map['benchmark_changedby'], dataType: DataType.string) : null; + id = map.containsKey('benchmark_id') + ? fromString(map['benchmark_id'], dataType: DataType.reference) + : null; + lastName = map.containsKey('benchmark_lastname') + ? fromString(map['benchmark_lastname'], dataType: DataType.string) + : null; + firstName = map.containsKey('benchmark_firstname') + ? fromString(map['benchmark_firstname'], dataType: DataType.string) + : null; + email = map.containsKey('benchmark_email') + ? fromString(map['benchmark_email'], dataType: DataType.string) + : null; + birthday = map.containsKey('benchmark_birthday') + ? fromString(map['benchmark_birthday'], dataType: DataType.date) + : null; + active = map.containsKey('benchmark_active') + ? fromString(map['benchmark_active'], dataType: DataType.bool) + : null; + weight = map.containsKey('benchmark_weight') + ? fromString(map['benchmark_weight'], dataType: DataType.float) + : null; + income = map.containsKey('benchmark_income') + ? fromString(map['benchmark_income'], dataType: DataType.currency) + : null; + createdAt = map.containsKey('benchmark_createdat') + ? fromString(map['benchmark_createdat'], dataType: DataType.datetime) + : null; + createdBy = map.containsKey('benchmark_createdby') + ? fromString(map['benchmark_createdby'], dataType: DataType.string) + : null; + changedAt = map.containsKey('benchmark_changedat') + ? fromString(map['benchmark_changedat'], dataType: DataType.datetime) + : null; + changedBy = map.containsKey('benchmark_changedby') + ? fromString(map['benchmark_changedby'], dataType: DataType.string) + : null; } + @override int keyOf() { return id ?? 0; } + @override - String nameOfKey(){ + String nameOfKey() { return 'benchmark_id'; } + static DataType? dataTypeOf(String name) { DataType? rc; - switch(name){ - case 'id': - rc = DataType.reference; - break; - case 'lastName': - rc = DataType.string; - break; - case 'firstName': - rc = DataType.string; - break; - case 'email': - rc = DataType.string; - break; - case 'birthday': - rc = DataType.date; - break; - case 'active': - rc = DataType.bool; - break; - case 'weight': - rc = DataType.float; - break; - case 'income': - rc = DataType.currency; - break; - case 'createdAt': - rc = DataType.datetime; - break; - case 'createdBy': - rc = DataType.string; - break; - case 'changedAt': - rc = DataType.datetime; - break; - case 'changedBy': - rc = DataType.string; - break; - default: - break; + switch (name) { + case 'id': + rc = DataType.reference; + break; + case 'lastName': + rc = DataType.string; + break; + case 'firstName': + rc = DataType.string; + break; + case 'email': + rc = DataType.string; + break; + case 'birthday': + rc = DataType.date; + break; + case 'active': + rc = DataType.bool; + break; + case 'weight': + rc = DataType.float; + break; + case 'income': + rc = DataType.currency; + break; + case 'createdAt': + rc = DataType.datetime; + break; + case 'createdBy': + rc = DataType.string; + break; + case 'changedAt': + rc = DataType.datetime; + break; + case 'changedBy': + rc = DataType.string; + break; + default: + break; } return rc; } + @override DataMap toMap({DataMap? map, bool clear = true}) { map ??= DataMap(); diff --git a/lib/page/benchmarks/create_benchmark_page.dart b/lib/page/benchmarks/create_benchmark_page.dart index 991604e..3933f0e 100644 --- a/lib/page/benchmarks/create_benchmark_page.dart +++ b/lib/page/benchmarks/create_benchmark_page.dart @@ -27,7 +27,7 @@ class CreateBenchmarkPage extends StatefulWidget { } class _CreateBenchmarkPageState extends CreateBenchmarkCustom { - _CreateBenchmarkPageState(): super(); + _CreateBenchmarkPageState() : super(); @override void didChangeDependencies() { final size = MediaQuery.of(context).size; @@ -58,4 +58,4 @@ class _CreateBenchmarkPageState extends CreateBenchmarkCustom { }); } } -} \ No newline at end of file +} diff --git a/lib/page/benchmarks/delete_benchmark_page.dart b/lib/page/benchmarks/delete_benchmark_page.dart index 1fbb33c..e11e701 100644 --- a/lib/page/benchmarks/delete_benchmark_page.dart +++ b/lib/page/benchmarks/delete_benchmark_page.dart @@ -28,7 +28,7 @@ class DeleteBenchmarkPage extends StatefulWidget { } class _DeleteBenchmarkPageState extends DeleteBenchmarkCustom { - _DeleteBenchmarkPageState(int primaryKey): super(primaryKey); + _DeleteBenchmarkPageState(int primaryKey) : super(primaryKey); @override void didChangeDependencies() { final size = MediaQuery.of(context).size; @@ -59,4 +59,4 @@ class _DeleteBenchmarkPageState extends DeleteBenchmarkCustom { }); } } -} \ No newline at end of file +} diff --git a/lib/page/benchmarks/edit_benchmark_page.dart b/lib/page/benchmarks/edit_benchmark_page.dart index e58ba43..53f305c 100644 --- a/lib/page/benchmarks/edit_benchmark_page.dart +++ b/lib/page/benchmarks/edit_benchmark_page.dart @@ -28,7 +28,7 @@ class EditBenchmarkPage extends StatefulWidget { } class _EditBenchmarkPageState extends EditBenchmarkCustom { - _EditBenchmarkPageState(int primaryKey): super(primaryKey); + _EditBenchmarkPageState(int primaryKey) : super(primaryKey); @override void didChangeDependencies() { final size = MediaQuery.of(context).size; @@ -59,4 +59,4 @@ class _EditBenchmarkPageState extends EditBenchmarkCustom { }); } } -} \ No newline at end of file +} diff --git a/lib/page/benchmarks/list_benchmark_page.dart b/lib/page/benchmarks/list_benchmark_page.dart index e3322eb..6a65fa0 100644 --- a/lib/page/benchmarks/list_benchmark_page.dart +++ b/lib/page/benchmarks/list_benchmark_page.dart @@ -27,7 +27,7 @@ class ListBenchmarkPage extends StatefulWidget { } class _ListBenchmarkPageState extends ListBenchmarkCustom { - _ListBenchmarkPageState(): super(); + _ListBenchmarkPageState() : super(); @override void didChangeDependencies() { final size = MediaQuery.of(context).size; @@ -58,4 +58,4 @@ class _ListBenchmarkPageState extends ListBenchmarkCustom { }); } } -} \ No newline at end of file +} diff --git a/lib/page/roles/create_role_page.dart b/lib/page/roles/create_role_page.dart index b9d78ae..57426c9 100644 --- a/lib/page/roles/create_role_page.dart +++ b/lib/page/roles/create_role_page.dart @@ -27,7 +27,7 @@ class CreateRolePage extends StatefulWidget { } class _CreateRolePageState extends CreateRoleCustom { - _CreateRolePageState(): super(); + _CreateRolePageState() : super(); @override void didChangeDependencies() { final size = MediaQuery.of(context).size; @@ -58,4 +58,4 @@ class _CreateRolePageState extends CreateRoleCustom { }); } } -} \ No newline at end of file +} diff --git a/lib/page/roles/edit_role_page.dart b/lib/page/roles/edit_role_page.dart index 783f22a..c720ac8 100644 --- a/lib/page/roles/edit_role_page.dart +++ b/lib/page/roles/edit_role_page.dart @@ -28,7 +28,7 @@ class EditRolePage extends StatefulWidget { } class _EditRolePageState extends EditRoleCustom { - _EditRolePageState(int primaryKey): super(primaryKey); + _EditRolePageState(int primaryKey) : super(primaryKey); @override void didChangeDependencies() { final size = MediaQuery.of(context).size; @@ -59,4 +59,4 @@ class _EditRolePageState extends EditRoleCustom { }); } } -} \ No newline at end of file +} diff --git a/lib/page/roles/list_role_page.dart b/lib/page/roles/list_role_page.dart index 5ca9b46..fee466d 100644 --- a/lib/page/roles/list_role_page.dart +++ b/lib/page/roles/list_role_page.dart @@ -27,7 +27,7 @@ class ListRolePage extends StatefulWidget { } class _ListRolePageState extends ListRoleCustom { - _ListRolePageState(): super(); + _ListRolePageState() : super(); @override void didChangeDependencies() { final size = MediaQuery.of(context).size; @@ -58,4 +58,4 @@ class _ListRolePageState extends ListRoleCustom { }); } } -} \ No newline at end of file +} diff --git a/lib/page/roles/role_data.dart b/lib/page/roles/role_data.dart index 0b1a3ca..317e9db 100644 --- a/lib/page/roles/role_data.dart +++ b/lib/page/roles/role_data.dart @@ -2,61 +2,83 @@ import '../../base/defines.dart'; import '../../base/helper.dart'; import '../../persistence/data_record.dart'; -class RoleData extends DataRecord{ + +class RoleData extends DataRecord { int? id; String? name; DateTime? createdAt; String? createdBy; DateTime? changedAt; String? changedBy; - RoleData({ - this.id, this.name, this.createdAt, this.createdBy, this.changedAt, this.changedBy}); + RoleData( + {this.id, + this.name, + this.createdAt, + this.createdBy, + this.changedAt, + this.changedBy}); RoleData.createFromMap(DataMap map) { fromMap(map); } @override void fromMap(DataMap map) { - id = map.containsKey('role_id') ? fromString(map['role_id'], dataType: DataType.reference) : null; - name = map.containsKey('role_name') ? fromString(map['role_name'], dataType: DataType.string) : null; - createdAt = map.containsKey('role_createdat') ? fromString(map['role_createdat'], dataType: DataType.datetime) : null; - createdBy = map.containsKey('role_createdby') ? fromString(map['role_createdby'], dataType: DataType.string) : null; - changedAt = map.containsKey('role_changedat') ? fromString(map['role_changedat'], dataType: DataType.datetime) : null; - changedBy = map.containsKey('role_changedby') ? fromString(map['role_changedby'], dataType: DataType.string) : null; + id = map.containsKey('role_id') + ? fromString(map['role_id'], dataType: DataType.reference) + : null; + name = map.containsKey('role_name') + ? fromString(map['role_name'], dataType: DataType.string) + : null; + createdAt = map.containsKey('role_createdat') + ? fromString(map['role_createdat'], dataType: DataType.datetime) + : null; + createdBy = map.containsKey('role_createdby') + ? fromString(map['role_createdby'], dataType: DataType.string) + : null; + changedAt = map.containsKey('role_changedat') + ? fromString(map['role_changedat'], dataType: DataType.datetime) + : null; + changedBy = map.containsKey('role_changedby') + ? fromString(map['role_changedby'], dataType: DataType.string) + : null; } + @override int keyOf() { return id ?? 0; } + @override - String nameOfKey(){ + String nameOfKey() { return 'role_id'; } + static DataType? dataTypeOf(String name) { DataType? rc; - switch(name){ - case 'id': - rc = DataType.reference; - break; - case 'name': - rc = DataType.string; - break; - case 'createdAt': - rc = DataType.datetime; - break; - case 'createdBy': - rc = DataType.string; - break; - case 'changedAt': - rc = DataType.datetime; - break; - case 'changedBy': - rc = DataType.string; - break; - default: - break; + switch (name) { + case 'id': + rc = DataType.reference; + break; + case 'name': + rc = DataType.string; + break; + case 'createdAt': + rc = DataType.datetime; + break; + case 'createdBy': + rc = DataType.string; + break; + case 'changedAt': + rc = DataType.datetime; + break; + case 'changedBy': + rc = DataType.string; + break; + default: + break; } return rc; } + @override DataMap toMap({DataMap? map, bool clear = true}) { map ??= DataMap(); diff --git a/lib/page/rolestarter/list_rolestarter_page.dart b/lib/page/rolestarter/list_rolestarter_page.dart index a8dc117..0d1b5b9 100644 --- a/lib/page/rolestarter/list_rolestarter_page.dart +++ b/lib/page/rolestarter/list_rolestarter_page.dart @@ -27,7 +27,7 @@ class ListRoleStarterPage extends StatefulWidget { } class _ListRoleStarterPageState extends ListRoleStarterCustom { - _ListRoleStarterPageState(): super(); + _ListRoleStarterPageState() : super(); @override void didChangeDependencies() { final size = MediaQuery.of(context).size; @@ -58,4 +58,4 @@ class _ListRoleStarterPageState extends ListRoleStarterCustom { }); } } -} \ No newline at end of file +} diff --git a/lib/page/rolestarter/mapping_rolestarter_page.dart b/lib/page/rolestarter/mapping_rolestarter_page.dart index a49f2bf..4c97680 100644 --- a/lib/page/rolestarter/mapping_rolestarter_page.dart +++ b/lib/page/rolestarter/mapping_rolestarter_page.dart @@ -27,7 +27,7 @@ class MappingRoleStarterPage extends StatefulWidget { } class _MappingRoleStarterPageState extends MappingRoleStarterCustom { - _MappingRoleStarterPageState(): super(); + _MappingRoleStarterPageState() : super(); @override void didChangeDependencies() { final size = MediaQuery.of(context).size; @@ -58,4 +58,4 @@ class _MappingRoleStarterPageState extends MappingRoleStarterCustom { }); } } -} \ No newline at end of file +} diff --git a/lib/page/rolestarter/role_starter_data.dart b/lib/page/rolestarter/role_starter_data.dart index cfec0fa..2e761f3 100644 --- a/lib/page/rolestarter/role_starter_data.dart +++ b/lib/page/rolestarter/role_starter_data.dart @@ -2,7 +2,8 @@ import '../../base/defines.dart'; import '../../base/helper.dart'; import '../../persistence/data_record.dart'; -class RoleStarterData extends DataRecord{ + +class RoleStarterData extends DataRecord { int? id; int? role; int? starter; @@ -11,62 +12,89 @@ class RoleStarterData extends DataRecord{ String? createdBy; DateTime? changedAt; String? changedBy; - RoleStarterData({ - this.id, this.role, this.starter, this.order, this.createdAt, this.createdBy, this.changedAt, this.changedBy}); + RoleStarterData( + {this.id, + this.role, + this.starter, + this.order, + this.createdAt, + this.createdBy, + this.changedAt, + this.changedBy}); RoleStarterData.createFromMap(DataMap map) { fromMap(map); } @override void fromMap(DataMap map) { - id = map.containsKey('rolestarter_id') ? fromString(map['rolestarter_id'], dataType: DataType.reference) : null; - role = map.containsKey('rolestarter_role') ? fromString(map['rolestarter_role'], dataType: DataType.reference) : null; - starter = map.containsKey('rolestarter_starter') ? fromString(map['rolestarter_starter'], dataType: DataType.reference) : null; - order = map.containsKey('rolestarter_order') ? fromString(map['rolestarter_order'], dataType: DataType.int) : null; - createdAt = map.containsKey('rolestarter_createdat') ? fromString(map['rolestarter_createdat'], dataType: DataType.datetime) : null; - createdBy = map.containsKey('rolestarter_createdby') ? fromString(map['rolestarter_createdby'], dataType: DataType.string) : null; - changedAt = map.containsKey('rolestarter_changedat') ? fromString(map['rolestarter_changedat'], dataType: DataType.datetime) : null; - changedBy = map.containsKey('rolestarter_changedby') ? fromString(map['rolestarter_changedby'], dataType: DataType.string) : null; + id = map.containsKey('rolestarter_id') + ? fromString(map['rolestarter_id'], dataType: DataType.reference) + : null; + role = map.containsKey('rolestarter_role') + ? fromString(map['rolestarter_role'], dataType: DataType.reference) + : null; + starter = map.containsKey('rolestarter_starter') + ? fromString(map['rolestarter_starter'], dataType: DataType.reference) + : null; + order = map.containsKey('rolestarter_order') + ? fromString(map['rolestarter_order'], dataType: DataType.int) + : null; + createdAt = map.containsKey('rolestarter_createdat') + ? fromString(map['rolestarter_createdat'], dataType: DataType.datetime) + : null; + createdBy = map.containsKey('rolestarter_createdby') + ? fromString(map['rolestarter_createdby'], dataType: DataType.string) + : null; + changedAt = map.containsKey('rolestarter_changedat') + ? fromString(map['rolestarter_changedat'], dataType: DataType.datetime) + : null; + changedBy = map.containsKey('rolestarter_changedby') + ? fromString(map['rolestarter_changedby'], dataType: DataType.string) + : null; } + @override int keyOf() { return id ?? 0; } + @override - String nameOfKey(){ + String nameOfKey() { return 'rolestarter_id'; } + static DataType? dataTypeOf(String name) { DataType? rc; - switch(name){ - case 'id': - rc = DataType.reference; - break; - case 'role': - rc = DataType.reference; - break; - case 'starter': - rc = DataType.reference; - break; - case 'order': - rc = DataType.int; - break; - case 'createdAt': - rc = DataType.datetime; - break; - case 'createdBy': - rc = DataType.string; - break; - case 'changedAt': - rc = DataType.datetime; - break; - case 'changedBy': - rc = DataType.string; - break; - default: - break; + switch (name) { + case 'id': + rc = DataType.reference; + break; + case 'role': + rc = DataType.reference; + break; + case 'starter': + rc = DataType.reference; + break; + case 'order': + rc = DataType.int; + break; + case 'createdAt': + rc = DataType.datetime; + break; + case 'createdBy': + rc = DataType.string; + break; + case 'changedAt': + rc = DataType.datetime; + break; + case 'changedBy': + rc = DataType.string; + break; + default: + break; } return rc; } + @override DataMap toMap({DataMap? map, bool clear = true}) { map ??= DataMap(); diff --git a/lib/page/scopes/create_scope_page.dart b/lib/page/scopes/create_scope_page.dart index 89e3a03..e55f1d5 100644 --- a/lib/page/scopes/create_scope_page.dart +++ b/lib/page/scopes/create_scope_page.dart @@ -27,7 +27,7 @@ class CreateScopePage extends StatefulWidget { } class _CreateScopePageState extends CreateScopeCustom { - _CreateScopePageState(): super(); + _CreateScopePageState() : super(); @override void didChangeDependencies() { final size = MediaQuery.of(context).size; @@ -58,4 +58,4 @@ class _CreateScopePageState extends CreateScopeCustom { }); } } -} \ No newline at end of file +} diff --git a/lib/page/scopes/delete_scope_page.dart b/lib/page/scopes/delete_scope_page.dart index 9a77550..2fb307c 100644 --- a/lib/page/scopes/delete_scope_page.dart +++ b/lib/page/scopes/delete_scope_page.dart @@ -28,7 +28,7 @@ class DeleteScopePage extends StatefulWidget { } class _DeleteScopePageState extends DeleteScopeCustom { - _DeleteScopePageState(int primaryKey): super(primaryKey); + _DeleteScopePageState(int primaryKey) : super(primaryKey); @override void didChangeDependencies() { final size = MediaQuery.of(context).size; @@ -59,4 +59,4 @@ class _DeleteScopePageState extends DeleteScopeCustom { }); } } -} \ No newline at end of file +} diff --git a/lib/page/scopes/edit_scope_page.dart b/lib/page/scopes/edit_scope_page.dart index 74be668..a8c109d 100644 --- a/lib/page/scopes/edit_scope_page.dart +++ b/lib/page/scopes/edit_scope_page.dart @@ -28,7 +28,7 @@ class EditScopePage extends StatefulWidget { } class _EditScopePageState extends EditScopeCustom { - _EditScopePageState(int primaryKey): super(primaryKey); + _EditScopePageState(int primaryKey) : super(primaryKey); @override void didChangeDependencies() { final size = MediaQuery.of(context).size; @@ -59,4 +59,4 @@ class _EditScopePageState extends EditScopeCustom { }); } } -} \ No newline at end of file +} diff --git a/lib/page/scopes/list_scope_page.dart b/lib/page/scopes/list_scope_page.dart index 3ccb9ef..9459ea0 100644 --- a/lib/page/scopes/list_scope_page.dart +++ b/lib/page/scopes/list_scope_page.dart @@ -27,7 +27,7 @@ class ListScopePage extends StatefulWidget { } class _ListScopePageState extends ListScopeCustom { - _ListScopePageState(): super(); + _ListScopePageState() : super(); @override void didChangeDependencies() { final size = MediaQuery.of(context).size; @@ -58,4 +58,4 @@ class _ListScopePageState extends ListScopeCustom { }); } } -} \ No newline at end of file +} diff --git a/lib/page/scopes/scope_data.dart b/lib/page/scopes/scope_data.dart index 582183d..0e0bb45 100644 --- a/lib/page/scopes/scope_data.dart +++ b/lib/page/scopes/scope_data.dart @@ -2,7 +2,8 @@ import '../../base/defines.dart'; import '../../base/helper.dart'; import '../../persistence/data_record.dart'; -class ScopeData extends DataRecord{ + +class ScopeData extends DataRecord { int? id; String? scope; String? name; @@ -12,66 +13,96 @@ class ScopeData extends DataRecord{ String? createdBy; DateTime? changedAt; String? changedBy; - ScopeData({ - this.id, this.scope, this.name, this.value, this.position, this.createdAt, this.createdBy, this.changedAt, this.changedBy}); + ScopeData( + {this.id, + this.scope, + this.name, + this.value, + this.position, + this.createdAt, + this.createdBy, + this.changedAt, + this.changedBy}); ScopeData.createFromMap(DataMap map) { fromMap(map); } @override void fromMap(DataMap map) { - id = map.containsKey('scope_id') ? fromString(map['scope_id'], dataType: DataType.reference) : null; - scope = map.containsKey('scope_scope') ? fromString(map['scope_scope'], dataType: DataType.string) : null; - name = map.containsKey('scope_name') ? fromString(map['scope_name'], dataType: DataType.string) : null; - value = map.containsKey('scope_value') ? fromString(map['scope_value'], dataType: DataType.string) : null; - position = map.containsKey('scope_position') ? fromString(map['scope_position'], dataType: DataType.int) : null; - createdAt = map.containsKey('scope_createdat') ? fromString(map['scope_createdat'], dataType: DataType.datetime) : null; - createdBy = map.containsKey('scope_createdby') ? fromString(map['scope_createdby'], dataType: DataType.string) : null; - changedAt = map.containsKey('scope_changedat') ? fromString(map['scope_changedat'], dataType: DataType.datetime) : null; - changedBy = map.containsKey('scope_changedby') ? fromString(map['scope_changedby'], dataType: DataType.string) : null; + id = map.containsKey('scope_id') + ? fromString(map['scope_id'], dataType: DataType.reference) + : null; + scope = map.containsKey('scope_scope') + ? fromString(map['scope_scope'], dataType: DataType.string) + : null; + name = map.containsKey('scope_name') + ? fromString(map['scope_name'], dataType: DataType.string) + : null; + value = map.containsKey('scope_value') + ? fromString(map['scope_value'], dataType: DataType.string) + : null; + position = map.containsKey('scope_position') + ? fromString(map['scope_position'], dataType: DataType.int) + : null; + createdAt = map.containsKey('scope_createdat') + ? fromString(map['scope_createdat'], dataType: DataType.datetime) + : null; + createdBy = map.containsKey('scope_createdby') + ? fromString(map['scope_createdby'], dataType: DataType.string) + : null; + changedAt = map.containsKey('scope_changedat') + ? fromString(map['scope_changedat'], dataType: DataType.datetime) + : null; + changedBy = map.containsKey('scope_changedby') + ? fromString(map['scope_changedby'], dataType: DataType.string) + : null; } + @override int keyOf() { return id ?? 0; } + @override - String nameOfKey(){ + String nameOfKey() { return 'scope_id'; } + static DataType? dataTypeOf(String name) { DataType? rc; - switch(name){ - case 'id': - rc = DataType.reference; - break; - case 'scope': - rc = DataType.string; - break; - case 'name': - rc = DataType.string; - break; - case 'value': - rc = DataType.string; - break; - case 'position': - rc = DataType.int; - break; - case 'createdAt': - rc = DataType.datetime; - break; - case 'createdBy': - rc = DataType.string; - break; - case 'changedAt': - rc = DataType.datetime; - break; - case 'changedBy': - rc = DataType.string; - break; - default: - break; + switch (name) { + case 'id': + rc = DataType.reference; + break; + case 'scope': + rc = DataType.string; + break; + case 'name': + rc = DataType.string; + break; + case 'value': + rc = DataType.string; + break; + case 'position': + rc = DataType.int; + break; + case 'createdAt': + rc = DataType.datetime; + break; + case 'createdBy': + rc = DataType.string; + break; + case 'changedAt': + rc = DataType.datetime; + break; + case 'changedBy': + rc = DataType.string; + break; + default: + break; } return rc; } + @override DataMap toMap({DataMap? map, bool clear = true}) { map ??= DataMap(); diff --git a/lib/page/starters/create_starter_page.dart b/lib/page/starters/create_starter_page.dart index 7e3c775..5834647 100644 --- a/lib/page/starters/create_starter_page.dart +++ b/lib/page/starters/create_starter_page.dart @@ -27,7 +27,7 @@ class CreateStarterPage extends StatefulWidget { } class _CreateStarterPageState extends CreateStarterCustom { - _CreateStarterPageState(): super(); + _CreateStarterPageState() : super(); @override void didChangeDependencies() { final size = MediaQuery.of(context).size; @@ -58,4 +58,4 @@ class _CreateStarterPageState extends CreateStarterCustom { }); } } -} \ No newline at end of file +} diff --git a/lib/page/starters/delete_starter_page.dart b/lib/page/starters/delete_starter_page.dart index c005795..0d16fe3 100644 --- a/lib/page/starters/delete_starter_page.dart +++ b/lib/page/starters/delete_starter_page.dart @@ -28,7 +28,7 @@ class DeleteStarterPage extends StatefulWidget { } class _DeleteStarterPageState extends DeleteStarterCustom { - _DeleteStarterPageState(int primaryKey): super(primaryKey); + _DeleteStarterPageState(int primaryKey) : super(primaryKey); @override void didChangeDependencies() { final size = MediaQuery.of(context).size; @@ -59,4 +59,4 @@ class _DeleteStarterPageState extends DeleteStarterCustom { }); } } -} \ No newline at end of file +} diff --git a/lib/page/starters/edit_starter_page.dart b/lib/page/starters/edit_starter_page.dart index 4c835d8..2768e25 100644 --- a/lib/page/starters/edit_starter_page.dart +++ b/lib/page/starters/edit_starter_page.dart @@ -28,7 +28,7 @@ class EditStarterPage extends StatefulWidget { } class _EditStarterPageState extends EditStarterCustom { - _EditStarterPageState(int primaryKey): super(primaryKey); + _EditStarterPageState(int primaryKey) : super(primaryKey); @override void didChangeDependencies() { final size = MediaQuery.of(context).size; @@ -59,4 +59,4 @@ class _EditStarterPageState extends EditStarterCustom { }); } } -} \ No newline at end of file +} diff --git a/lib/page/starters/list_starter_page.dart b/lib/page/starters/list_starter_page.dart index 11bfb00..795a7d2 100644 --- a/lib/page/starters/list_starter_page.dart +++ b/lib/page/starters/list_starter_page.dart @@ -27,7 +27,7 @@ class ListStarterPage extends StatefulWidget { } class _ListStarterPageState extends ListStarterCustom { - _ListStarterPageState(): super(); + _ListStarterPageState() : super(); @override void didChangeDependencies() { final size = MediaQuery.of(context).size; @@ -58,4 +58,4 @@ class _ListStarterPageState extends ListStarterCustom { }); } } -} \ No newline at end of file +} diff --git a/lib/page/starters/starter_data.dart b/lib/page/starters/starter_data.dart index 40b89c8..46c8085 100644 --- a/lib/page/starters/starter_data.dart +++ b/lib/page/starters/starter_data.dart @@ -2,7 +2,8 @@ import '../../base/defines.dart'; import '../../base/helper.dart'; import '../../persistence/data_record.dart'; -class StarterData extends DataRecord{ + +class StarterData extends DataRecord { int? id; String? name; String? route; @@ -11,62 +12,89 @@ class StarterData extends DataRecord{ String? createdBy; DateTime? changedAt; String? changedBy; - StarterData({ - this.id, this.name, this.route, this.icon, this.createdAt, this.createdBy, this.changedAt, this.changedBy}); + StarterData( + {this.id, + this.name, + this.route, + this.icon, + this.createdAt, + this.createdBy, + this.changedAt, + this.changedBy}); StarterData.createFromMap(DataMap map) { fromMap(map); } @override void fromMap(DataMap map) { - id = map.containsKey('starter_id') ? fromString(map['starter_id'], dataType: DataType.reference) : null; - name = map.containsKey('starter_name') ? fromString(map['starter_name'], dataType: DataType.string) : null; - route = map.containsKey('starter_route') ? fromString(map['starter_route'], dataType: DataType.string) : null; - icon = map.containsKey('starter_icon') ? fromString(map['starter_icon'], dataType: DataType.string) : null; - createdAt = map.containsKey('starter_createdat') ? fromString(map['starter_createdat'], dataType: DataType.datetime) : null; - createdBy = map.containsKey('starter_createdby') ? fromString(map['starter_createdby'], dataType: DataType.string) : null; - changedAt = map.containsKey('starter_changedat') ? fromString(map['starter_changedat'], dataType: DataType.datetime) : null; - changedBy = map.containsKey('starter_changedby') ? fromString(map['starter_changedby'], dataType: DataType.string) : null; + id = map.containsKey('starter_id') + ? fromString(map['starter_id'], dataType: DataType.reference) + : null; + name = map.containsKey('starter_name') + ? fromString(map['starter_name'], dataType: DataType.string) + : null; + route = map.containsKey('starter_route') + ? fromString(map['starter_route'], dataType: DataType.string) + : null; + icon = map.containsKey('starter_icon') + ? fromString(map['starter_icon'], dataType: DataType.string) + : null; + createdAt = map.containsKey('starter_createdat') + ? fromString(map['starter_createdat'], dataType: DataType.datetime) + : null; + createdBy = map.containsKey('starter_createdby') + ? fromString(map['starter_createdby'], dataType: DataType.string) + : null; + changedAt = map.containsKey('starter_changedat') + ? fromString(map['starter_changedat'], dataType: DataType.datetime) + : null; + changedBy = map.containsKey('starter_changedby') + ? fromString(map['starter_changedby'], dataType: DataType.string) + : null; } + @override int keyOf() { return id ?? 0; } + @override - String nameOfKey(){ + String nameOfKey() { return 'starter_id'; } + static DataType? dataTypeOf(String name) { DataType? rc; - switch(name){ - case 'id': - rc = DataType.reference; - break; - case 'name': - rc = DataType.string; - break; - case 'route': - rc = DataType.string; - break; - case 'icon': - rc = DataType.string; - break; - case 'createdAt': - rc = DataType.datetime; - break; - case 'createdBy': - rc = DataType.string; - break; - case 'changedAt': - rc = DataType.datetime; - break; - case 'changedBy': - rc = DataType.string; - break; - default: - break; + switch (name) { + case 'id': + rc = DataType.reference; + break; + case 'name': + rc = DataType.string; + break; + case 'route': + rc = DataType.string; + break; + case 'icon': + rc = DataType.string; + break; + case 'createdAt': + rc = DataType.datetime; + break; + case 'createdBy': + rc = DataType.string; + break; + case 'changedAt': + rc = DataType.datetime; + break; + case 'changedBy': + rc = DataType.string; + break; + default: + break; } return rc; } + @override DataMap toMap({DataMap? map, bool clear = true}) { map ??= DataMap(); diff --git a/lib/page/users/create_user_page.dart b/lib/page/users/create_user_page.dart index d9753e5..9428ee7 100644 --- a/lib/page/users/create_user_page.dart +++ b/lib/page/users/create_user_page.dart @@ -27,7 +27,7 @@ class CreateUserPage extends StatefulWidget { } class _CreateUserPageState extends CreateUserCustom { - _CreateUserPageState(): super(); + _CreateUserPageState() : super(); @override void didChangeDependencies() { final size = MediaQuery.of(context).size; @@ -58,4 +58,4 @@ class _CreateUserPageState extends CreateUserCustom { }); } } -} \ No newline at end of file +} diff --git a/lib/page/users/delete_user_page.dart b/lib/page/users/delete_user_page.dart index e47fd89..5b62757 100644 --- a/lib/page/users/delete_user_page.dart +++ b/lib/page/users/delete_user_page.dart @@ -28,7 +28,7 @@ class DeleteUserPage extends StatefulWidget { } class _DeleteUserPageState extends DeleteUserCustom { - _DeleteUserPageState(int primaryKey): super(primaryKey); + _DeleteUserPageState(int primaryKey) : super(primaryKey); @override void didChangeDependencies() { final size = MediaQuery.of(context).size; @@ -59,4 +59,4 @@ class _DeleteUserPageState extends DeleteUserCustom { }); } } -} \ No newline at end of file +} diff --git a/lib/page/users/edit_user_page.dart b/lib/page/users/edit_user_page.dart index cdad6f5..18ae325 100644 --- a/lib/page/users/edit_user_page.dart +++ b/lib/page/users/edit_user_page.dart @@ -28,7 +28,7 @@ class EditUserPage extends StatefulWidget { } class _EditUserPageState extends EditUserCustom { - _EditUserPageState(int primaryKey): super(primaryKey); + _EditUserPageState(int primaryKey) : super(primaryKey); @override void didChangeDependencies() { final size = MediaQuery.of(context).size; @@ -59,4 +59,4 @@ class _EditUserPageState extends EditUserCustom { }); } } -} \ No newline at end of file +} diff --git a/lib/page/users/list_user_page.dart b/lib/page/users/list_user_page.dart index ee8b21d..b4f014c 100644 --- a/lib/page/users/list_user_page.dart +++ b/lib/page/users/list_user_page.dart @@ -27,7 +27,7 @@ class ListUserPage extends StatefulWidget { } class _ListUserPageState extends ListUserCustom { - _ListUserPageState(): super(); + _ListUserPageState() : super(); @override void didChangeDependencies() { final size = MediaQuery.of(context).size; @@ -58,4 +58,4 @@ class _ListUserPageState extends ListUserCustom { }); } } -} \ No newline at end of file +} diff --git a/lib/page/users/user_data.dart b/lib/page/users/user_data.dart index f4fb24f..0597524 100644 --- a/lib/page/users/user_data.dart +++ b/lib/page/users/user_data.dart @@ -2,7 +2,8 @@ import '../../base/defines.dart'; import '../../base/helper.dart'; import '../../persistence/data_record.dart'; -class UserData extends DataRecord{ + +class UserData extends DataRecord { int? id; String? name; String? displayName; @@ -13,70 +14,103 @@ class UserData extends DataRecord{ String? createdBy; DateTime? changedAt; String? changedBy; - UserData({ - this.id, this.name, this.displayName, this.email, this.role, this.status, this.createdAt, this.createdBy, this.changedAt, this.changedBy}); + UserData( + {this.id, + this.name, + this.displayName, + this.email, + this.role, + this.status, + this.createdAt, + this.createdBy, + this.changedAt, + this.changedBy}); UserData.createFromMap(DataMap map) { fromMap(map); } @override void fromMap(DataMap map) { - id = map.containsKey('user_id') ? fromString(map['user_id'], dataType: DataType.reference) : null; - name = map.containsKey('user_name') ? fromString(map['user_name'], dataType: DataType.string) : null; - displayName = map.containsKey('user_displayname') ? fromString(map['user_displayname'], dataType: DataType.string) : null; - email = map.containsKey('user_email') ? fromString(map['user_email'], dataType: DataType.string) : null; - role = map.containsKey('user_role') ? fromString(map['user_role'], dataType: DataType.reference) : null; - status = map.containsKey('user_status') ? fromString(map['user_status'], dataType: DataType.reference) : null; - createdAt = map.containsKey('user_createdat') ? fromString(map['user_createdat'], dataType: DataType.datetime) : null; - createdBy = map.containsKey('user_createdby') ? fromString(map['user_createdby'], dataType: DataType.string) : null; - changedAt = map.containsKey('user_changedat') ? fromString(map['user_changedat'], dataType: DataType.datetime) : null; - changedBy = map.containsKey('user_changedby') ? fromString(map['user_changedby'], dataType: DataType.string) : null; + id = map.containsKey('user_id') + ? fromString(map['user_id'], dataType: DataType.reference) + : null; + name = map.containsKey('user_name') + ? fromString(map['user_name'], dataType: DataType.string) + : null; + displayName = map.containsKey('user_displayname') + ? fromString(map['user_displayname'], dataType: DataType.string) + : null; + email = map.containsKey('user_email') + ? fromString(map['user_email'], dataType: DataType.string) + : null; + role = map.containsKey('user_role') + ? fromString(map['user_role'], dataType: DataType.reference) + : null; + status = map.containsKey('user_status') + ? fromString(map['user_status'], dataType: DataType.reference) + : null; + createdAt = map.containsKey('user_createdat') + ? fromString(map['user_createdat'], dataType: DataType.datetime) + : null; + createdBy = map.containsKey('user_createdby') + ? fromString(map['user_createdby'], dataType: DataType.string) + : null; + changedAt = map.containsKey('user_changedat') + ? fromString(map['user_changedat'], dataType: DataType.datetime) + : null; + changedBy = map.containsKey('user_changedby') + ? fromString(map['user_changedby'], dataType: DataType.string) + : null; } + @override int keyOf() { return id ?? 0; } + @override - String nameOfKey(){ + String nameOfKey() { return 'user_id'; } + static DataType? dataTypeOf(String name) { DataType? rc; - switch(name){ - case 'id': - rc = DataType.reference; - break; - case 'name': - rc = DataType.string; - break; - case 'displayName': - rc = DataType.string; - break; - case 'email': - rc = DataType.string; - break; - case 'role': - rc = DataType.reference; - break; - case 'status': - rc = DataType.reference; - break; - case 'createdAt': - rc = DataType.datetime; - break; - case 'createdBy': - rc = DataType.string; - break; - case 'changedAt': - rc = DataType.datetime; - break; - case 'changedBy': - rc = DataType.string; - break; - default: - break; + switch (name) { + case 'id': + rc = DataType.reference; + break; + case 'name': + rc = DataType.string; + break; + case 'displayName': + rc = DataType.string; + break; + case 'email': + rc = DataType.string; + break; + case 'role': + rc = DataType.reference; + break; + case 'status': + rc = DataType.reference; + break; + case 'createdAt': + rc = DataType.datetime; + break; + case 'createdBy': + rc = DataType.string; + break; + case 'changedAt': + rc = DataType.datetime; + break; + case 'changedBy': + rc = DataType.string; + break; + default: + break; } return rc; } + @override DataMap toMap({DataMap? map, bool clear = true}) { map ??= DataMap(); diff --git a/lib/setting/global_data.dart b/lib/setting/global_data.dart index 7b78012..0a20fc0 100644 --- a/lib/setting/global_data.dart +++ b/lib/setting/global_data.dart @@ -98,7 +98,8 @@ class HomeDirectories { } else if (Platform.isAndroid) { getExternalStorageDirectory().then((dir) => localData = dir!); } else { - throw const FormatException('HomeDirectory.getHomePath(): unknown platform'); + throw const FormatException( + 'HomeDirectory.getHomePath(): unknown platform'); } } } diff --git a/lib/widget/date_time_form_field.dart b/lib/widget/date_time_form_field.dart index ed23bb1..7e72cec 100644 --- a/lib/widget/date_time_form_field.dart +++ b/lib/widget/date_time_form_field.dart @@ -88,7 +88,7 @@ class DateTimeFormField extends Container { final TextEditingController dateController; DateTimeFormField( {Key? key, - required BuildContext context, + required BuildContext context, required this.dateData, required this.dateController, FocusNode? focusNode, @@ -135,46 +135,47 @@ class DateTimeFormField extends Container { bool enableIMEPersonalizedLearning = true, double? gapWidth, DateTime? initialDate}) - : super(key: key, + : super( + key: key, child: Row(children: [ - Expanded( - child: TextFormField( - onTap: onTap, - controller: dateController, - onEditingComplete: onEditingComplete, - onFieldSubmitted: onFieldSubmitted, - onSaved: onSaved, - validator: validator, - enabled: enabled, - cursorWidth: cursorWidth, - cursorHeight: cursorHeight, - cursorRadius: cursorRadius, - cursorColor: cursorColor, - keyboardAppearance: keyboardAppearance, - scrollPadding: scrollPadding, - enableInteractiveSelection: enableInteractiveSelection, - selectionControls: selectionControls, - buildCounter: buildCounter, - scrollPhysics: scrollPhysics, - autofillHints: autofillHints, - autovalidateMode: autovalidateMode, - scrollController: scrollController, - restorationId: restorationId, - enableIMEPersonalizedLearning: enableIMEPersonalizedLearning, - )), - SizedBox(width: gapWidth ?? GlobalThemeData.padding), - ElevatedButton( - onPressed: () => - dateData.onButtonPressed(context, storeSelected: (selected) { - dateData.selectedDate = selected; - }), - child: const Icon(Icons.calendar_today_outlined)), - SizedBox(width: gapWidth ?? GlobalThemeData.padding), - ElevatedButton( - onPressed: () => - dateData.onButtonPressed(context, storeSelected: (selected) { - dateData.selectedDate = selected; - }), - child: const Icon(Icons.lock_clock_outlined)), - ])); + Expanded( + child: TextFormField( + onTap: onTap, + controller: dateController, + onEditingComplete: onEditingComplete, + onFieldSubmitted: onFieldSubmitted, + onSaved: onSaved, + validator: validator, + enabled: enabled, + cursorWidth: cursorWidth, + cursorHeight: cursorHeight, + cursorRadius: cursorRadius, + cursorColor: cursorColor, + keyboardAppearance: keyboardAppearance, + scrollPadding: scrollPadding, + enableInteractiveSelection: enableInteractiveSelection, + selectionControls: selectionControls, + buildCounter: buildCounter, + scrollPhysics: scrollPhysics, + autofillHints: autofillHints, + autovalidateMode: autovalidateMode, + scrollController: scrollController, + restorationId: restorationId, + enableIMEPersonalizedLearning: enableIMEPersonalizedLearning, + )), + SizedBox(width: gapWidth ?? GlobalThemeData.padding), + ElevatedButton( + onPressed: () => dateData.onButtonPressed(context, + storeSelected: (selected) { + dateData.selectedDate = selected; + }), + child: const Icon(Icons.calendar_today_outlined)), + SizedBox(width: gapWidth ?? GlobalThemeData.padding), + ElevatedButton( + onPressed: () => dateData.onButtonPressed(context, + storeSelected: (selected) { + dateData.selectedDate = selected; + }), + child: const Icon(Icons.lock_clock_outlined)), + ])); } diff --git a/lib/widget/widget_form.dart b/lib/widget/widget_form.dart index 7ca2926..ccbbfbd 100644 --- a/lib/widget/widget_form.dart +++ b/lib/widget/widget_form.dart @@ -64,8 +64,8 @@ class WidgetForm { position += flex; } else { if (position < 12 || gap > 0.0) { - childrenRow - .add(Expanded(flex: 12 - position, child: const SizedBox(width: 1))); + childrenRow.add( + Expanded(flex: 12 - position, child: const SizedBox(width: 1))); } position = 0; if (childrenColumn.isNotEmpty || gap > 0.0) { @@ -83,8 +83,8 @@ class WidgetForm { } } if (position < 12) { - childrenRow - .add(Expanded(flex: 12 - position, child: const SizedBox(width: 1))); + childrenRow.add( + Expanded(flex: 12 - position, child: const SizedBox(width: 1))); } childrenColumn.add(Row(children: childrenRow)); rc = Column(children: childrenColumn); -- 2.39.5