Gitignore added
This commit is contained in:
parent
9a3f2f9a9b
commit
b7d847f169
|
|
@ -77,5 +77,5 @@ flutter {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
//implementation files('jars/android-support-v4.jar')
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -9,11 +9,16 @@ import 'package:mobile_portal_23/widgets/reportNew.dart' as reportNew_page;
|
|||
import 'package:mobile_portal_23/widgets/reportDetails.dart' as reportDetails_page;
|
||||
import 'package:mobile_portal_23/report_selectWork.dart' as reportSelectWork_page;
|
||||
import 'package:mobile_portal_23/widgets/reportCreate.dart' as testRepCreate_page;
|
||||
|
||||
|
||||
void main() {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
runApp(const MyApp());
|
||||
|
||||
}
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
|
||||
const MyApp({super.key});
|
||||
|
||||
// This widget is the root of your application.
|
||||
|
|
@ -78,6 +83,7 @@ class MyHomePage extends StatefulWidget {
|
|||
}
|
||||
|
||||
class _MyHomePageState extends State<MyHomePage> {
|
||||
|
||||
int _counter = 0;
|
||||
|
||||
void _incrementCounter() {
|
||||
|
|
@ -90,6 +96,13 @@ class _MyHomePageState extends State<MyHomePage> {
|
|||
_counter++;
|
||||
});
|
||||
}
|
||||
@override
|
||||
void initState(){
|
||||
super.initState();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
|
|
|||
|
|
@ -22,6 +22,11 @@ import 'package:simple_barcode_scanner/simple_barcode_scanner.dart';
|
|||
import 'dart:io';
|
||||
import 'package:qr_flutter/qr_flutter.dart';
|
||||
import 'package:lite_rolling_switch/lite_rolling_switch.dart';
|
||||
//AutoUpdateApk aua = new AutoUpdateApk(getApplicationContext(), UPDATE_URL);
|
||||
|
||||
//import 'package:flutter_local_notifications/flutter_local_notifications.dart';
|
||||
//import 'package:timezone/data/latest_all.dart' as tz;
|
||||
//import 'package:timezone/timezone.dart' as tz;
|
||||
|
||||
class MainPage extends StatefulWidget {
|
||||
const MainPage({Key? key}) : super(key: key);
|
||||
|
|
@ -60,6 +65,7 @@ class _MainPageState extends State<MainPage> with TickerProviderStateMixin{
|
|||
late EmployeeArguments ea;
|
||||
EmployeePageArguments employeePageArgs = EmployeePageArguments();
|
||||
device_info.DeviceInfo di=device_info.DeviceInfo();
|
||||
//late FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin;
|
||||
var deviceData = <String, dynamic>{};
|
||||
|
||||
Future ?apiKey ;
|
||||
|
|
@ -151,6 +157,7 @@ class _MainPageState extends State<MainPage> with TickerProviderStateMixin{
|
|||
return false;
|
||||
//return resp.map<EmployeeLs>((m) => EmployeeLs.fromJson(m)).toList();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose(){
|
||||
NfcManager.instance;
|
||||
|
|
@ -164,6 +171,7 @@ class _MainPageState extends State<MainPage> with TickerProviderStateMixin{
|
|||
]);
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
// TODO: implement initStateA
|
||||
|
|
@ -172,6 +180,21 @@ class _MainPageState extends State<MainPage> with TickerProviderStateMixin{
|
|||
DeviceOrientation.portraitUp,
|
||||
DeviceOrientation.portraitDown,
|
||||
]);
|
||||
//tz.initializeTimeZones();
|
||||
//Initialization Settings for Android
|
||||
/* const AndroidInitializationSettings initializationSettingsAndroid =
|
||||
AndroidInitializationSettings('@mipmap/ic_launcher');
|
||||
//InitializationSettings for initializing settings for both platforms (Android & iOS)
|
||||
|
||||
const InitializationSettings initializationSettings =
|
||||
InitializationSettings(
|
||||
android: initializationSettingsAndroid);
|
||||
flutterLocalNotificationsPlugin =
|
||||
FlutterLocalNotificationsPlugin();
|
||||
flutterLocalNotificationsPlugin.initialize(
|
||||
initializationSettings,
|
||||
);*/
|
||||
|
||||
|
||||
di.initPlatformState().then((value)
|
||||
{
|
||||
|
|
@ -542,6 +565,30 @@ class _MainPageState extends State<MainPage> with TickerProviderStateMixin{
|
|||
});
|
||||
}
|
||||
|
||||
/*Future<void> _showNotification() async {
|
||||
var dateTime = DateTime(DateTime.now().year, DateTime.now().month,
|
||||
DateTime.now().day, 10, 46, 0);
|
||||
const AndroidNotificationDetails androidNotificationDetails =
|
||||
AndroidNotificationDetails('your channel id', 'your channel name',
|
||||
channelDescription: 'your channel description',
|
||||
importance: Importance.max,
|
||||
priority: Priority.high,
|
||||
ticker: 'ticker');
|
||||
const NotificationDetails notificationDetails =
|
||||
NotificationDetails(android: androidNotificationDetails);
|
||||
/*await flutterLocalNotificationsPlugin.show(
|
||||
1234, 'plain title', 'plain body', notificationDetails,
|
||||
payload: 'item x');*/
|
||||
await flutterLocalNotificationsPlugin.zonedSchedule(
|
||||
0,
|
||||
'title',
|
||||
'body',
|
||||
tz.TZDateTime.from(dateTime, tz.local),
|
||||
notificationDetails,
|
||||
uiLocalNotificationDateInterpretation: UILocalNotificationDateInterpretation.absoluteTime,
|
||||
matchDateTimeComponents: DateTimeComponents.time);
|
||||
}*/
|
||||
|
||||
_getAddressFromLatLng(lat,lon) async {
|
||||
try {
|
||||
List<geocoding.Placemark> placemarks = await geocoding.placemarkFromCoordinates(
|
||||
|
|
@ -609,6 +656,7 @@ class _MainPageState extends State<MainPage> with TickerProviderStateMixin{
|
|||
}
|
||||
showQRCode() {
|
||||
var _WorkTimeState=false;
|
||||
// _showNotification();
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
|
|
@ -979,19 +1027,33 @@ class _MainPageState extends State<MainPage> with TickerProviderStateMixin{
|
|||
fontWeight: FontWeight.bold),
|
||||
),
|
||||
]),
|
||||
if (_isScanVisible) ...[
|
||||
if (_isScanVisible && _showNFClogo) ...[
|
||||
Column(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
Text(
|
||||
result,
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 30.0,
|
||||
fontWeight: FontWeight.bold),
|
||||
),
|
||||
_currentAddress,
|
||||
style: const TextStyle(
|
||||
fontSize: 16.0,
|
||||
fontWeight: FontWeight.bold),
|
||||
),
|
||||
Text(
|
||||
result,
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 30.0,
|
||||
fontWeight: FontWeight.bold),
|
||||
),
|
||||
]),
|
||||
|
||||
|
||||
const SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
if (_showNFClogo)
|
||||
nfcLogo()
|
||||
|
||||
],
|
||||
],
|
||||
)
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ dependencies:
|
|||
package_info_plus: ^5.0.1
|
||||
qr_flutter: ^4.1.0
|
||||
lite_rolling_switch: ^1.0.1
|
||||
#flutter_local_notifications: ^17.1.2
|
||||
|
||||
dev_dependencies:
|
||||
flutter_launcher_icons: ^0.13.1
|
||||
|
|
|
|||
Loading…
Reference in New Issue