41 lines
1.1 KiB
Dart
41 lines
1.1 KiB
Dart
import 'dart:developer';
|
|
|
|
import 'package:flutter/material.dart';
|
|
import 'notification_bloc.dart';
|
|
import '../../product/base/bloc/base_bloc.dart';
|
|
import '../../product/services/notification_services.dart';
|
|
|
|
class NotificationScreen extends StatefulWidget {
|
|
const NotificationScreen({super.key});
|
|
|
|
@override
|
|
State<NotificationScreen> createState() => _NotificationScreenState();
|
|
}
|
|
|
|
class _NotificationScreenState extends State<NotificationScreen> {
|
|
late NotificationBloc notificationBloc;
|
|
NotificationServices notificationServices = NotificationServices();
|
|
|
|
@override
|
|
void initState() {
|
|
super.initState();
|
|
notificationBloc = BlocProvider.of<NotificationBloc>(context);
|
|
}
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
body: Column(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
children: [
|
|
TextButton(
|
|
onPressed: () {
|
|
log("Token: ${notificationServices.getDeviceToken()}");
|
|
},
|
|
child: Text("Get Notification Token"))
|
|
],
|
|
));
|
|
}
|
|
}
|