/// 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;
}
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) {
}
return rc;
}
+
/// Returns the module names as string list.
-List<String> moduleNames(){
+List<String> moduleNames() {
return [
'Benchmarks',
'Roles',
'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',
import '../../base/defines.dart';
import '../../base/helper.dart';
import '../../persistence/data_record.dart';
-class BenchmarkData extends DataRecord<int>{
+
+class BenchmarkData extends DataRecord<int> {
int? id;
String? lastName;
String? firstName;
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();
}
class _CreateBenchmarkPageState extends CreateBenchmarkCustom {
- _CreateBenchmarkPageState(): super();
+ _CreateBenchmarkPageState() : super();
@override
void didChangeDependencies() {
final size = MediaQuery.of(context).size;
});
}
}
-}
\ No newline at end of file
+}
}
class _DeleteBenchmarkPageState extends DeleteBenchmarkCustom {
- _DeleteBenchmarkPageState(int primaryKey): super(primaryKey);
+ _DeleteBenchmarkPageState(int primaryKey) : super(primaryKey);
@override
void didChangeDependencies() {
final size = MediaQuery.of(context).size;
});
}
}
-}
\ No newline at end of file
+}
}
class _EditBenchmarkPageState extends EditBenchmarkCustom {
- _EditBenchmarkPageState(int primaryKey): super(primaryKey);
+ _EditBenchmarkPageState(int primaryKey) : super(primaryKey);
@override
void didChangeDependencies() {
final size = MediaQuery.of(context).size;
});
}
}
-}
\ No newline at end of file
+}
}
class _ListBenchmarkPageState extends ListBenchmarkCustom {
- _ListBenchmarkPageState(): super();
+ _ListBenchmarkPageState() : super();
@override
void didChangeDependencies() {
final size = MediaQuery.of(context).size;
});
}
}
-}
\ No newline at end of file
+}
}
class _CreateRolePageState extends CreateRoleCustom {
- _CreateRolePageState(): super();
+ _CreateRolePageState() : super();
@override
void didChangeDependencies() {
final size = MediaQuery.of(context).size;
});
}
}
-}
\ No newline at end of file
+}
}
class _EditRolePageState extends EditRoleCustom {
- _EditRolePageState(int primaryKey): super(primaryKey);
+ _EditRolePageState(int primaryKey) : super(primaryKey);
@override
void didChangeDependencies() {
final size = MediaQuery.of(context).size;
});
}
}
-}
\ No newline at end of file
+}
}
class _ListRolePageState extends ListRoleCustom {
- _ListRolePageState(): super();
+ _ListRolePageState() : super();
@override
void didChangeDependencies() {
final size = MediaQuery.of(context).size;
});
}
}
-}
\ No newline at end of file
+}
import '../../base/defines.dart';
import '../../base/helper.dart';
import '../../persistence/data_record.dart';
-class RoleData extends DataRecord<int>{
+
+class RoleData extends DataRecord<int> {
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();
}
class _ListRoleStarterPageState extends ListRoleStarterCustom {
- _ListRoleStarterPageState(): super();
+ _ListRoleStarterPageState() : super();
@override
void didChangeDependencies() {
final size = MediaQuery.of(context).size;
});
}
}
-}
\ No newline at end of file
+}
}
class _MappingRoleStarterPageState extends MappingRoleStarterCustom {
- _MappingRoleStarterPageState(): super();
+ _MappingRoleStarterPageState() : super();
@override
void didChangeDependencies() {
final size = MediaQuery.of(context).size;
});
}
}
-}
\ No newline at end of file
+}
import '../../base/defines.dart';
import '../../base/helper.dart';
import '../../persistence/data_record.dart';
-class RoleStarterData extends DataRecord<int>{
+
+class RoleStarterData extends DataRecord<int> {
int? id;
int? role;
int? starter;
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();
}
class _CreateScopePageState extends CreateScopeCustom {
- _CreateScopePageState(): super();
+ _CreateScopePageState() : super();
@override
void didChangeDependencies() {
final size = MediaQuery.of(context).size;
});
}
}
-}
\ No newline at end of file
+}
}
class _DeleteScopePageState extends DeleteScopeCustom {
- _DeleteScopePageState(int primaryKey): super(primaryKey);
+ _DeleteScopePageState(int primaryKey) : super(primaryKey);
@override
void didChangeDependencies() {
final size = MediaQuery.of(context).size;
});
}
}
-}
\ No newline at end of file
+}
}
class _EditScopePageState extends EditScopeCustom {
- _EditScopePageState(int primaryKey): super(primaryKey);
+ _EditScopePageState(int primaryKey) : super(primaryKey);
@override
void didChangeDependencies() {
final size = MediaQuery.of(context).size;
});
}
}
-}
\ No newline at end of file
+}
}
class _ListScopePageState extends ListScopeCustom {
- _ListScopePageState(): super();
+ _ListScopePageState() : super();
@override
void didChangeDependencies() {
final size = MediaQuery.of(context).size;
});
}
}
-}
\ No newline at end of file
+}
import '../../base/defines.dart';
import '../../base/helper.dart';
import '../../persistence/data_record.dart';
-class ScopeData extends DataRecord<int>{
+
+class ScopeData extends DataRecord<int> {
int? id;
String? scope;
String? name;
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();
}
class _CreateStarterPageState extends CreateStarterCustom {
- _CreateStarterPageState(): super();
+ _CreateStarterPageState() : super();
@override
void didChangeDependencies() {
final size = MediaQuery.of(context).size;
});
}
}
-}
\ No newline at end of file
+}
}
class _DeleteStarterPageState extends DeleteStarterCustom {
- _DeleteStarterPageState(int primaryKey): super(primaryKey);
+ _DeleteStarterPageState(int primaryKey) : super(primaryKey);
@override
void didChangeDependencies() {
final size = MediaQuery.of(context).size;
});
}
}
-}
\ No newline at end of file
+}
}
class _EditStarterPageState extends EditStarterCustom {
- _EditStarterPageState(int primaryKey): super(primaryKey);
+ _EditStarterPageState(int primaryKey) : super(primaryKey);
@override
void didChangeDependencies() {
final size = MediaQuery.of(context).size;
});
}
}
-}
\ No newline at end of file
+}
}
class _ListStarterPageState extends ListStarterCustom {
- _ListStarterPageState(): super();
+ _ListStarterPageState() : super();
@override
void didChangeDependencies() {
final size = MediaQuery.of(context).size;
});
}
}
-}
\ No newline at end of file
+}
import '../../base/defines.dart';
import '../../base/helper.dart';
import '../../persistence/data_record.dart';
-class StarterData extends DataRecord<int>{
+
+class StarterData extends DataRecord<int> {
int? id;
String? name;
String? route;
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();
}
class _CreateUserPageState extends CreateUserCustom {
- _CreateUserPageState(): super();
+ _CreateUserPageState() : super();
@override
void didChangeDependencies() {
final size = MediaQuery.of(context).size;
});
}
}
-}
\ No newline at end of file
+}
}
class _DeleteUserPageState extends DeleteUserCustom {
- _DeleteUserPageState(int primaryKey): super(primaryKey);
+ _DeleteUserPageState(int primaryKey) : super(primaryKey);
@override
void didChangeDependencies() {
final size = MediaQuery.of(context).size;
});
}
}
-}
\ No newline at end of file
+}
}
class _EditUserPageState extends EditUserCustom {
- _EditUserPageState(int primaryKey): super(primaryKey);
+ _EditUserPageState(int primaryKey) : super(primaryKey);
@override
void didChangeDependencies() {
final size = MediaQuery.of(context).size;
});
}
}
-}
\ No newline at end of file
+}
}
class _ListUserPageState extends ListUserCustom {
- _ListUserPageState(): super();
+ _ListUserPageState() : super();
@override
void didChangeDependencies() {
final size = MediaQuery.of(context).size;
});
}
}
-}
\ No newline at end of file
+}
import '../../base/defines.dart';
import '../../base/helper.dart';
import '../../persistence/data_record.dart';
-class UserData extends DataRecord<int>{
+
+class UserData extends DataRecord<int> {
int? id;
String? name;
String? displayName;
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();
} else if (Platform.isAndroid) {
getExternalStorageDirectory().then((dir) => localData = dir!);
} else {
- throw const FormatException('HomeDirectory.getHomePath(): unknown platform');
+ throw const FormatException(
+ 'HomeDirectory.getHomePath(): unknown platform');
}
}
}
final TextEditingController dateController;
DateTimeFormField(
{Key? key,
- required BuildContext context,
+ required BuildContext context,
required this.dateData,
required this.dateController,
FocusNode? focusNode,
bool enableIMEPersonalizedLearning = true,
double? gapWidth,
DateTime? initialDate})
- : super(key: key,
+ : super(
+ key: key,
child: Row(children: <Widget>[
- 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)),
+ ]));
}
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) {
}
}
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);