mirror of
https://github.com/inventree/inventree-app.git
synced 2025-04-28 05:26:47 +00:00
Cleanup
This commit is contained in:
parent
ff82ed105d
commit
a893d51e3c
@ -203,13 +203,19 @@ class _CameraBarcodeControllerState extends InvenTreeBarcodeControllerState {
|
|||||||
|
|
||||||
String info_text = scanning_paused ? L10().barcodeScanPaused : L10().barcodeScanPause;
|
String info_text = scanning_paused ? L10().barcodeScanPaused : L10().barcodeScanPause;
|
||||||
|
|
||||||
|
String text = scanned_code.isNotEmpty ? scanned_code : info_text;
|
||||||
|
|
||||||
|
if (text.length > 50) {
|
||||||
|
text = text.substring(0, 50) + "...";
|
||||||
|
}
|
||||||
|
|
||||||
return SafeArea(
|
return SafeArea(
|
||||||
child: Align(
|
child: Align(
|
||||||
alignment: Alignment.bottomCenter,
|
alignment: Alignment.bottomCenter,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.all(10),
|
padding: EdgeInsets.all(10),
|
||||||
child: Text(
|
child: Text(
|
||||||
scanned_code.isNotEmpty ? scanned_code : info_text,
|
text,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user