Gitignore added
This commit is contained in:
parent
9a3f2f9a9b
commit
b7d847f169
|
|
@ -77,5 +77,5 @@ flutter {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
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/widgets/reportDetails.dart' as reportDetails_page;
|
||||||
import 'package:mobile_portal_23/report_selectWork.dart' as reportSelectWork_page;
|
import 'package:mobile_portal_23/report_selectWork.dart' as reportSelectWork_page;
|
||||||
import 'package:mobile_portal_23/widgets/reportCreate.dart' as testRepCreate_page;
|
import 'package:mobile_portal_23/widgets/reportCreate.dart' as testRepCreate_page;
|
||||||
|
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
|
WidgetsFlutterBinding.ensureInitialized();
|
||||||
runApp(const MyApp());
|
runApp(const MyApp());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class MyApp extends StatelessWidget {
|
class MyApp extends StatelessWidget {
|
||||||
|
|
||||||
const MyApp({super.key});
|
const MyApp({super.key});
|
||||||
|
|
||||||
// This widget is the root of your application.
|
// This widget is the root of your application.
|
||||||
|
|
@ -78,6 +83,7 @@ class MyHomePage extends StatefulWidget {
|
||||||
}
|
}
|
||||||
|
|
||||||
class _MyHomePageState extends State<MyHomePage> {
|
class _MyHomePageState extends State<MyHomePage> {
|
||||||
|
|
||||||
int _counter = 0;
|
int _counter = 0;
|
||||||
|
|
||||||
void _incrementCounter() {
|
void _incrementCounter() {
|
||||||
|
|
@ -90,6 +96,13 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||||
_counter++;
|
_counter++;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@override
|
||||||
|
void initState(){
|
||||||
|
super.initState();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,11 @@ import 'package:simple_barcode_scanner/simple_barcode_scanner.dart';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
import 'package:qr_flutter/qr_flutter.dart';
|
import 'package:qr_flutter/qr_flutter.dart';
|
||||||
import 'package:lite_rolling_switch/lite_rolling_switch.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 {
|
class MainPage extends StatefulWidget {
|
||||||
const MainPage({Key? key}) : super(key: key);
|
const MainPage({Key? key}) : super(key: key);
|
||||||
|
|
@ -60,6 +65,7 @@ class _MainPageState extends State<MainPage> with TickerProviderStateMixin{
|
||||||
late EmployeeArguments ea;
|
late EmployeeArguments ea;
|
||||||
EmployeePageArguments employeePageArgs = EmployeePageArguments();
|
EmployeePageArguments employeePageArgs = EmployeePageArguments();
|
||||||
device_info.DeviceInfo di=device_info.DeviceInfo();
|
device_info.DeviceInfo di=device_info.DeviceInfo();
|
||||||
|
//late FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin;
|
||||||
var deviceData = <String, dynamic>{};
|
var deviceData = <String, dynamic>{};
|
||||||
|
|
||||||
Future ?apiKey ;
|
Future ?apiKey ;
|
||||||
|
|
@ -151,6 +157,7 @@ class _MainPageState extends State<MainPage> with TickerProviderStateMixin{
|
||||||
return false;
|
return false;
|
||||||
//return resp.map<EmployeeLs>((m) => EmployeeLs.fromJson(m)).toList();
|
//return resp.map<EmployeeLs>((m) => EmployeeLs.fromJson(m)).toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose(){
|
void dispose(){
|
||||||
NfcManager.instance;
|
NfcManager.instance;
|
||||||
|
|
@ -164,6 +171,7 @@ class _MainPageState extends State<MainPage> with TickerProviderStateMixin{
|
||||||
]);
|
]);
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
// TODO: implement initStateA
|
// TODO: implement initStateA
|
||||||
|
|
@ -172,6 +180,21 @@ class _MainPageState extends State<MainPage> with TickerProviderStateMixin{
|
||||||
DeviceOrientation.portraitUp,
|
DeviceOrientation.portraitUp,
|
||||||
DeviceOrientation.portraitDown,
|
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)
|
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 {
|
_getAddressFromLatLng(lat,lon) async {
|
||||||
try {
|
try {
|
||||||
List<geocoding.Placemark> placemarks = await geocoding.placemarkFromCoordinates(
|
List<geocoding.Placemark> placemarks = await geocoding.placemarkFromCoordinates(
|
||||||
|
|
@ -609,6 +656,7 @@ class _MainPageState extends State<MainPage> with TickerProviderStateMixin{
|
||||||
}
|
}
|
||||||
showQRCode() {
|
showQRCode() {
|
||||||
var _WorkTimeState=false;
|
var _WorkTimeState=false;
|
||||||
|
// _showNotification();
|
||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
|
|
@ -979,19 +1027,33 @@ class _MainPageState extends State<MainPage> with TickerProviderStateMixin{
|
||||||
fontWeight: FontWeight.bold),
|
fontWeight: FontWeight.bold),
|
||||||
),
|
),
|
||||||
]),
|
]),
|
||||||
if (_isScanVisible) ...[
|
if (_isScanVisible && _showNFClogo) ...[
|
||||||
|
Column(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.center,
|
||||||
|
children: <Widget>[
|
||||||
Text(
|
Text(
|
||||||
result,
|
_currentAddress,
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
color: Colors.white,
|
fontSize: 16.0,
|
||||||
fontSize: 30.0,
|
fontWeight: FontWeight.bold),
|
||||||
fontWeight: FontWeight.bold),
|
),
|
||||||
),
|
Text(
|
||||||
|
result,
|
||||||
|
style: const TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 30.0,
|
||||||
|
fontWeight: FontWeight.bold),
|
||||||
|
),
|
||||||
|
]),
|
||||||
|
|
||||||
|
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
height: 20,
|
height: 20,
|
||||||
),
|
),
|
||||||
if (_showNFClogo)
|
if (_showNFClogo)
|
||||||
nfcLogo()
|
nfcLogo()
|
||||||
|
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,7 @@ dependencies:
|
||||||
package_info_plus: ^5.0.1
|
package_info_plus: ^5.0.1
|
||||||
qr_flutter: ^4.1.0
|
qr_flutter: ^4.1.0
|
||||||
lite_rolling_switch: ^1.0.1
|
lite_rolling_switch: ^1.0.1
|
||||||
|
#flutter_local_notifications: ^17.1.2
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_launcher_icons: ^0.13.1
|
flutter_launcher_icons: ^0.13.1
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue