You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
2.0 KiB
Dart
47 lines
2.0 KiB
Dart
import 'package:flutter/cupertino.dart';
|
|
import 'package:test_sa/extensions/context_extension.dart';
|
|
|
|
class SearchAllRequestsModel {
|
|
SearchByRequestNumberModel requestNumber;
|
|
SearchByAssetNameModel assetName;
|
|
SearchByAssetNoModel assetNo;
|
|
SearchByManufactureModel manufacture;
|
|
SearchBySNModel sn;
|
|
SearchByRequestModel model;
|
|
SearchAllRequestsBaseModel selectedValue;
|
|
|
|
SearchAllRequestsModel({this.requestNumber, this.assetName, this.assetNo, this.manufacture, this.sn, this.model});
|
|
}
|
|
|
|
abstract class SearchAllRequestsBaseModel {
|
|
String label;
|
|
String value;
|
|
BuildContext context;
|
|
TextInputType inputType;
|
|
SearchAllRequestsBaseModel(BuildContext context, {this.label, this.value, this.inputType = TextInputType.text});
|
|
}
|
|
|
|
class SearchByRequestNumberModel extends SearchAllRequestsBaseModel {
|
|
SearchByRequestNumberModel(BuildContext context, {String value = "0"}) : super(context, label: "${context.translation.requestNo}.", value: value?.toString());
|
|
}
|
|
|
|
class SearchByAssetNameModel extends SearchAllRequestsBaseModel {
|
|
SearchByAssetNameModel(BuildContext context, {String value = "0"}) : super(context, label: context.translation.assetName, value: value);
|
|
}
|
|
|
|
class SearchByAssetNoModel extends SearchAllRequestsBaseModel {
|
|
SearchByAssetNoModel(BuildContext context, {String value = "0"}) : super(context, label: context.translation.assetNo, value: value, inputType: TextInputType.number);
|
|
}
|
|
|
|
class SearchByManufactureModel extends SearchAllRequestsBaseModel {
|
|
SearchByManufactureModel(BuildContext context, {String value = "0"}) : super(context, label: context.translation.manufacture, value: value);
|
|
}
|
|
|
|
class SearchBySNModel extends SearchAllRequestsBaseModel {
|
|
SearchBySNModel(BuildContext context, {String value = "0"}) : super(context, label: context.translation.sn, value: value);
|
|
}
|
|
|
|
class SearchByRequestModel extends SearchAllRequestsBaseModel {
|
|
SearchByRequestModel(BuildContext context, {String value = "0"}) : super(context, label: context.translation.model, value: value);
|
|
}
|