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 createState() => _NotificationScreenState(); } class _NotificationScreenState extends State { late NotificationBloc notificationBloc; NotificationServices notificationServices = NotificationServices(); @override void initState() { super.initState(); notificationBloc = BlocProvider.of(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")) ], )); } }