|
|
|
@ -22,7 +22,7 @@ class PickAsset extends StatelessWidget {
|
|
|
|
AppTextFormField(
|
|
|
|
AppTextFormField(
|
|
|
|
enable: false,
|
|
|
|
enable: false,
|
|
|
|
labelText: TranslationKeys.device,
|
|
|
|
labelText: TranslationKeys.device,
|
|
|
|
initialValue: context.translate(TranslationKeys.site),
|
|
|
|
initialValue: context.translate(TranslationKeys.pickAsset),
|
|
|
|
suffixIcon: "qr".toSvgAsset(height: 24, fit: BoxFit.fitHeight).paddingOnly(end: 16),
|
|
|
|
suffixIcon: "qr".toSvgAsset(height: 24, fit: BoxFit.fitHeight).paddingOnly(end: 16),
|
|
|
|
).onPress(() async {
|
|
|
|
).onPress(() async {
|
|
|
|
Device device = await Navigator.of(context).pushNamed(SingleDevicePicker.id) as Device;
|
|
|
|
Device device = await Navigator.of(context).pushNamed(SingleDevicePicker.id) as Device;
|
|
|
|
@ -48,65 +48,5 @@ class PickAsset extends StatelessWidget {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
);
|
|
|
|
);
|
|
|
|
// return ElevatedButton(
|
|
|
|
|
|
|
|
// style: ElevatedButton.styleFrom(
|
|
|
|
|
|
|
|
// elevation: 0,
|
|
|
|
|
|
|
|
// padding: EdgeInsets.symmetric(horizontal: 16, vertical: device == null ? 12 : 8),
|
|
|
|
|
|
|
|
// shape: RoundedRectangleBorder(
|
|
|
|
|
|
|
|
// borderRadius: BorderRadius.circular(AppStyle.borderRadius * AppStyle.getScaleFactor(context)),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// foregroundColor: AColors.primaryColor,
|
|
|
|
|
|
|
|
// backgroundColor: AColors.inputFieldBackgroundColor,
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// child: Row(
|
|
|
|
|
|
|
|
// children: [
|
|
|
|
|
|
|
|
// Expanded(
|
|
|
|
|
|
|
|
// child: ListTile(
|
|
|
|
|
|
|
|
// contentPadding: const EdgeInsets.all(0),
|
|
|
|
|
|
|
|
// title: Text(
|
|
|
|
|
|
|
|
// "${"context"} : ${device.serialNumber}",
|
|
|
|
|
|
|
|
// style: Theme.of(context).textTheme.subtitle1,
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// subtitle: Column(
|
|
|
|
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
|
|
|
// children: [
|
|
|
|
|
|
|
|
// Divider(
|
|
|
|
|
|
|
|
// color: Theme.of(context).textTheme.subtitle1.color,
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// Text(
|
|
|
|
|
|
|
|
// "${_subtitle.assetNumber} : ${device.number}",
|
|
|
|
|
|
|
|
// style: Theme.of(context).textTheme.subtitle2,
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// Divider(
|
|
|
|
|
|
|
|
// color: Theme.of(context).textTheme.subtitle1.color,
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// Text(
|
|
|
|
|
|
|
|
// "${_subtitle.assetName} : ${device.modelDefinition.assetName}",
|
|
|
|
|
|
|
|
// style: Theme.of(context).textTheme.subtitle2,
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// Divider(
|
|
|
|
|
|
|
|
// color: Theme.of(context).textTheme.subtitle1.color,
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// Text(
|
|
|
|
|
|
|
|
// "${_subtitle.brand} : ${device.modelDefinition.manufacturerName}",
|
|
|
|
|
|
|
|
// style: Theme.of(context).textTheme.subtitle2,
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// Divider(
|
|
|
|
|
|
|
|
// color: Theme.of(context).textTheme.subtitle1.color,
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// Text(
|
|
|
|
|
|
|
|
// "${_subtitle.model} : ${device.modelDefinition.modelName}",
|
|
|
|
|
|
|
|
// style: Theme.of(context).textTheme.subtitle2,
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ],
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// )),
|
|
|
|
|
|
|
|
// const Icon(Icons.keyboard_arrow_down, size: 28, color: AColors.grey3A),
|
|
|
|
|
|
|
|
// ],
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// onPressed: () async {
|
|
|
|
|
|
|
|
// Device _device = await Navigator.of(context).pushNamed(SingleDevicePicker.id) as Device;
|
|
|
|
|
|
|
|
// onDevicePick(_device);
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|