update
This commit is contained in:
parent
dcb929cde5
commit
c1be16845e
@ -2,6 +2,8 @@ plugins {
|
||||
id "com.android.application"
|
||||
id "kotlin-android"
|
||||
id "dev.flutter.flutter-gradle-plugin"
|
||||
id "com.google.gms.google-services"
|
||||
id "com.google.firebase.crashlytics"
|
||||
}
|
||||
|
||||
def localProperties = new Properties()
|
||||
@ -45,7 +47,7 @@ android {
|
||||
applicationId "com.appscale.pos"
|
||||
// You can update the following values to match your application needs.
|
||||
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
|
||||
minSdkVersion 21
|
||||
minSdkVersion 23
|
||||
targetSdkVersion 35
|
||||
versionCode flutterVersionCode.toInteger()
|
||||
versionName flutterVersionName
|
||||
@ -69,4 +71,6 @@ dependencies {
|
||||
//multiDex
|
||||
implementation 'com.android.support:multidex:1.0.3'
|
||||
implementation 'androidx.multidex:multidex:2.0.1'
|
||||
implementation platform('com.google.firebase:firebase-bom:34.2.0')
|
||||
implementation 'com.google.firebase:firebase-crashlytics'
|
||||
}
|
||||
|
||||
29
android/app/google-services.json
Normal file
29
android/app/google-services.json
Normal file
@ -0,0 +1,29 @@
|
||||
{
|
||||
"project_info": {
|
||||
"project_number": "1094037575589",
|
||||
"project_id": "apskel-pos",
|
||||
"storage_bucket": "apskel-pos.firebasestorage.app"
|
||||
},
|
||||
"client": [
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:1094037575589:android:5157684038a971a3d3fa4c",
|
||||
"android_client_info": {
|
||||
"package_name": "com.appscale.pos"
|
||||
}
|
||||
},
|
||||
"oauth_client": [],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyAle1ZcO4Z7wtNJUHkHEVkuBHr6mHcvPvI"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"appinvite_service": {
|
||||
"other_platform_oauth_client": []
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"configuration_version": "1"
|
||||
}
|
||||
@ -7,6 +7,8 @@ buildscript {
|
||||
|
||||
dependencies {
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
classpath 'com.google.gms:google-services:4.4.3'
|
||||
classpath 'com.google.firebase:firebase-crashlytics-gradle:3.0.6'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -115,7 +115,7 @@ class Order {
|
||||
final int? taxAmount;
|
||||
final int? discountAmount;
|
||||
final int? totalAmount;
|
||||
final int? totalCost;
|
||||
final double? totalCost;
|
||||
final int? remainingAmount;
|
||||
final String? paymentStatus;
|
||||
final int? refundAmount;
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import 'dart:async';
|
||||
import 'dart:developer';
|
||||
import 'package:enaklo_pos/core/constants/theme.dart';
|
||||
import 'package:enaklo_pos/core/network/dio_client.dart';
|
||||
@ -26,6 +27,8 @@ import 'package:enaklo_pos/presentation/setting/bloc/get_printer_ticket/get_prin
|
||||
import 'package:enaklo_pos/presentation/setting/bloc/upload_file/upload_file_bloc.dart';
|
||||
import 'package:enaklo_pos/presentation/table/blocs/transfer_table/transfer_table_bloc.dart';
|
||||
import 'package:enaklo_pos/presentation/void/bloc/void_order_bloc.dart';
|
||||
import 'package:firebase_core/firebase_core.dart';
|
||||
import 'package:firebase_crashlytics/firebase_crashlytics.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:enaklo_pos/data/datasources/auth_local_datasource.dart';
|
||||
import 'package:enaklo_pos/data/datasources/auth_remote_datasource.dart';
|
||||
@ -84,6 +87,11 @@ import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
void main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
await Firebase.initializeApp();
|
||||
await FirebaseCrashlytics.instance.setCrashlyticsCollectionEnabled(true);
|
||||
|
||||
FlutterError.onError = FirebaseCrashlytics.instance.recordFlutterFatalError;
|
||||
|
||||
await SystemChrome.setPreferredOrientations([
|
||||
DeviceOrientation.landscapeLeft,
|
||||
DeviceOrientation.landscapeRight,
|
||||
@ -92,7 +100,12 @@ void main() async {
|
||||
// final dir = await getApplicationDocumentsDirectory();
|
||||
// Hive.init(dir.path);
|
||||
// Hive.registerAdapter(TableDataAdapter());
|
||||
|
||||
runZonedGuarded(() async {
|
||||
runApp(ProviderScope(child: MyApp()));
|
||||
}, (error, stack) {
|
||||
FirebaseCrashlytics.instance.recordError(error, stack, fatal: true);
|
||||
});
|
||||
}
|
||||
|
||||
class MyApp extends StatefulWidget {
|
||||
|
||||
48
pubspec.lock
48
pubspec.lock
@ -9,6 +9,14 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "76.0.0"
|
||||
_flutterfire_internals:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: _flutterfire_internals
|
||||
sha256: "948f7d74f41dd6f2d563ea9f4c21d7ea764f8e047d2b24138974c19c24d37eb6"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.3.61"
|
||||
_macros:
|
||||
dependency: transitive
|
||||
description: dart
|
||||
@ -454,6 +462,46 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.9.3+3"
|
||||
firebase_core:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: firebase_core
|
||||
sha256: "967dae9a65f69377beb9f4ab292ea63ce5befa1ce24682cab1b69ca4b7a46927"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.1.0"
|
||||
firebase_core_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: firebase_core_platform_interface
|
||||
sha256: "5dbc900677dcbe5873d22ad7fbd64b047750124f1f9b7ebe2a33b9ddccc838eb"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.0.0"
|
||||
firebase_core_web:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: firebase_core_web
|
||||
sha256: f7ee08febc1c4451588ce58ffcf28edaee857e9a196fee88b85deb889990094a
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.1.0"
|
||||
firebase_crashlytics:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: firebase_crashlytics
|
||||
sha256: f2e175a967712ee1f616ab8843390891a315428ba497ce3d256d4c46f32db6f8
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "5.0.1"
|
||||
firebase_crashlytics_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: firebase_crashlytics_platform_interface
|
||||
sha256: b49b90af4a1fd8f30b58abd90af88371969bea51b62838a4f4e737c2098b725e
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.8.12"
|
||||
fixnum:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
||||
@ -67,6 +67,8 @@ dependencies:
|
||||
barcode: ^2.2.9
|
||||
barcode_image: ^2.0.3
|
||||
syncfusion_flutter_datepicker: ^30.2.5
|
||||
firebase_core: ^4.1.0
|
||||
firebase_crashlytics: ^5.0.1
|
||||
# imin_printer: ^0.6.10
|
||||
|
||||
dev_dependencies:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user