fix(ui): Fix some ui bugs
This commit is contained in:
11
lib/feature/sound_notification_test/notification_bloc.dart
Normal file
11
lib/feature/sound_notification_test/notification_bloc.dart
Normal file
@@ -0,0 +1,11 @@
|
||||
import 'package:sfm_app/product/base/bloc/base_bloc.dart';
|
||||
|
||||
class NotificationBloc extends BlocBase{
|
||||
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
// TODO: implement dispose
|
||||
}
|
||||
|
||||
}
|
||||
40
lib/feature/sound_notification_test/notification_screen.dart
Normal file
40
lib/feature/sound_notification_test/notification_screen.dart
Normal file
@@ -0,0 +1,40 @@
|
||||
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"))
|
||||
],
|
||||
));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user