Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
StoreMonitor
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ramesh Babu Puvvadi
StoreMonitor
Commits
03eaf7ea
Commit
03eaf7ea
authored
Oct 06, 2023
by
Ramesh Babu Puvvadi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
initial commit
parent
fff8be6c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
17 deletions
+20
-17
FirebaseApi.dart
lib/FirebaseApi.dart
+7
-4
FootFall.dart
lib/Screens/FootFall.dart
+1
-2
NotificationReport.dart
lib/Screens/NotificationReport.dart
+10
-10
SplashScreen.dart
lib/Screens/SplashScreen.dart
+2
-1
No files found.
lib/FirebaseApi.dart
View file @
03eaf7ea
import
'package:firebase_core/firebase_core.dart'
;
import
'package:firebase_messaging/firebase_messaging.dart'
;
import
'package:flutter/foundation.dart'
;
class
FirebaseApi
{
final
_firebasemessaging
=
FirebaseMessaging
.
instance
;
...
...
@@ -7,13 +8,15 @@ class FirebaseApi {
Future
<
void
>
initNotifications
()
async
{
await
_firebasemessaging
.
requestPermission
();
final
fcmToken
=
await
_firebasemessaging
.
getToken
();
print
(
fcmToken
);
if
(
kDebugMode
)
{
print
(
fcmToken
);
}
}
Future
<
void
>
handleBackgroundMessage
(
RemoteMessage
message
)
async
{
await
Firebase
.
initializeApp
();
print
(
'Title :
${message.notification?.title}
'
);
print
(
'Title :
${message.notification?.body}
'
);
print
(
'Title :
${message.data}
'
);
//
print('Title :${message.notification?.title}');
//
print('Title :${message.notification?.body}');
//
print('Title :${message.data}');
}
}
lib/Screens/FootFall.dart
View file @
03eaf7ea
...
...
@@ -11,8 +11,7 @@ import 'Constants.dart';
class
FootFall
extends
StatefulWidget
{
final
String
message
;
final
String
selecteddate
;
const
FootFall
(
{
super
.
key
,
required
this
.
message
,
required
this
.
selecteddate
});
const
FootFall
({
super
.
key
,
required
this
.
message
,
required
this
.
selecteddate
});
@override
_FootFall
createState
()
=>
_FootFall
();
...
...
lib/Screens/NotificationReport.dart
View file @
03eaf7ea
...
...
@@ -13,8 +13,8 @@ class NotificationReport extends StatefulWidget {
final
String
message
;
final
String
selecteddate
;
const
NotificationReport
(
{
super
.
key
,
required
this
.
message
,
required
this
.
selecteddate
});
const
NotificationReport
(
{
super
.
key
,
required
this
.
message
,
required
this
.
selecteddate
});
@override
_NotificationReport
createState
()
=>
_NotificationReport
();
}
...
...
@@ -32,14 +32,14 @@ class _NotificationReport extends State<NotificationReport> {
@override
void
initState
()
{
super
.
initState
();
// _selectedDate1 = DateTime.now();
// _dateTime1.text = DateFormat('yyyy/MM/dd').format(_selectedDate1)
;
String
dateString
=
widget
.
selecteddate
;
DateFormat
format
=
DateFormat
(
"yyyy/MM/dd"
);
_selectedDate1
=
format
.
parse
(
dateString
);
_dateTime1
.
text
=
DateFormat
(
'yyyy/MM/dd'
).
format
(
_selectedDate1
)
;
isMeeters
=
widget
.
message
;
loadData
();
if
(
widget
.
selecteddate
!=
''
)
{
String
dateString
=
widget
.
selecteddate
;
DateFormat
format
=
DateFormat
(
"yyyy/MM/dd"
)
;
_selectedDate1
=
format
.
parse
(
dateString
);
_dateTime1
.
text
=
DateFormat
(
'yyyy/MM/dd'
).
format
(
_selectedDate1
);
isMeeters
=
widget
.
message
;
loadData
()
;
}
}
Future
<
void
>
loadData
()
async
{
...
...
lib/Screens/SplashScreen.dart
View file @
03eaf7ea
...
...
@@ -19,10 +19,11 @@ class UserPreferences {
}
class
SplashScreen
extends
StatefulWidget
{
const
SplashScreen
({
Key
?
key
})
:
super
(
key:
key
);
const
SplashScreen
({
Key
?
key
})
:
super
(
key:
key
);
@override
_SplashScreenState
createState
()
=>
_SplashScreenState
();
}
class
_SplashScreenState
extends
State
<
SplashScreen
>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment