perbaikan on possale string 1
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:bijoy_helper/bijoy_helper.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:pdf/widgets.dart' as pw;
|
||||
import 'package:restart_app/restart_app.dart';
|
||||
|
||||
import 'generated/l10n.dart' as lang;
|
||||
import 'currency.dart';
|
||||
@@ -49,7 +52,8 @@ const String onboard2 = 'images/onbord2.png';
|
||||
const String onboard3 = 'images/onbord3.png';
|
||||
const String logo = 'images/logokulakpos.png';
|
||||
const String appsName = 'KULAKPOS';
|
||||
const String companyWebsite = 'https://kulakpos.id';
|
||||
const String companyWebsite = 'http://localhost:8000/';
|
||||
// const String companyWebsite = 'https://dev.kulakpos.id/';
|
||||
const String companyName = 'ONE TEKNOLOGI';
|
||||
|
||||
bool connected = false;
|
||||
@@ -242,6 +246,15 @@ String formatPointNumber(num value, {bool addComma = false}) {
|
||||
|
||||
return formatted;
|
||||
}
|
||||
|
||||
String formatWithSeparator(num value) {
|
||||
try {
|
||||
final formatter = NumberFormat.decimalPattern(getLocaleFromCurrency());
|
||||
return formatter.format(value);
|
||||
} catch (e) {
|
||||
return value.toStringAsFixed(0);
|
||||
}
|
||||
}
|
||||
// String formatPointNumber(num value) {
|
||||
// if (value % 1 == 0) {
|
||||
// return value.toInt().toString();
|
||||
@@ -330,13 +343,19 @@ Widget getFieldLabelText({required String label, required BuildContext context})
|
||||
final theme = Theme.of(context);
|
||||
return label.contains('*')
|
||||
? RichText(
|
||||
text: TextSpan(text: label.replaceAll('*', ''), style: theme.textTheme.bodyLarge, children: [
|
||||
TextSpan(
|
||||
text: '*',
|
||||
style: theme.textTheme.bodyLarge?.copyWith(
|
||||
color: Color(0xffF68A3D),
|
||||
))
|
||||
]))
|
||||
text: TextSpan(
|
||||
text: label.replaceAll('*', ''),
|
||||
style: theme.textTheme.bodyLarge,
|
||||
children: [
|
||||
TextSpan(
|
||||
text: '*',
|
||||
style: theme.textTheme.bodyLarge?.copyWith(
|
||||
color: Color(0xffF68A3D),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
: Text(label);
|
||||
}
|
||||
|
||||
@@ -346,3 +365,9 @@ double fontSizeForPrinter(String? printerSize) {
|
||||
if (printerSize != "3_inch_80mm") return 17;
|
||||
return 17;
|
||||
}
|
||||
|
||||
void restartApp() {
|
||||
if (Platform.isAndroid || Platform.isIOS) {
|
||||
Restart.restartApp();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user