update flow after print back to home
@@ -8,7 +8,7 @@
|
||||
|
||||
|
||||
<application
|
||||
android:label="POSPro"
|
||||
android:label="Kulakpos"
|
||||
android:name="${applicationName}"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:enableOnBackInvokedCallback="true">
|
||||
|
||||
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 127 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 148 KiB |
BIN
android/app/src/main/playstore-icon1.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
@@ -4,9 +4,9 @@
|
||||
<item android:drawable="@android:color/white" />
|
||||
|
||||
<!-- You can insert your own image assets here -->
|
||||
<!-- <item>
|
||||
<item>
|
||||
<bitmap
|
||||
android:gravity="center"
|
||||
android:src="@mipmap/launch_image" />
|
||||
</item> -->
|
||||
android:src="@drawable/launch_image" />
|
||||
</item>
|
||||
</layer-list>
|
||||
|
||||
BIN
android/app/src/main/res/drawable/launch_image.png
Normal file
|
After Width: | Height: | Size: 75 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 6.8 KiB |
BIN
android/app/src/main/res/mipmap-hdpi/ic_launcher0.png
Normal file
|
After Width: | Height: | Size: 71 KiB |
BIN
android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground0.png
Normal file
|
After Width: | Height: | Size: 71 KiB |
BIN
android/app/src/main/res/mipmap-hdpi/ic_launcher_round0.png
Normal file
|
After Width: | Height: | Size: 71 KiB |
|
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 30 KiB |
BIN
images/logo.xcf
Normal file
BIN
images/logokulakpos.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
images/splashkulakpos.png
Normal file
|
After Width: | Height: | Size: 75 KiB |
BIN
images/splashkulakpos.xcf
Normal file
@@ -2,117 +2,115 @@
|
||||
"images": [
|
||||
{
|
||||
"filename": "Icon-App-20x20@2x.png",
|
||||
"idiom": "iphone",
|
||||
"idiom": "universal",
|
||||
"scale": "2x",
|
||||
"size": "20x20"
|
||||
"size": "20x20",
|
||||
"platform": "ios"
|
||||
},
|
||||
{
|
||||
"filename": "Icon-App-20x20@3x.png",
|
||||
"idiom": "iphone",
|
||||
"idiom": "universal",
|
||||
"scale": "3x",
|
||||
"size": "20x20"
|
||||
},
|
||||
{
|
||||
"filename": "Icon-App-29x29@1x.png",
|
||||
"idiom": "iphone",
|
||||
"scale": "1x",
|
||||
"size": "29x29"
|
||||
"size": "20x20",
|
||||
"platform": "ios"
|
||||
},
|
||||
{
|
||||
"filename": "Icon-App-29x29@2x.png",
|
||||
"idiom": "iphone",
|
||||
"idiom": "universal",
|
||||
"scale": "2x",
|
||||
"size": "29x29"
|
||||
"size": "29x29",
|
||||
"platform": "ios"
|
||||
},
|
||||
{
|
||||
"filename": "Icon-App-29x29@3x.png",
|
||||
"idiom": "iphone",
|
||||
"idiom": "universal",
|
||||
"scale": "3x",
|
||||
"size": "29x29"
|
||||
"size": "29x29",
|
||||
"platform": "ios"
|
||||
},
|
||||
{
|
||||
"filename": "Icon-App-38x38@2x.png",
|
||||
"idiom": "universal",
|
||||
"scale": "2x",
|
||||
"size": "38x38",
|
||||
"platform": "ios"
|
||||
},
|
||||
{
|
||||
"filename": "Icon-App-38x38@3x.png",
|
||||
"idiom": "universal",
|
||||
"scale": "3x",
|
||||
"size": "38x38",
|
||||
"platform": "ios"
|
||||
},
|
||||
{
|
||||
"filename": "Icon-App-40x40@2x.png",
|
||||
"idiom": "iphone",
|
||||
"idiom": "universal",
|
||||
"scale": "2x",
|
||||
"size": "40x40"
|
||||
"size": "40x40",
|
||||
"platform": "ios"
|
||||
},
|
||||
{
|
||||
"filename": "Icon-App-40x40@3x.png",
|
||||
"idiom": "iphone",
|
||||
"idiom": "universal",
|
||||
"scale": "3x",
|
||||
"size": "40x40"
|
||||
"size": "40x40",
|
||||
"platform": "ios"
|
||||
},
|
||||
{
|
||||
"filename": "Icon-App-60x60@2x.png",
|
||||
"idiom": "iphone",
|
||||
"idiom": "universal",
|
||||
"scale": "2x",
|
||||
"size": "60x60"
|
||||
"size": "60x60",
|
||||
"platform": "ios"
|
||||
},
|
||||
{
|
||||
"filename": "Icon-App-60x60@3x.png",
|
||||
"idiom": "iphone",
|
||||
"idiom": "universal",
|
||||
"scale": "3x",
|
||||
"size": "60x60"
|
||||
"size": "60x60",
|
||||
"platform": "ios"
|
||||
},
|
||||
{
|
||||
"filename": "Icon-App-20x20@1x.png",
|
||||
"idiom": "ipad",
|
||||
"scale": "1x",
|
||||
"size": "20x20"
|
||||
},
|
||||
{
|
||||
"filename": "Icon-App-20x20@2x.png",
|
||||
"idiom": "ipad",
|
||||
"filename": "Icon-App-64x64@2x.png",
|
||||
"idiom": "universal",
|
||||
"scale": "2x",
|
||||
"size": "20x20"
|
||||
"size": "64x64",
|
||||
"platform": "ios"
|
||||
},
|
||||
{
|
||||
"filename": "Icon-App-29x29@1x.png",
|
||||
"idiom": "ipad",
|
||||
"scale": "1x",
|
||||
"size": "29x29"
|
||||
"filename": "Icon-App-64x64@3x.png",
|
||||
"idiom": "universal",
|
||||
"scale": "3x",
|
||||
"size": "64x64",
|
||||
"platform": "ios"
|
||||
},
|
||||
{
|
||||
"filename": "Icon-App-29x29@2x.png",
|
||||
"idiom": "ipad",
|
||||
"filename": "Icon-App-68x68@2x.png",
|
||||
"idiom": "universal",
|
||||
"scale": "2x",
|
||||
"size": "29x29"
|
||||
},
|
||||
{
|
||||
"filename": "Icon-App-40x40@1x.png",
|
||||
"idiom": "ipad",
|
||||
"scale": "1x",
|
||||
"size": "40x40"
|
||||
},
|
||||
{
|
||||
"filename": "Icon-App-40x40@2x.png",
|
||||
"idiom": "ipad",
|
||||
"scale": "2x",
|
||||
"size": "40x40"
|
||||
},
|
||||
{
|
||||
"filename": "Icon-App-76x76@1x.png",
|
||||
"idiom": "ipad",
|
||||
"scale": "1x",
|
||||
"size": "76x76"
|
||||
"size": "68x68",
|
||||
"platform": "ios"
|
||||
},
|
||||
{
|
||||
"filename": "Icon-App-76x76@2x.png",
|
||||
"idiom": "ipad",
|
||||
"idiom": "universal",
|
||||
"scale": "2x",
|
||||
"size": "76x76"
|
||||
"size": "76x76",
|
||||
"platform": "ios"
|
||||
},
|
||||
{
|
||||
"filename": "Icon-App-83.5x83.5@2x.png",
|
||||
"idiom": "ipad",
|
||||
"idiom": "universal",
|
||||
"scale": "2x",
|
||||
"size": "83.5x83.5"
|
||||
"size": "83.5x83.5",
|
||||
"platform": "ios"
|
||||
},
|
||||
{
|
||||
"filename": "Icon-App-1024x1024@1x.png",
|
||||
"idiom": "ios-marketing",
|
||||
"idiom": "universal",
|
||||
"scale": "1x",
|
||||
"size": "1024x1024"
|
||||
"size": "1024x1024",
|
||||
"platform": "ios"
|
||||
}
|
||||
],
|
||||
"info": {
|
||||
|
||||
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 231 KiB |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 6.6 KiB |
|
After Width: | Height: | Size: 5.5 KiB |
|
After Width: | Height: | Size: 9.7 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 18 KiB |
@@ -15,14 +15,16 @@ import '../../Provider/profile_provider.dart';
|
||||
import '../../service/check_actions_when_no_branch.dart';
|
||||
|
||||
class Home extends StatefulWidget {
|
||||
const Home({super.key});
|
||||
const Home({super.key, this.initialIndex = 0});
|
||||
|
||||
final int initialIndex;
|
||||
|
||||
@override
|
||||
_HomeState createState() => _HomeState();
|
||||
}
|
||||
|
||||
class _HomeState extends State<Home> {
|
||||
int _tabIndex = 0;
|
||||
late int _tabIndex = widget.initialIndex;
|
||||
late final PageController pageController = PageController(initialPage: _tabIndex);
|
||||
|
||||
@override
|
||||
|
||||
@@ -26,6 +26,7 @@ import '../../widgets/universal_image.dart';
|
||||
import '../Products/add product/modle/create_product_model.dart';
|
||||
import '../language/language_provider.dart';
|
||||
import '../../Provider/product_provider.dart';
|
||||
import '../Home/home.dart';
|
||||
|
||||
class SalesInvoiceDetails extends StatefulWidget {
|
||||
const SalesInvoiceDetails({
|
||||
@@ -165,7 +166,7 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
businessSettingData.when(
|
||||
data: (business) {
|
||||
final isSvg = business.data?.thermalInvoiceLogo?.endsWith('.svg');
|
||||
final imageUrl = '${APIConfig.domain}${business.data?.thermalInvoiceLogo}';
|
||||
final imageUrl = '${APIConfig.domain}${business.data?.thermalInvoiceLogo ?? ""}';
|
||||
const placeholder = AssetImage(mainConstant.logo);
|
||||
return (business.data?.thermalInvoiceLogo?.isEmptyOrNull ?? true)
|
||||
? buildInvoiceLogo(image: placeholder)
|
||||
@@ -1217,7 +1218,7 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
color: const Color(0xffF5F3F3),
|
||||
image: DecorationImage(
|
||||
image: NetworkImage(
|
||||
'${APIConfig.domain}${widget.saleTransaction.image}',
|
||||
'${APIConfig.domain}${widget.saleTransaction.image ?? ""}',
|
||||
),
|
||||
fit: BoxFit.contain),
|
||||
),
|
||||
@@ -1247,12 +1248,14 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
if (widget.businessInfo.data?.showInvoiceScannerLogo == 1)
|
||||
if (widget.businessInfo.data?.showInvoiceScannerLogo == 1 &&
|
||||
widget.businessInfo.data?.invoiceScannerLogo != null)
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 10),
|
||||
child: Center(
|
||||
child: UniversalImage(
|
||||
imagePath: '${APIConfig.domain}${widget.businessInfo.data?.invoiceScannerLogo}',
|
||||
imagePath:
|
||||
'${APIConfig.domain}${widget.businessInfo.data?.invoiceScannerLogo ?? ""}',
|
||||
height: 120,
|
||||
width: 120,
|
||||
),
|
||||
@@ -1314,12 +1317,21 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
PrintSalesTransactionModel model = PrintSalesTransactionModel(
|
||||
transitionModel: widget.saleTransaction,
|
||||
personalInformationModel: widget.businessInfo);
|
||||
await printerData.printSalesThermalInvoiceNow(
|
||||
bool printed = await printerData.printSalesThermalInvoiceNow(
|
||||
transaction: model,
|
||||
productList: model.transitionModel!.salesDetails,
|
||||
context: context,
|
||||
products: products.value,
|
||||
);
|
||||
if (printed && context.mounted) {
|
||||
Navigator.pushAndRemoveUntil(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => const Home(initialIndex: 1),
|
||||
),
|
||||
(route) => false,
|
||||
);
|
||||
}
|
||||
// final defould = true;
|
||||
|
||||
// if (defould) {
|
||||
|
||||
@@ -42,14 +42,14 @@ String noProductImageUrl = 'images/no_product_image.png';
|
||||
|
||||
///---------update information---------------
|
||||
|
||||
const String splashLogo = 'images/splashLogo.png';
|
||||
const String splashLogo = 'images/splashkulakpos.png';
|
||||
const String onboard1 = 'images/onbord1.png';
|
||||
const String onboard2 = 'images/onbord2.png';
|
||||
const String onboard3 = 'images/onbord3.png';
|
||||
const String logo = 'images/logo.png';
|
||||
const String appsName = 'POSpro';
|
||||
const String companyWebsite = 'https://acnoo.com';
|
||||
const String companyName = 'Acnoo';
|
||||
const String logo = 'images/logokulakpos.png';
|
||||
const String appsName = 'KULAKPOS';
|
||||
const String companyWebsite = 'https://kulakpos.id';
|
||||
const String companyName = 'KULAKPOS';
|
||||
|
||||
bool connected = false;
|
||||
|
||||
|
||||
@@ -129,16 +129,27 @@ class ThermalPrinter extends ChangeNotifier {
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> printSalesThermalInvoiceNow(
|
||||
Future<bool> printSalesThermalInvoiceNow(
|
||||
{required PrintSalesTransactionModel transaction,
|
||||
required List<SalesDetails>? productList,
|
||||
required BuildContext context,
|
||||
List<Product>? products}) async {
|
||||
await getBluetooth();
|
||||
isBluetoothConnected
|
||||
? SalesThermalPrinterInvoice().printSalesTicket(
|
||||
printTransactionModel: transaction, productList: productList, context: context, products: products)
|
||||
: listOfBluDialog(context: context);
|
||||
if (isBluetoothConnected) {
|
||||
await SalesThermalPrinterInvoice().printSalesTicket(
|
||||
printTransactionModel: transaction, productList: productList, context: context, products: products);
|
||||
return true;
|
||||
} else {
|
||||
if (context.mounted) {
|
||||
await listOfBluDialog(context: context);
|
||||
}
|
||||
if (isBluetoothConnected) {
|
||||
await SalesThermalPrinterInvoice().printSalesTicket(
|
||||
printTransactionModel: transaction, productList: productList, context: context, products: products);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> printPurchaseThermalInvoiceNow(
|
||||
|
||||
@@ -135,14 +135,14 @@ flutter_intl:
|
||||
|
||||
|
||||
icons_launcher:
|
||||
image_path: "images/appIcon.png"
|
||||
image_path: "images/logokulakpos.png"
|
||||
platforms:
|
||||
android:
|
||||
enable: true
|
||||
|
||||
ios:
|
||||
enable: true
|
||||
image_path: "images/appIcon.png"
|
||||
image_path: "images/logokulakpos.png"
|
||||
|
||||
dependency_overrides:
|
||||
vector_math: ^2.2.0
|
||||
|
||||