| class ActionUIField { | |||||
| int id; | |||||
| String name; | |||||
| String unit; | |||||
| String description; | |||||
| int activityTypeId; | |||||
| int tbCustomerId; | |||||
| int tbControlTypeId; | |||||
| String tbControlTypeName; | |||||
| int tbActivityExtendTypeId; | |||||
| String tbActivityExtendTypeName; | |||||
| String tbActivityExtendTypeExternalTable; | |||||
| String tbActivityExtendTypeObjectType; | |||||
| String tbActivityExtendTypeCondition; | |||||
| String relationTable; | |||||
| String foreignKey; | |||||
| int isGuidelineUsing; | |||||
| int isMandatory; | |||||
| String groupName; | |||||
| ActionUIField( | |||||
| {this.id, | |||||
| this.name, | |||||
| this.unit, | |||||
| this.description, | |||||
| this.activityTypeId, | |||||
| this.tbCustomerId, | |||||
| this.tbControlTypeId, | |||||
| this.tbControlTypeName, | |||||
| this.tbActivityExtendTypeId, | |||||
| this.tbActivityExtendTypeName, | |||||
| this.tbActivityExtendTypeExternalTable, | |||||
| this.tbActivityExtendTypeObjectType, | |||||
| this.tbActivityExtendTypeCondition, | |||||
| this.relationTable, | |||||
| this.foreignKey, | |||||
| this.isGuidelineUsing, | |||||
| this.isMandatory, | |||||
| this.groupName}); | |||||
| ActionUIField.fromJson(Map<String, dynamic> json) { | |||||
| id = json['id']; | |||||
| name = json['name']; | |||||
| unit = json['unit']; | |||||
| description = json['description']; | |||||
| activityTypeId = json['activityTypeId']; | |||||
| tbCustomerId = json['tbCustomerId']; | |||||
| tbControlTypeId = json['tbControlTypeId']; | |||||
| tbControlTypeName = json['tbControlTypeName']; | |||||
| tbActivityExtendTypeId = json['tbActivityExtendTypeId']; | |||||
| tbActivityExtendTypeName = json['tbActivityExtendTypeName']; | |||||
| tbActivityExtendTypeExternalTable = | |||||
| json['tbActivityExtendTypeExternalTable']; | |||||
| tbActivityExtendTypeObjectType = json['tbActivityExtendTypeObjectType']; | |||||
| tbActivityExtendTypeCondition = json['tbActivityExtendTypeCondition']; | |||||
| relationTable = json['relationTable']; | |||||
| foreignKey = json['foreignKey']; | |||||
| isGuidelineUsing = json['isGuidelineUsing']; | |||||
| isMandatory = json['isMandatory']; | |||||
| groupName = json['groupName']; | |||||
| } | |||||
| Map<String, dynamic> toJson() { | |||||
| final Map<String, dynamic> data = new Map<String, dynamic>(); | |||||
| data['id'] = this.id; | |||||
| data['name'] = this.name; | |||||
| data['unit'] = this.unit; | |||||
| data['description'] = this.description; | |||||
| data['activityTypeId'] = this.activityTypeId; | |||||
| data['tbCustomerId'] = this.tbCustomerId; | |||||
| data['tbControlTypeId'] = this.tbControlTypeId; | |||||
| data['tbControlTypeName'] = this.tbControlTypeName; | |||||
| data['tbActivityExtendTypeId'] = this.tbActivityExtendTypeId; | |||||
| data['tbActivityExtendTypeName'] = this.tbActivityExtendTypeName; | |||||
| data['tbActivityExtendTypeExternalTable'] = | |||||
| this.tbActivityExtendTypeExternalTable; | |||||
| data['tbActivityExtendTypeObjectType'] = | |||||
| this.tbActivityExtendTypeObjectType; | |||||
| data['tbActivityExtendTypeCondition'] = this.tbActivityExtendTypeCondition; | |||||
| data['relationTable'] = this.relationTable; | |||||
| data['foreignKey'] = this.foreignKey; | |||||
| data['isGuidelineUsing'] = this.isGuidelineUsing; | |||||
| data['isMandatory'] = this.isMandatory; | |||||
| data['groupName'] = this.groupName; | |||||
| return data; | |||||
| } | |||||
| } |
| import 'ActionUIField.dart'; | |||||
| import 'ActionUISupply.dart'; | |||||
| class ActionUIForm { | |||||
| List<ActionUIField> objectParameterDTOList; | |||||
| List<ActionUISupply> activityExtendTypeDTOList; | |||||
| ActionUIForm({this.objectParameterDTOList, this.activityExtendTypeDTOList}); | |||||
| ActionUIForm.fromJson(Map<String, dynamic> json) { | |||||
| if (json['objectParameterDTOList'] != null) { | |||||
| objectParameterDTOList = new List<ActionUIField>(); | |||||
| json['objectParameterDTOList'].forEach((v) { | |||||
| objectParameterDTOList.add(new ActionUIField.fromJson(v)); | |||||
| }); | |||||
| } | |||||
| if (json['activityExtendTypeDTOList'] != null) { | |||||
| activityExtendTypeDTOList = new List<ActionUISupply>(); | |||||
| json['activityExtendTypeDTOList'].forEach((v) { | |||||
| activityExtendTypeDTOList.add(new ActionUISupply.fromJson(v)); | |||||
| }); | |||||
| } | |||||
| } | |||||
| Map<String, dynamic> toJson() { | |||||
| final Map<String, dynamic> data = new Map<String, dynamic>(); | |||||
| if (this.objectParameterDTOList != null) { | |||||
| data['objectParameterDTOList'] = | |||||
| this.objectParameterDTOList.map((v) => v.toJson()).toList(); | |||||
| } | |||||
| if (this.activityExtendTypeDTOList != null) { | |||||
| data['activityExtendTypeDTOList'] = | |||||
| this.activityExtendTypeDTOList.map((v) => v.toJson()).toList(); | |||||
| } | |||||
| return data; | |||||
| } | |||||
| } |
| class ActionUISupply { | |||||
| int id; | |||||
| String name; | |||||
| String externalTable; | |||||
| int objectType; | |||||
| String condition; | |||||
| int activityTypeId; | |||||
| ActionUISupply( | |||||
| {this.id, | |||||
| this.name, | |||||
| this.externalTable, | |||||
| this.objectType, | |||||
| this.condition, | |||||
| this.activityTypeId}); | |||||
| ActionUISupply.fromJson(Map<String, dynamic> json) { | |||||
| id = json['id']; | |||||
| name = json['name']; | |||||
| externalTable = json['externalTable']; | |||||
| objectType = json['objectType']; | |||||
| condition = json['condition']; | |||||
| activityTypeId = json['activityTypeId']; | |||||
| } | |||||
| Map<String, dynamic> toJson() { | |||||
| final Map<String, dynamic> data = new Map<String, dynamic>(); | |||||
| data['id'] = this.id; | |||||
| data['name'] = this.name; | |||||
| data['externalTable'] = this.externalTable; | |||||
| data['objectType'] = this.objectType; | |||||
| data['condition'] = this.condition; | |||||
| data['activityTypeId'] = this.activityTypeId; | |||||
| return data; | |||||
| } | |||||
| } |
| import 'package:farm_tpf/custom_model/UpdateNoti.dart'; | import 'package:farm_tpf/custom_model/UpdateNoti.dart'; | ||||
| import 'package:farm_tpf/custom_model/WaterType.dart'; | import 'package:farm_tpf/custom_model/WaterType.dart'; | ||||
| import 'package:farm_tpf/custom_model/account.dart'; | import 'package:farm_tpf/custom_model/account.dart'; | ||||
| import 'package:farm_tpf/custom_model/action_form/ActionUIForm.dart'; | |||||
| import 'package:farm_tpf/custom_model/password.dart'; | import 'package:farm_tpf/custom_model/password.dart'; | ||||
| import 'package:farm_tpf/custom_model/user.dart'; | import 'package:farm_tpf/custom_model/user.dart'; | ||||
| import 'package:farm_tpf/custom_model/user_request.dart'; | import 'package:farm_tpf/custom_model/user_request.dart'; | ||||
| @Path() int cropId, | @Path() int cropId, | ||||
| {@Path() int page = 0, | {@Path() int page = 0, | ||||
| @Path() int size = 20}); | @Path() int size = 20}); | ||||
| //NEW Activity implement | |||||
| @GET('/api/display-object-param-dynamic-form/{idAction}') | |||||
| Future<ActionUIForm> getActionUIForm( | |||||
| @Path() idAction, @DioOptions() Options options); | |||||
| } | } |
| class _RestClient implements RestClient { | class _RestClient implements RestClient { | ||||
| _RestClient(this._dio, {this.baseUrl}) { | _RestClient(this._dio, {this.baseUrl}) { | ||||
| ArgumentError.checkNotNull(_dio, '_dio'); | ArgumentError.checkNotNull(_dio, '_dio'); | ||||
| this.baseUrl ??= 'https://smf.aztrace.vn'; | |||||
| baseUrl ??= 'https://smf.aztrace.vn'; | |||||
| } | } | ||||
| final Dio _dio; | final Dio _dio; | ||||
| String baseUrl; | String baseUrl; | ||||
| @override | @override | ||||
| login(userRequest) async { | |||||
| Future<User> login(userRequest) async { | |||||
| ArgumentError.checkNotNull(userRequest, 'userRequest'); | ArgumentError.checkNotNull(userRequest, 'userRequest'); | ||||
| const _extra = <String, dynamic>{}; | const _extra = <String, dynamic>{}; | ||||
| final queryParameters = <String, dynamic>{}; | final queryParameters = <String, dynamic>{}; | ||||
| final _data = <String, dynamic>{}; | final _data = <String, dynamic>{}; | ||||
| _data.addAll(userRequest?.toJson() ?? <String, dynamic>{}); | _data.addAll(userRequest?.toJson() ?? <String, dynamic>{}); | ||||
| final Response<Map<String, dynamic>> _result = await _dio.request( | |||||
| _data.removeWhere((k, v) => v == null); | |||||
| final _result = await _dio.request<Map<String, dynamic>>( | |||||
| '/api/authenticate', | '/api/authenticate', | ||||
| queryParameters: queryParameters, | queryParameters: queryParameters, | ||||
| options: RequestOptions( | options: RequestOptions( | ||||
| } | } | ||||
| @override | @override | ||||
| getMe() async { | |||||
| Future<Account> getMe() async { | |||||
| const _extra = <String, dynamic>{}; | const _extra = <String, dynamic>{}; | ||||
| final queryParameters = <String, dynamic>{}; | final queryParameters = <String, dynamic>{}; | ||||
| final _data = <String, dynamic>{}; | final _data = <String, dynamic>{}; | ||||
| final Response<Map<String, dynamic>> _result = await _dio.request( | |||||
| '/api/account', | |||||
| final _result = await _dio.request<Map<String, dynamic>>('/api/account', | |||||
| queryParameters: queryParameters, | queryParameters: queryParameters, | ||||
| options: RequestOptions( | options: RequestOptions( | ||||
| method: 'GET', | method: 'GET', | ||||
| } | } | ||||
| @override | @override | ||||
| forgotPassword(email) async { | |||||
| Future<void> forgotPassword(email) async { | |||||
| ArgumentError.checkNotNull(email, 'email'); | ArgumentError.checkNotNull(email, 'email'); | ||||
| const _extra = <String, dynamic>{}; | const _extra = <String, dynamic>{}; | ||||
| final queryParameters = <String, dynamic>{}; | final queryParameters = <String, dynamic>{}; | ||||
| } | } | ||||
| @override | @override | ||||
| resetPassword(password) async { | |||||
| Future<void> resetPassword(password) async { | |||||
| ArgumentError.checkNotNull(password, 'password'); | ArgumentError.checkNotNull(password, 'password'); | ||||
| const _extra = <String, dynamic>{}; | const _extra = <String, dynamic>{}; | ||||
| final queryParameters = <String, dynamic>{}; | final queryParameters = <String, dynamic>{}; | ||||
| final _data = <String, dynamic>{}; | final _data = <String, dynamic>{}; | ||||
| _data.addAll(password?.toJson() ?? <String, dynamic>{}); | _data.addAll(password?.toJson() ?? <String, dynamic>{}); | ||||
| _data.removeWhere((k, v) => v == null); | |||||
| await _dio.request<void>('/api/account/reset-password/finish', | await _dio.request<void>('/api/account/reset-password/finish', | ||||
| queryParameters: queryParameters, | queryParameters: queryParameters, | ||||
| options: RequestOptions( | options: RequestOptions( | ||||
| } | } | ||||
| @override | @override | ||||
| changePassword(password) async { | |||||
| Future<void> changePassword(password) async { | |||||
| ArgumentError.checkNotNull(password, 'password'); | ArgumentError.checkNotNull(password, 'password'); | ||||
| const _extra = <String, dynamic>{}; | const _extra = <String, dynamic>{}; | ||||
| final queryParameters = <String, dynamic>{}; | final queryParameters = <String, dynamic>{}; | ||||
| final _data = <String, dynamic>{}; | final _data = <String, dynamic>{}; | ||||
| _data.addAll(password?.toJson() ?? <String, dynamic>{}); | _data.addAll(password?.toJson() ?? <String, dynamic>{}); | ||||
| _data.removeWhere((k, v) => v == null); | |||||
| await _dio.request<void>('/api/account/change-password', | await _dio.request<void>('/api/account/change-password', | ||||
| queryParameters: queryParameters, | queryParameters: queryParameters, | ||||
| options: RequestOptions( | options: RequestOptions( | ||||
| } | } | ||||
| @override | @override | ||||
| updateProfile(account) async { | |||||
| Future<Account> updateProfile(account) async { | |||||
| ArgumentError.checkNotNull(account, 'account'); | ArgumentError.checkNotNull(account, 'account'); | ||||
| const _extra = <String, dynamic>{}; | const _extra = <String, dynamic>{}; | ||||
| final queryParameters = <String, dynamic>{}; | final queryParameters = <String, dynamic>{}; | ||||
| final _data = <String, dynamic>{}; | final _data = <String, dynamic>{}; | ||||
| _data.addAll(account?.toJson() ?? <String, dynamic>{}); | _data.addAll(account?.toJson() ?? <String, dynamic>{}); | ||||
| final Response<Map<String, dynamic>> _result = await _dio.request( | |||||
| _data.removeWhere((k, v) => v == null); | |||||
| final _result = await _dio.request<Map<String, dynamic>>( | |||||
| '/api/update-my-profile', | '/api/update-my-profile', | ||||
| queryParameters: queryParameters, | queryParameters: queryParameters, | ||||
| options: RequestOptions( | options: RequestOptions( | ||||
| } | } | ||||
| @override | @override | ||||
| getSupplies(type, {options, query = ""}) async { | |||||
| Future<List<Supply>> getSupplies(type, {options, query = ""}) async { | |||||
| ArgumentError.checkNotNull(type, 'type'); | ArgumentError.checkNotNull(type, 'type'); | ||||
| const _extra = <String, dynamic>{}; | const _extra = <String, dynamic>{}; | ||||
| final queryParameters = <String, dynamic>{}; | final queryParameters = <String, dynamic>{}; | ||||
| final newOptions = newRequestOptions(options); | final newOptions = newRequestOptions(options); | ||||
| newOptions.extra.addAll(_extra); | newOptions.extra.addAll(_extra); | ||||
| newOptions.headers.addAll(<String, dynamic>{}); | newOptions.headers.addAll(<String, dynamic>{}); | ||||
| final Response<List<dynamic>> _result = await _dio.request( | |||||
| final _result = await _dio.request<List<dynamic>>( | |||||
| '/api/list-supplies-in-warehouses/$type?q=$query', | '/api/list-supplies-in-warehouses/$type?q=$query', | ||||
| queryParameters: queryParameters, | queryParameters: queryParameters, | ||||
| options: newOptions.merge(method: 'GET', baseUrl: baseUrl), | options: newOptions.merge(method: 'GET', baseUrl: baseUrl), | ||||
| } | } | ||||
| @override | @override | ||||
| updateFcmToken(token) async { | |||||
| Future<void> updateFcmToken(token) async { | |||||
| ArgumentError.checkNotNull(token, 'token'); | ArgumentError.checkNotNull(token, 'token'); | ||||
| const _extra = <String, dynamic>{}; | const _extra = <String, dynamic>{}; | ||||
| final queryParameters = <String, dynamic>{}; | final queryParameters = <String, dynamic>{}; | ||||
| } | } | ||||
| @override | @override | ||||
| deleteFcmToken(token) async { | |||||
| Future<void> deleteFcmToken(token) async { | |||||
| ArgumentError.checkNotNull(token, 'token'); | ArgumentError.checkNotNull(token, 'token'); | ||||
| const _extra = <String, dynamic>{}; | const _extra = <String, dynamic>{}; | ||||
| final queryParameters = <String, dynamic>{}; | final queryParameters = <String, dynamic>{}; | ||||
| } | } | ||||
| @override | @override | ||||
| getPlots({page = 0, size = 20, query = ""}) async { | |||||
| Future<List<TbCropDTO>> getPlots({page = 0, size = 20, query = ""}) async { | |||||
| const _extra = <String, dynamic>{}; | const _extra = <String, dynamic>{}; | ||||
| final queryParameters = <String, dynamic>{}; | final queryParameters = <String, dynamic>{}; | ||||
| queryParameters.removeWhere((k, v) => v == null); | queryParameters.removeWhere((k, v) => v == null); | ||||
| final _data = <String, dynamic>{}; | final _data = <String, dynamic>{}; | ||||
| final Response<List<dynamic>> _result = await _dio.request( | |||||
| final _result = await _dio.request<List<dynamic>>( | |||||
| '/api/tb-crops?page=$page&size=$size&sort=id,asc&query=$query', | '/api/tb-crops?page=$page&size=$size&sort=id,asc&query=$query', | ||||
| queryParameters: queryParameters, | queryParameters: queryParameters, | ||||
| options: RequestOptions( | options: RequestOptions( | ||||
| } | } | ||||
| @override | @override | ||||
| getActionTypes({options}) async { | |||||
| Future<List<ActionType>> getActionTypes({options}) async { | |||||
| const _extra = <String, dynamic>{}; | const _extra = <String, dynamic>{}; | ||||
| final queryParameters = <String, dynamic>{}; | final queryParameters = <String, dynamic>{}; | ||||
| queryParameters.removeWhere((k, v) => v == null); | queryParameters.removeWhere((k, v) => v == null); | ||||
| final newOptions = newRequestOptions(options); | final newOptions = newRequestOptions(options); | ||||
| newOptions.extra.addAll(_extra); | newOptions.extra.addAll(_extra); | ||||
| newOptions.headers.addAll(<String, dynamic>{}); | newOptions.headers.addAll(<String, dynamic>{}); | ||||
| final Response<List<dynamic>> _result = await _dio.request( | |||||
| final _result = await _dio.request<List<dynamic>>( | |||||
| '/api/listActivityTypesOther', | '/api/listActivityTypesOther', | ||||
| queryParameters: queryParameters, | queryParameters: queryParameters, | ||||
| options: newOptions.merge(method: 'GET', baseUrl: baseUrl), | options: newOptions.merge(method: 'GET', baseUrl: baseUrl), | ||||
| } | } | ||||
| @override | @override | ||||
| getWaterTypes({options}) async { | |||||
| Future<List<WaterType>> getWaterTypes({options}) async { | |||||
| const _extra = <String, dynamic>{}; | const _extra = <String, dynamic>{}; | ||||
| final queryParameters = <String, dynamic>{}; | final queryParameters = <String, dynamic>{}; | ||||
| queryParameters.removeWhere((k, v) => v == null); | queryParameters.removeWhere((k, v) => v == null); | ||||
| final newOptions = newRequestOptions(options); | final newOptions = newRequestOptions(options); | ||||
| newOptions.extra.addAll(_extra); | newOptions.extra.addAll(_extra); | ||||
| newOptions.headers.addAll(<String, dynamic>{}); | newOptions.headers.addAll(<String, dynamic>{}); | ||||
| final Response<List<dynamic>> _result = await _dio.request( | |||||
| '/api/water-types', | |||||
| final _result = await _dio.request<List<dynamic>>('/api/water-types', | |||||
| queryParameters: queryParameters, | queryParameters: queryParameters, | ||||
| options: newOptions.merge(method: 'GET', baseUrl: baseUrl), | options: newOptions.merge(method: 'GET', baseUrl: baseUrl), | ||||
| data: _data); | data: _data); | ||||
| } | } | ||||
| @override | @override | ||||
| getHarvests({options}) async { | |||||
| Future<List<Harvest>> getHarvests({options}) async { | |||||
| const _extra = <String, dynamic>{}; | const _extra = <String, dynamic>{}; | ||||
| final queryParameters = <String, dynamic>{}; | final queryParameters = <String, dynamic>{}; | ||||
| queryParameters.removeWhere((k, v) => v == null); | queryParameters.removeWhere((k, v) => v == null); | ||||
| final newOptions = newRequestOptions(options); | final newOptions = newRequestOptions(options); | ||||
| newOptions.extra.addAll(_extra); | newOptions.extra.addAll(_extra); | ||||
| newOptions.headers.addAll(<String, dynamic>{}); | newOptions.headers.addAll(<String, dynamic>{}); | ||||
| final Response<List<dynamic>> _result = await _dio.request( | |||||
| '/api/tb-harvests', | |||||
| final _result = await _dio.request<List<dynamic>>('/api/tb-harvests', | |||||
| queryParameters: queryParameters, | queryParameters: queryParameters, | ||||
| options: newOptions.merge(method: 'GET', baseUrl: baseUrl), | options: newOptions.merge(method: 'GET', baseUrl: baseUrl), | ||||
| data: _data); | data: _data); | ||||
| } | } | ||||
| @override | @override | ||||
| getDeviceForActivity({options}) async { | |||||
| Future<List<Device>> getDeviceForActivity({options}) async { | |||||
| const _extra = <String, dynamic>{}; | const _extra = <String, dynamic>{}; | ||||
| final queryParameters = <String, dynamic>{}; | final queryParameters = <String, dynamic>{}; | ||||
| queryParameters.removeWhere((k, v) => v == null); | queryParameters.removeWhere((k, v) => v == null); | ||||
| final newOptions = newRequestOptions(options); | final newOptions = newRequestOptions(options); | ||||
| newOptions.extra.addAll(_extra); | newOptions.extra.addAll(_extra); | ||||
| newOptions.headers.addAll(<String, dynamic>{}); | newOptions.headers.addAll(<String, dynamic>{}); | ||||
| final Response<List<dynamic>> _result = await _dio.request( | |||||
| final _result = await _dio.request<List<dynamic>>( | |||||
| '/api/listDeviceForActivity', | '/api/listDeviceForActivity', | ||||
| queryParameters: queryParameters, | queryParameters: queryParameters, | ||||
| options: newOptions.merge(method: 'GET', baseUrl: baseUrl), | options: newOptions.merge(method: 'GET', baseUrl: baseUrl), | ||||
| } | } | ||||
| @override | @override | ||||
| updateAllNotification(status) async { | |||||
| Future<void> updateAllNotification(status) async { | |||||
| ArgumentError.checkNotNull(status, 'status'); | ArgumentError.checkNotNull(status, 'status'); | ||||
| const _extra = <String, dynamic>{}; | const _extra = <String, dynamic>{}; | ||||
| final queryParameters = <String, dynamic>{}; | final queryParameters = <String, dynamic>{}; | ||||
| } | } | ||||
| @override | @override | ||||
| updateNoti(updateNoti) async { | |||||
| Future<void> updateNoti(updateNoti) async { | |||||
| ArgumentError.checkNotNull(updateNoti, 'updateNoti'); | ArgumentError.checkNotNull(updateNoti, 'updateNoti'); | ||||
| const _extra = <String, dynamic>{}; | const _extra = <String, dynamic>{}; | ||||
| final queryParameters = <String, dynamic>{}; | final queryParameters = <String, dynamic>{}; | ||||
| final _data = <String, dynamic>{}; | final _data = <String, dynamic>{}; | ||||
| _data.addAll(updateNoti?.toJson() ?? <String, dynamic>{}); | _data.addAll(updateNoti?.toJson() ?? <String, dynamic>{}); | ||||
| _data.removeWhere((k, v) => v == null); | |||||
| await _dio.request<void>('/api/notifications/update', | await _dio.request<void>('/api/notifications/update', | ||||
| queryParameters: queryParameters, | queryParameters: queryParameters, | ||||
| options: RequestOptions( | options: RequestOptions( | ||||
| } | } | ||||
| @override | @override | ||||
| getCountries({page = 0, size = 400, query = '', options}) async { | |||||
| Future<List<LocationUnit>> getCountries( | |||||
| {page = 0, size = 400, query = '', options}) async { | |||||
| const _extra = <String, dynamic>{}; | const _extra = <String, dynamic>{}; | ||||
| final queryParameters = <String, dynamic>{}; | final queryParameters = <String, dynamic>{}; | ||||
| queryParameters.removeWhere((k, v) => v == null); | queryParameters.removeWhere((k, v) => v == null); | ||||
| final newOptions = newRequestOptions(options); | final newOptions = newRequestOptions(options); | ||||
| newOptions.extra.addAll(_extra); | newOptions.extra.addAll(_extra); | ||||
| newOptions.headers.addAll(<String, dynamic>{}); | newOptions.headers.addAll(<String, dynamic>{}); | ||||
| final Response<List<dynamic>> _result = await _dio.request( | |||||
| final _result = await _dio.request<List<dynamic>>( | |||||
| '/api/tb-countries?page=$page&size=$size&query=$query&&sort=name,ASC', | '/api/tb-countries?page=$page&size=$size&query=$query&&sort=name,ASC', | ||||
| queryParameters: queryParameters, | queryParameters: queryParameters, | ||||
| options: newOptions.merge(method: 'GET', baseUrl: baseUrl), | options: newOptions.merge(method: 'GET', baseUrl: baseUrl), | ||||
| } | } | ||||
| @override | @override | ||||
| getProvinces(countryId, {page = 0, size = 20, query = '', options}) async { | |||||
| Future<List<LocationUnit>> getProvinces(countryId, | |||||
| {page = 0, size = 20, query = '', options}) async { | |||||
| ArgumentError.checkNotNull(countryId, 'countryId'); | ArgumentError.checkNotNull(countryId, 'countryId'); | ||||
| const _extra = <String, dynamic>{}; | const _extra = <String, dynamic>{}; | ||||
| final queryParameters = <String, dynamic>{}; | final queryParameters = <String, dynamic>{}; | ||||
| final newOptions = newRequestOptions(options); | final newOptions = newRequestOptions(options); | ||||
| newOptions.extra.addAll(_extra); | newOptions.extra.addAll(_extra); | ||||
| newOptions.headers.addAll(<String, dynamic>{}); | newOptions.headers.addAll(<String, dynamic>{}); | ||||
| final Response<List<dynamic>> _result = await _dio.request( | |||||
| final _result = await _dio.request<List<dynamic>>( | |||||
| '/api/tb-cities-by-country/$countryId?page=$page&size=$size&query=$query&&sort=name,ASC', | '/api/tb-cities-by-country/$countryId?page=$page&size=$size&query=$query&&sort=name,ASC', | ||||
| queryParameters: queryParameters, | queryParameters: queryParameters, | ||||
| options: newOptions.merge(method: 'GET', baseUrl: baseUrl), | options: newOptions.merge(method: 'GET', baseUrl: baseUrl), | ||||
| } | } | ||||
| @override | @override | ||||
| getDistricts(provinceId, {page = 0, size = 20, query = '', options}) async { | |||||
| Future<List<LocationUnit>> getDistricts(provinceId, | |||||
| {page = 0, size = 20, query = '', options}) async { | |||||
| ArgumentError.checkNotNull(provinceId, 'provinceId'); | ArgumentError.checkNotNull(provinceId, 'provinceId'); | ||||
| const _extra = <String, dynamic>{}; | const _extra = <String, dynamic>{}; | ||||
| final queryParameters = <String, dynamic>{}; | final queryParameters = <String, dynamic>{}; | ||||
| final newOptions = newRequestOptions(options); | final newOptions = newRequestOptions(options); | ||||
| newOptions.extra.addAll(_extra); | newOptions.extra.addAll(_extra); | ||||
| newOptions.headers.addAll(<String, dynamic>{}); | newOptions.headers.addAll(<String, dynamic>{}); | ||||
| final Response<List<dynamic>> _result = await _dio.request( | |||||
| final _result = await _dio.request<List<dynamic>>( | |||||
| '/api/tb-districts-by-city/$provinceId?page=$page&size=$size&query=$query&&sort=name,ASC', | '/api/tb-districts-by-city/$provinceId?page=$page&size=$size&query=$query&&sort=name,ASC', | ||||
| queryParameters: queryParameters, | queryParameters: queryParameters, | ||||
| options: newOptions.merge(method: 'GET', baseUrl: baseUrl), | options: newOptions.merge(method: 'GET', baseUrl: baseUrl), | ||||
| } | } | ||||
| @override | @override | ||||
| getWards(districtId, {page = 0, size = 20, query = '', options}) async { | |||||
| Future<List<LocationUnit>> getWards(districtId, | |||||
| {page = 0, size = 20, query = '', options}) async { | |||||
| ArgumentError.checkNotNull(districtId, 'districtId'); | ArgumentError.checkNotNull(districtId, 'districtId'); | ||||
| const _extra = <String, dynamic>{}; | const _extra = <String, dynamic>{}; | ||||
| final queryParameters = <String, dynamic>{}; | final queryParameters = <String, dynamic>{}; | ||||
| final newOptions = newRequestOptions(options); | final newOptions = newRequestOptions(options); | ||||
| newOptions.extra.addAll(_extra); | newOptions.extra.addAll(_extra); | ||||
| newOptions.headers.addAll(<String, dynamic>{}); | newOptions.headers.addAll(<String, dynamic>{}); | ||||
| final Response<List<dynamic>> _result = await _dio.request( | |||||
| final _result = await _dio.request<List<dynamic>>( | |||||
| '/api/tb-wards-by-district/$districtId?page=$page&size=$size&query=$query&&sort=name,ASC', | '/api/tb-wards-by-district/$districtId?page=$page&size=$size&query=$query&&sort=name,ASC', | ||||
| queryParameters: queryParameters, | queryParameters: queryParameters, | ||||
| options: newOptions.merge(method: 'GET', baseUrl: baseUrl), | options: newOptions.merge(method: 'GET', baseUrl: baseUrl), | ||||
| } | } | ||||
| @override | @override | ||||
| getCropDetail(cropId, {page = 0, size = 20}) async { | |||||
| Future<CropPlot> getCropDetail(cropId, {page = 0, size = 20}) async { | |||||
| ArgumentError.checkNotNull(cropId, 'cropId'); | ArgumentError.checkNotNull(cropId, 'cropId'); | ||||
| const _extra = <String, dynamic>{}; | const _extra = <String, dynamic>{}; | ||||
| final queryParameters = <String, dynamic>{}; | final queryParameters = <String, dynamic>{}; | ||||
| queryParameters.removeWhere((k, v) => v == null); | queryParameters.removeWhere((k, v) => v == null); | ||||
| final _data = <String, dynamic>{}; | final _data = <String, dynamic>{}; | ||||
| final Response<Map<String, dynamic>> _result = await _dio.request( | |||||
| final _result = await _dio.request<Map<String, dynamic>>( | |||||
| '/api/tb-crops-detail-for-app/$cropId?page=$page&size=$size&sort=executeDate,DESC', | '/api/tb-crops-detail-for-app/$cropId?page=$page&size=$size&sort=executeDate,DESC', | ||||
| queryParameters: queryParameters, | queryParameters: queryParameters, | ||||
| options: RequestOptions( | options: RequestOptions( | ||||
| } | } | ||||
| @override | @override | ||||
| getCropDetailByCode(cropCode, {page = 0, size = 20}) async { | |||||
| Future<CropPlot> getCropDetailByCode(cropCode, {page = 0, size = 20}) async { | |||||
| ArgumentError.checkNotNull(cropCode, 'cropCode'); | ArgumentError.checkNotNull(cropCode, 'cropCode'); | ||||
| const _extra = <String, dynamic>{}; | const _extra = <String, dynamic>{}; | ||||
| final queryParameters = <String, dynamic>{}; | final queryParameters = <String, dynamic>{}; | ||||
| queryParameters.removeWhere((k, v) => v == null); | queryParameters.removeWhere((k, v) => v == null); | ||||
| final _data = <String, dynamic>{}; | final _data = <String, dynamic>{}; | ||||
| final Response<Map<String, dynamic>> _result = await _dio.request( | |||||
| final _result = await _dio.request<Map<String, dynamic>>( | |||||
| '/api/tb-crops-scan-qrCode/$cropCode?page=$page&size=$size&sort=executeDate,DESC', | '/api/tb-crops-scan-qrCode/$cropCode?page=$page&size=$size&sort=executeDate,DESC', | ||||
| queryParameters: queryParameters, | queryParameters: queryParameters, | ||||
| options: RequestOptions( | options: RequestOptions( | ||||
| } | } | ||||
| @override | @override | ||||
| updateCrop(crop) async { | |||||
| Future<void> updateCrop(crop) async { | |||||
| ArgumentError.checkNotNull(crop, 'crop'); | ArgumentError.checkNotNull(crop, 'crop'); | ||||
| const _extra = <String, dynamic>{}; | const _extra = <String, dynamic>{}; | ||||
| final queryParameters = <String, dynamic>{}; | final queryParameters = <String, dynamic>{}; | ||||
| final _data = <String, dynamic>{}; | final _data = <String, dynamic>{}; | ||||
| _data.addAll(crop?.toJson() ?? <String, dynamic>{}); | _data.addAll(crop?.toJson() ?? <String, dynamic>{}); | ||||
| _data.removeWhere((k, v) => v == null); | |||||
| await _dio.request<void>('/api/tb-crops', | await _dio.request<void>('/api/tb-crops', | ||||
| queryParameters: queryParameters, | queryParameters: queryParameters, | ||||
| options: RequestOptions( | options: RequestOptions( | ||||
| } | } | ||||
| @override | @override | ||||
| getDevices({query}) async { | |||||
| Future<List<Device>> getDevices({query}) async { | |||||
| const _extra = <String, dynamic>{}; | const _extra = <String, dynamic>{}; | ||||
| final queryParameters = <String, dynamic>{}; | final queryParameters = <String, dynamic>{}; | ||||
| queryParameters.removeWhere((k, v) => v == null); | |||||
| final _data = <String, dynamic>{}; | final _data = <String, dynamic>{}; | ||||
| final Response<List<dynamic>> _result = await _dio.request( | |||||
| final _result = await _dio.request<List<dynamic>>( | |||||
| '/api/listDeviceOfUserCustomers?query=$query', | '/api/listDeviceOfUserCustomers?query=$query', | ||||
| queryParameters: queryParameters, | queryParameters: queryParameters, | ||||
| options: RequestOptions( | options: RequestOptions( | ||||
| } | } | ||||
| @override | @override | ||||
| getEnvironmentParameters(cropId, {page = 0, size = 20}) async { | |||||
| Future<List<EnvironmentParameter>> getEnvironmentParameters(cropId, | |||||
| {page = 0, size = 20}) async { | |||||
| ArgumentError.checkNotNull(cropId, 'cropId'); | ArgumentError.checkNotNull(cropId, 'cropId'); | ||||
| const _extra = <String, dynamic>{}; | const _extra = <String, dynamic>{}; | ||||
| final queryParameters = <String, dynamic>{}; | final queryParameters = <String, dynamic>{}; | ||||
| queryParameters.removeWhere((k, v) => v == null); | queryParameters.removeWhere((k, v) => v == null); | ||||
| final _data = <String, dynamic>{}; | final _data = <String, dynamic>{}; | ||||
| final Response<List<dynamic>> _result = await _dio.request( | |||||
| final _result = await _dio.request<List<dynamic>>( | |||||
| '/api/list-environment-updates-display/$cropId?page=$page&size=$size', | '/api/list-environment-updates-display/$cropId?page=$page&size=$size', | ||||
| queryParameters: queryParameters, | queryParameters: queryParameters, | ||||
| options: RequestOptions( | options: RequestOptions( | ||||
| return value; | return value; | ||||
| } | } | ||||
| @override | |||||
| Future<ActionUIForm> getActionUIForm(idAction, options) async { | |||||
| ArgumentError.checkNotNull(idAction, 'idAction'); | |||||
| ArgumentError.checkNotNull(options, 'options'); | |||||
| const _extra = <String, dynamic>{}; | |||||
| final queryParameters = <String, dynamic>{}; | |||||
| final _data = <String, dynamic>{}; | |||||
| final newOptions = newRequestOptions(options); | |||||
| newOptions.extra.addAll(_extra); | |||||
| newOptions.headers.addAll(<String, dynamic>{}); | |||||
| final _result = await _dio.request<Map<String, dynamic>>( | |||||
| '/api/display-object-param-dynamic-form/$idAction', | |||||
| queryParameters: queryParameters, | |||||
| options: newOptions.merge(method: 'GET', baseUrl: baseUrl), | |||||
| data: _data); | |||||
| final value = ActionUIForm.fromJson(_result.data); | |||||
| return value; | |||||
| } | |||||
| RequestOptions newRequestOptions(Options options) { | RequestOptions newRequestOptions(Options options) { | ||||
| if (options is RequestOptions) { | if (options is RequestOptions) { | ||||
| return options; | return options; |
| import 'package:farm_tpf/custom_model/TbCropDTO.dart'; | import 'package:farm_tpf/custom_model/TbCropDTO.dart'; | ||||
| import 'package:farm_tpf/custom_model/UpdateNoti.dart'; | import 'package:farm_tpf/custom_model/UpdateNoti.dart'; | ||||
| import 'package:farm_tpf/custom_model/WaterType.dart'; | import 'package:farm_tpf/custom_model/WaterType.dart'; | ||||
| import 'package:farm_tpf/custom_model/action_form/ActionUIForm.dart'; | |||||
| import 'package:farm_tpf/custom_model/user.dart'; | import 'package:farm_tpf/custom_model/user.dart'; | ||||
| import 'package:farm_tpf/custom_model/user_request.dart'; | import 'package:farm_tpf/custom_model/user_request.dart'; | ||||
| import 'package:farm_tpf/data/api/dio_provider.dart'; | import 'package:farm_tpf/data/api/dio_provider.dart'; | ||||
| onError(e); | onError(e); | ||||
| } | } | ||||
| } | } | ||||
| Future<ActionUIForm> getActionUIForm({@required int idAction}) { | |||||
| final client = RestClient(dio); | |||||
| var op = buildConfigurableCacheOptions( | |||||
| forceRefresh: true, maxAge: Duration(days: ConstCommon.kMaxAgeCache)); | |||||
| return client.getActionUIForm(idAction, op); | |||||
| } | |||||
| } | } |
| import 'package:bloc/bloc.dart'; | |||||
| import 'package:dio/dio.dart'; | |||||
| import 'package:equatable/equatable.dart'; | |||||
| import 'package:farm_tpf/data/api/app_exception.dart'; | |||||
| import 'package:farm_tpf/data/repository/repository.dart'; | |||||
| import 'package:meta/meta.dart'; | |||||
| part 'action_ui_state.dart'; | |||||
| class ActionUiCubit extends Cubit<ActionUiState> { | |||||
| final Repository repository; | |||||
| ActionUiCubit({@required this.repository}) : super(ActionUiInitial()); | |||||
| Future<void> getActionUIForm(int idAction) async { | |||||
| try { | |||||
| emit(ActionUiLoading()); | |||||
| var result = await repository.getActionUIForm(idAction: idAction); | |||||
| emit(ActionUiSuccess(item: result)); | |||||
| } on DioError catch (e) { | |||||
| emit(ActionUiFailure(errorString: AppException.handleError(e))); | |||||
| } | |||||
| } | |||||
| } |
| part of 'action_ui_cubit.dart'; | |||||
| abstract class ActionUiState extends Equatable { | |||||
| const ActionUiState(); | |||||
| @override | |||||
| List<Object> get props => []; | |||||
| } | |||||
| class ActionUiInitial extends ActionUiState {} | |||||
| class ActionUiLoading extends ActionUiState {} | |||||
| class ActionUiFailure extends ActionUiState { | |||||
| final String errorString; | |||||
| ActionUiFailure({@required this.errorString}); | |||||
| } | |||||
| class ActionUiSuccess<T> extends ActionUiState { | |||||
| final T item; | |||||
| ActionUiSuccess({this.item}); | |||||
| @override | |||||
| List<Object> get props => [item]; | |||||
| } |
| import 'package:farm_tpf/data/repository/repository.dart'; | |||||
| import 'package:farm_tpf/presentation/custom_widgets/app_bar_widget.dart'; | |||||
| import 'package:farm_tpf/presentation/custom_widgets/bloc/media_helper_bloc.dart'; | |||||
| import 'package:farm_tpf/presentation/custom_widgets/button_widget.dart'; | |||||
| import 'package:farm_tpf/presentation/custom_widgets/widget_field_time_picker.dart'; | |||||
| import 'package:farm_tpf/presentation/custom_widgets/widget_loading.dart'; | |||||
| import 'package:farm_tpf/presentation/custom_widgets/widget_media_picker.dart'; | |||||
| import 'package:farm_tpf/presentation/screens/actions/cubit/action_ui_cubit.dart'; | |||||
| import 'package:farm_tpf/utils/pref.dart'; | |||||
| import 'package:farm_tpf/utils/validators.dart'; | |||||
| import 'package:flutter/material.dart'; | |||||
| import 'package:flutter_bloc/flutter_bloc.dart'; | |||||
| import 'package:get/get.dart'; | |||||
| import 'package:keyboard_dismisser/keyboard_dismisser.dart'; | |||||
| import 'state_management_helper/change_file_controller.dart'; | |||||
| class ActionScreen extends StatefulWidget { | |||||
| final int idAction; | |||||
| final String title; | |||||
| ActionScreen({@required this.idAction, @required this.title}); | |||||
| @override | |||||
| _ActionScreenState createState() => _ActionScreenState(); | |||||
| } | |||||
| class _ActionScreenState extends State<ActionScreen> { | |||||
| final _scaffoldKey = GlobalKey<ScaffoldState>(); | |||||
| var _formKey = GlobalKey<FormState>(); | |||||
| var pref = LocalPref(); | |||||
| final _executeByController = TextEditingController(); | |||||
| DateTime executeTime = DateTime.now(); | |||||
| List<String> filePaths = List<String>(); | |||||
| var changeFileController = Get.put(ChangeFileController()); | |||||
| Future<Null> getSharedPrefs() async { | |||||
| var currentFullName = await pref.getString(DATA_CONST.CURRENT_FULL_NAME); | |||||
| _executeByController.text = currentFullName ?? ""; | |||||
| } | |||||
| @override | |||||
| void initState() { | |||||
| super.initState(); | |||||
| getSharedPrefs(); | |||||
| } | |||||
| _validateInputs() async { | |||||
| if (_formKey.currentState.validate()) { | |||||
| _formKey.currentState.save(); | |||||
| LoadingDialog.showLoadingDialog(context); | |||||
| filePaths = Get.find<ChangeFileController>().newFiles; | |||||
| //Create request general model | |||||
| try { | |||||
| //ADD NEW | |||||
| //Update | |||||
| } catch (e) { | |||||
| LoadingDialog.hideLoadingDialog(context); | |||||
| print(e.toString()); | |||||
| } | |||||
| } else { | |||||
| // | |||||
| } | |||||
| } | |||||
| Widget _btnExecuteTimePicker() { | |||||
| return WidgetFieldDateTimePicker( | |||||
| initDateTime: executeTime, | |||||
| onUpdateDateTime: (selectedDate) { | |||||
| // | |||||
| }); | |||||
| } | |||||
| Widget _executeByField() { | |||||
| return TextFormField( | |||||
| keyboardType: TextInputType.text, | |||||
| decoration: InputDecoration(labelText: "Người thực hiện"), | |||||
| enabled: false, | |||||
| controller: _executeByController, | |||||
| onSaved: (newValue) {}, | |||||
| ); | |||||
| } | |||||
| @override | |||||
| Widget build(BuildContext context) => KeyboardDismisser( | |||||
| gestures: [ | |||||
| GestureType.onTap, | |||||
| GestureType.onPanUpdateDownDirection, | |||||
| ], | |||||
| child: Scaffold( | |||||
| backgroundColor: Colors.white, | |||||
| key: _scaffoldKey, | |||||
| appBar: AppBarWidget( | |||||
| isBack: true, | |||||
| action: InkWell( | |||||
| child: Text( | |||||
| 'Lưu', | |||||
| style: TextStyle( | |||||
| color: Colors.red, fontWeight: FontWeight.normal), | |||||
| ), | |||||
| onTap: () {}, | |||||
| ), | |||||
| ), | |||||
| body: KeyboardDismisser( | |||||
| child: MultiBlocProvider( | |||||
| providers: [ | |||||
| BlocProvider<ActionUiCubit>( | |||||
| create: (context) => | |||||
| ActionUiCubit(repository: Repository()) | |||||
| ..getActionUIForm(widget.idAction)), | |||||
| BlocProvider<MediaHelperBloc>( | |||||
| create: (context) => | |||||
| MediaHelperBloc()..add(ChangeListMedia(items: [])), | |||||
| ) | |||||
| ], | |||||
| child: Form( | |||||
| key: _formKey, | |||||
| child: SafeArea( | |||||
| child: SingleChildScrollView( | |||||
| child: BlocConsumer<ActionUiCubit, ActionUiState>( | |||||
| listener: (context, state) async { | |||||
| if (state is ActionUiLoading) { | |||||
| LoadingDialog.hideLoadingDialog(context); | |||||
| } else if (state is ActionUiSuccess) { | |||||
| LoadingDialog.hideLoadingDialog(context); | |||||
| } else if (state is ActionUiFailure) { | |||||
| LoadingDialog.showLoadingDialog(context); | |||||
| } | |||||
| }, | |||||
| builder: (context, state) { | |||||
| return Column( | |||||
| children: [ | |||||
| Padding( | |||||
| padding: const EdgeInsets.all(8.0), | |||||
| child: Column( | |||||
| children: <Widget>[ | |||||
| Container( | |||||
| width: double.infinity, | |||||
| child: Text( | |||||
| "Ngày thực hiện *", | |||||
| style: TextStyle( | |||||
| color: Colors.black54, | |||||
| fontSize: 13.0), | |||||
| ), | |||||
| ), | |||||
| _btnExecuteTimePicker(), | |||||
| SizedBox( | |||||
| height: 8.0, | |||||
| ), | |||||
| _executeByField(), | |||||
| SizedBox( | |||||
| height: 8.0, | |||||
| ), | |||||
| ], | |||||
| ), | |||||
| ), | |||||
| Container( | |||||
| width: double.infinity, | |||||
| height: 16, | |||||
| color: Colors.grey[200], | |||||
| ), | |||||
| BlocBuilder<MediaHelperBloc, MediaHelperState>( | |||||
| builder: (context, state) { | |||||
| if (state is MediaHelperSuccess) { | |||||
| return WidgetMediaPicker( | |||||
| currentItems: state.items, | |||||
| onChangeFiles: (newPathFiles, | |||||
| deletePathFiles) async { | |||||
| Get.find<ChangeFileController>() | |||||
| .change(newPathFiles, | |||||
| deletePathFiles); | |||||
| }); | |||||
| } else { | |||||
| return Center( | |||||
| child: CircularProgressIndicator()); | |||||
| } | |||||
| }), | |||||
| Padding( | |||||
| padding: const EdgeInsets.all(8.0), | |||||
| child: ButtonWidget( | |||||
| title: 'CẬP NHẬT', | |||||
| onPressed: () { | |||||
| FocusScopeNode currentFocus = | |||||
| FocusScope.of(context); | |||||
| if (!currentFocus.hasPrimaryFocus) { | |||||
| currentFocus.unfocus(); | |||||
| } | |||||
| _validateInputs(); | |||||
| }), | |||||
| ), | |||||
| ], | |||||
| ); | |||||
| }, | |||||
| ), | |||||
| ), | |||||
| )), | |||||
| )))); | |||||
| @override | |||||
| void dispose() { | |||||
| _executeByController.dispose(); | |||||
| super.dispose(); | |||||
| } | |||||
| } |
| import 'package:farm_tpf/data/repository/repository.dart'; | import 'package:farm_tpf/data/repository/repository.dart'; | ||||
| import 'package:farm_tpf/models/index.dart'; | import 'package:farm_tpf/models/index.dart'; | ||||
| import 'package:farm_tpf/presentation/custom_widgets/loading_list_page.dart'; | import 'package:farm_tpf/presentation/custom_widgets/loading_list_page.dart'; | ||||
| import 'package:farm_tpf/presentation/screens/actions/sc_action.dart'; | |||||
| import 'package:farm_tpf/presentation/screens/plot_detail/bloc/cubit/plot_action_type_cubit.dart'; | import 'package:farm_tpf/presentation/screens/plot_detail/bloc/cubit/plot_action_type_cubit.dart'; | ||||
| import 'package:farm_tpf/utils/const_assets.dart'; | import 'package:farm_tpf/utils/const_assets.dart'; | ||||
| import 'package:farm_tpf/utils/const_color.dart'; | import 'package:farm_tpf/utils/const_color.dart'; | ||||
| Widget _createActionButtons(ActionType actionType, BuildContext _context) { | Widget _createActionButtons(ActionType actionType, BuildContext _context) { | ||||
| return GestureDetector( | return GestureDetector( | ||||
| onTap: () { | onTap: () { | ||||
| // Navigator.of(context).push( | |||||
| // MaterialPageRoute(builder: (context) => actionType.listScreen)); | |||||
| Get.to(ActionScreen( | |||||
| idAction: actionType.id, title: actionType.description)); | |||||
| }, | }, | ||||
| child: Container( | child: Container( | ||||
| margin: EdgeInsets.all(8), | margin: EdgeInsets.all(8), |
| name: _fe_analyzer_shared | name: _fe_analyzer_shared | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "6.0.0" | |||||
| version: "14.0.0" | |||||
| analyzer: | analyzer: | ||||
| dependency: transitive | dependency: transitive | ||||
| description: | description: | ||||
| name: analyzer | name: analyzer | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "0.39.14" | |||||
| version: "0.41.1" | |||||
| args: | args: | ||||
| dependency: transitive | dependency: transitive | ||||
| description: | description: | ||||
| name: badges | name: badges | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "1.1.3" | |||||
| version: "1.1.6" | |||||
| barcode_scan: | barcode_scan: | ||||
| dependency: "direct main" | dependency: "direct main" | ||||
| description: | description: | ||||
| name: bloc | name: bloc | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "6.0.3" | |||||
| version: "6.1.1" | |||||
| boolean_selector: | boolean_selector: | ||||
| dependency: transitive | dependency: transitive | ||||
| description: | description: | ||||
| name: build | name: build | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "1.3.0" | |||||
| version: "1.6.0" | |||||
| build_config: | build_config: | ||||
| dependency: transitive | dependency: transitive | ||||
| description: | description: | ||||
| name: build_config | name: build_config | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "0.4.2" | |||||
| version: "0.4.5" | |||||
| build_daemon: | build_daemon: | ||||
| dependency: transitive | dependency: transitive | ||||
| description: | description: | ||||
| name: build_resolvers | name: build_resolvers | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "1.3.11" | |||||
| version: "1.5.1" | |||||
| build_runner: | build_runner: | ||||
| dependency: "direct dev" | dependency: "direct dev" | ||||
| description: | description: | ||||
| name: build_runner | name: build_runner | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "1.10.1" | |||||
| version: "1.10.11" | |||||
| build_runner_core: | build_runner_core: | ||||
| dependency: transitive | dependency: transitive | ||||
| description: | description: | ||||
| name: build_runner_core | name: build_runner_core | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "6.0.1" | |||||
| version: "6.1.5" | |||||
| built_collection: | built_collection: | ||||
| dependency: transitive | dependency: transitive | ||||
| description: | description: | ||||
| name: cached_network_image | name: cached_network_image | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "2.3.2+1" | |||||
| version: "2.3.3" | |||||
| camera: | camera: | ||||
| dependency: "direct main" | dependency: "direct main" | ||||
| description: | description: | ||||
| name: camera | name: camera | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "0.5.8+5" | |||||
| version: "0.5.8+17" | |||||
| change_app_package_name: | change_app_package_name: | ||||
| dependency: "direct main" | dependency: "direct main" | ||||
| description: | description: | ||||
| name: checked_yaml | name: checked_yaml | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "1.0.2" | |||||
| version: "1.0.4" | |||||
| cli_util: | cli_util: | ||||
| dependency: transitive | dependency: transitive | ||||
| description: | description: | ||||
| name: cli_util | name: cli_util | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "0.1.4" | |||||
| version: "0.2.0" | |||||
| clock: | clock: | ||||
| dependency: transitive | dependency: transitive | ||||
| description: | description: | ||||
| name: code_builder | name: code_builder | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "3.4.1" | |||||
| version: "3.5.0" | |||||
| collection: | collection: | ||||
| dependency: transitive | dependency: transitive | ||||
| description: | description: | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "2.1.5" | version: "2.1.5" | ||||
| csslib: | |||||
| dependency: transitive | |||||
| description: | |||||
| name: csslib | |||||
| url: "https://pub.dartlang.org" | |||||
| source: hosted | |||||
| version: "0.16.2" | |||||
| cupertino_icons: | cupertino_icons: | ||||
| dependency: "direct main" | dependency: "direct main" | ||||
| description: | description: | ||||
| name: dart_style | name: dart_style | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "1.3.6" | |||||
| version: "1.3.10" | |||||
| dio: | dio: | ||||
| dependency: "direct main" | dependency: "direct main" | ||||
| description: | description: | ||||
| name: dio_http_cache | name: dio_http_cache | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "0.2.9" | |||||
| version: "0.2.11" | |||||
| equatable: | equatable: | ||||
| dependency: "direct main" | dependency: "direct main" | ||||
| description: | description: | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "1.2.0-nullsafety.1" | version: "1.2.0-nullsafety.1" | ||||
| ffi: | |||||
| dependency: transitive | |||||
| description: | |||||
| name: ffi | |||||
| url: "https://pub.dartlang.org" | |||||
| source: hosted | |||||
| version: "0.1.3" | |||||
| file: | file: | ||||
| dependency: transitive | dependency: transitive | ||||
| description: | description: | ||||
| name: file_picker | name: file_picker | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "2.0.7" | |||||
| firebase: | |||||
| dependency: transitive | |||||
| description: | |||||
| name: firebase | |||||
| url: "https://pub.dartlang.org" | |||||
| source: hosted | |||||
| version: "7.3.0" | |||||
| version: "2.1.5" | |||||
| firebase_core: | firebase_core: | ||||
| dependency: transitive | dependency: transitive | ||||
| description: | description: | ||||
| name: firebase_core | name: firebase_core | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "0.5.0" | |||||
| version: "0.5.3" | |||||
| firebase_core_platform_interface: | firebase_core_platform_interface: | ||||
| dependency: transitive | dependency: transitive | ||||
| description: | description: | ||||
| name: firebase_core_platform_interface | name: firebase_core_platform_interface | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "2.0.0" | |||||
| version: "2.1.0" | |||||
| firebase_core_web: | firebase_core_web: | ||||
| dependency: transitive | dependency: transitive | ||||
| description: | description: | ||||
| name: firebase_core_web | name: firebase_core_web | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "0.2.0" | |||||
| version: "0.2.1+1" | |||||
| firebase_messaging: | firebase_messaging: | ||||
| dependency: "direct main" | dependency: "direct main" | ||||
| description: | description: | ||||
| name: firebase_messaging | name: firebase_messaging | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "7.0.0" | |||||
| version: "7.0.3" | |||||
| fixnum: | fixnum: | ||||
| dependency: transitive | dependency: transitive | ||||
| description: | description: | ||||
| name: flutter_bloc | name: flutter_bloc | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "6.0.5" | |||||
| version: "6.1.1" | |||||
| flutter_blurhash: | flutter_blurhash: | ||||
| dependency: transitive | dependency: transitive | ||||
| description: | description: | ||||
| name: flutter_plugin_android_lifecycle | name: flutter_plugin_android_lifecycle | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "1.0.8" | |||||
| version: "1.0.11" | |||||
| flutter_svg: | flutter_svg: | ||||
| dependency: "direct main" | dependency: "direct main" | ||||
| description: | description: | ||||
| name: font_awesome_flutter | name: font_awesome_flutter | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "8.8.1" | |||||
| version: "8.11.0" | |||||
| formz: | formz: | ||||
| dependency: "direct main" | dependency: "direct main" | ||||
| description: | description: | ||||
| name: formz | name: formz | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "0.3.0" | |||||
| version: "0.3.2" | |||||
| get: | get: | ||||
| dependency: "direct main" | dependency: "direct main" | ||||
| description: | description: | ||||
| name: get | name: get | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "3.10.1" | |||||
| version: "3.24.0" | |||||
| glob: | glob: | ||||
| dependency: transitive | dependency: transitive | ||||
| description: | description: | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "0.2.0" | version: "0.2.0" | ||||
| html: | |||||
| dependency: transitive | |||||
| description: | |||||
| name: html | |||||
| url: "https://pub.dartlang.org" | |||||
| source: hosted | |||||
| version: "0.14.0+3" | |||||
| http: | http: | ||||
| dependency: "direct main" | dependency: "direct main" | ||||
| description: | description: | ||||
| name: json_annotation | name: json_annotation | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "3.0.1" | |||||
| version: "3.1.1" | |||||
| json_serializable: | json_serializable: | ||||
| dependency: "direct dev" | dependency: "direct dev" | ||||
| description: | description: | ||||
| name: json_serializable | name: json_serializable | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "3.4.1" | |||||
| version: "3.5.1" | |||||
| keyboard_dismisser: | keyboard_dismisser: | ||||
| dependency: "direct main" | dependency: "direct main" | ||||
| description: | description: | ||||
| name: node_interop | name: node_interop | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "1.1.1" | |||||
| version: "1.2.1" | |||||
| node_io: | node_io: | ||||
| dependency: transitive | dependency: transitive | ||||
| description: | description: | ||||
| name: node_io | name: node_io | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "1.1.1" | |||||
| version: "1.2.0" | |||||
| octo_image: | octo_image: | ||||
| dependency: transitive | dependency: transitive | ||||
| description: | description: | ||||
| name: package_info | name: package_info | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "0.4.3" | |||||
| version: "0.4.3+2" | |||||
| path: | path: | ||||
| dependency: transitive | dependency: transitive | ||||
| description: | description: | ||||
| name: path_provider | name: path_provider | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "1.6.14" | |||||
| version: "1.6.24" | |||||
| path_provider_linux: | path_provider_linux: | ||||
| dependency: transitive | dependency: transitive | ||||
| description: | description: | ||||
| name: path_provider_macos | name: path_provider_macos | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "0.0.4+4" | |||||
| version: "0.0.4+6" | |||||
| path_provider_platform_interface: | path_provider_platform_interface: | ||||
| dependency: transitive | dependency: transitive | ||||
| description: | description: | ||||
| name: path_provider_platform_interface | name: path_provider_platform_interface | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "1.0.3" | |||||
| version: "1.0.4" | |||||
| path_provider_windows: | |||||
| dependency: transitive | |||||
| description: | |||||
| name: path_provider_windows | |||||
| url: "https://pub.dartlang.org" | |||||
| source: hosted | |||||
| version: "0.0.4+3" | |||||
| pattern_formatter: | pattern_formatter: | ||||
| dependency: "direct main" | dependency: "direct main" | ||||
| description: | description: | ||||
| name: pedantic | name: pedantic | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "1.9.0" | |||||
| version: "1.9.2" | |||||
| petitparser: | petitparser: | ||||
| dependency: transitive | dependency: transitive | ||||
| description: | description: | ||||
| name: plugin_platform_interface | name: plugin_platform_interface | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "1.0.2" | |||||
| version: "1.0.3" | |||||
| pool: | pool: | ||||
| dependency: transitive | dependency: transitive | ||||
| description: | description: | ||||
| name: protobuf | name: protobuf | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "1.0.1" | |||||
| version: "1.1.0" | |||||
| provider: | provider: | ||||
| dependency: transitive | dependency: transitive | ||||
| description: | description: | ||||
| name: provider | name: provider | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "4.3.2+2" | |||||
| version: "4.3.2+3" | |||||
| pub_semver: | pub_semver: | ||||
| dependency: transitive | dependency: transitive | ||||
| description: | description: | ||||
| name: pubspec_parse | name: pubspec_parse | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "0.1.5" | |||||
| version: "0.1.7" | |||||
| quiver: | quiver: | ||||
| dependency: transitive | dependency: transitive | ||||
| description: | description: | ||||
| name: quiver | name: quiver | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "2.1.3" | |||||
| version: "2.1.5" | |||||
| retrofit: | retrofit: | ||||
| dependency: transitive | dependency: transitive | ||||
| description: | description: | ||||
| name: retrofit | name: retrofit | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "1.3.4" | |||||
| version: "1.3.4+1" | |||||
| retrofit_generator: | retrofit_generator: | ||||
| dependency: "direct dev" | dependency: "direct dev" | ||||
| description: | description: | ||||
| name: retrofit_generator | name: retrofit_generator | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "1.3.7+6" | |||||
| version: "1.4.1+1" | |||||
| rflutter_alert: | rflutter_alert: | ||||
| dependency: "direct main" | dependency: "direct main" | ||||
| description: | description: | ||||
| name: shared_preferences | name: shared_preferences | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "0.5.10" | |||||
| version: "0.5.12+4" | |||||
| shared_preferences_linux: | shared_preferences_linux: | ||||
| dependency: transitive | dependency: transitive | ||||
| description: | description: | ||||
| name: shared_preferences_linux | name: shared_preferences_linux | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "0.0.2+2" | |||||
| version: "0.0.2+4" | |||||
| shared_preferences_macos: | shared_preferences_macos: | ||||
| dependency: transitive | dependency: transitive | ||||
| description: | description: | ||||
| name: shared_preferences_macos | name: shared_preferences_macos | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "0.0.1+10" | |||||
| version: "0.0.1+11" | |||||
| shared_preferences_platform_interface: | shared_preferences_platform_interface: | ||||
| dependency: transitive | dependency: transitive | ||||
| description: | description: | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "0.1.2+7" | version: "0.1.2+7" | ||||
| shared_preferences_windows: | |||||
| dependency: transitive | |||||
| description: | |||||
| name: shared_preferences_windows | |||||
| url: "https://pub.dartlang.org" | |||||
| source: hosted | |||||
| version: "0.0.1+3" | |||||
| shelf: | shelf: | ||||
| dependency: transitive | dependency: transitive | ||||
| description: | description: | ||||
| name: shimmer | name: shimmer | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "1.1.1" | |||||
| version: "1.1.2" | |||||
| sky_engine: | sky_engine: | ||||
| dependency: transitive | dependency: transitive | ||||
| description: flutter | description: flutter | ||||
| name: source_gen | name: source_gen | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "0.9.6" | |||||
| version: "0.9.10+1" | |||||
| source_span: | source_span: | ||||
| dependency: transitive | dependency: transitive | ||||
| description: | description: | ||||
| name: sqflite | name: sqflite | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "1.3.1+1" | |||||
| version: "1.3.2+1" | |||||
| sqflite_common: | sqflite_common: | ||||
| dependency: transitive | dependency: transitive | ||||
| description: | description: | ||||
| name: timing | name: timing | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "0.1.1+2" | |||||
| version: "0.1.1+3" | |||||
| tuple: | tuple: | ||||
| dependency: transitive | dependency: transitive | ||||
| description: | description: | ||||
| name: video_player | name: video_player | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "0.10.12+2" | |||||
| version: "0.10.12+5" | |||||
| video_player_platform_interface: | video_player_platform_interface: | ||||
| dependency: transitive | dependency: transitive | ||||
| description: | description: | ||||
| name: video_player_platform_interface | name: video_player_platform_interface | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "2.1.1" | |||||
| version: "2.2.0" | |||||
| video_player_web: | video_player_web: | ||||
| dependency: transitive | dependency: transitive | ||||
| description: | description: | ||||
| name: video_player_web | name: video_player_web | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "0.1.3+2" | |||||
| version: "0.1.4+1" | |||||
| watcher: | watcher: | ||||
| dependency: transitive | dependency: transitive | ||||
| description: | description: | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "1.1.0" | version: "1.1.0" | ||||
| win32: | |||||
| dependency: transitive | |||||
| description: | |||||
| name: win32 | |||||
| url: "https://pub.dartlang.org" | |||||
| source: hosted | |||||
| version: "1.7.4" | |||||
| xdg_directories: | xdg_directories: | ||||
| dependency: transitive | dependency: transitive | ||||
| description: | description: | ||||
| name: xdg_directories | name: xdg_directories | ||||
| url: "https://pub.dartlang.org" | url: "https://pub.dartlang.org" | ||||
| source: hosted | source: hosted | ||||
| version: "0.1.0" | |||||
| version: "0.1.2" | |||||
| xml: | xml: | ||||
| dependency: transitive | dependency: transitive | ||||
| description: | description: | ||||
| source: hosted | source: hosted | ||||
| version: "2.2.1" | version: "2.2.1" | ||||
| sdks: | sdks: | ||||
| dart: ">=2.10.0-110 <2.11.0" | |||||
| flutter: ">=1.20.0 <2.0.0" | |||||
| dart: ">=2.10.2 <2.11.0" | |||||
| flutter: ">=1.22.2 <2.0.0" |