Skip to content

Commit

Permalink
add the spicy
Browse files Browse the repository at this point in the history
  • Loading branch information
Codel1417 committed May 5, 2024
1 parent 9ff558c commit a96e06b
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import 'dart:async';
import 'dart:io';

import 'package:feedback_sentry/feedback_sentry.dart';
import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:flex_color_scheme/flex_color_scheme.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
Expand Down Expand Up @@ -47,6 +48,14 @@ const String domain = "tail-app";
late final Plausible plausible;
final mainLogger = Logger('Main');

Future<void> initFirebase() async {
final notificationSettings = await FirebaseMessaging.instance.requestPermission(provisional: true);
final apnsToken = await FirebaseMessaging.instance.getAPNSToken();
if (apnsToken != null) {
// APNS token is available, make FCM plugin API requests...
}
}

Future<void> main() async {
Logger.root.level = Level.ALL;
mainLogger.info("Begin");
Expand Down
56 changes: 56 additions & 0 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "67.0.0"
_flutterfire_internals:
dependency: transitive
description:
name: _flutterfire_internals
sha256: "3dee3db3468c5f4640a4e8aa9c1e22561c298976d8c39ed2fdd456a9a3db26e1"
url: "https://pub.dev"
source: hosted
version: "1.3.32"
analyzer:
dependency: transitive
description:
Expand Down Expand Up @@ -425,6 +433,54 @@ packages:
url: "https://pub.dev"
source: hosted
version: "8.0.3"
firebase_core:
dependency: transitive
description:
name: firebase_core
sha256: "4aef2a23d0f3265545807d68fbc2f76a6b994ca3c778d88453b99325abd63284"
url: "https://pub.dev"
source: hosted
version: "2.30.1"
firebase_core_platform_interface:
dependency: transitive
description:
name: firebase_core_platform_interface
sha256: c437ae5d17e6b5cc7981cf6fd458a5db4d12979905f9aafd1fea930428a9fe63
url: "https://pub.dev"
source: hosted
version: "5.0.0"
firebase_core_web:
dependency: transitive
description:
name: firebase_core_web
sha256: "67f2fcc600fc78c2f731c370a3a5e6c87ee862e3a2fba6f951eca6d5dafe5c29"
url: "https://pub.dev"
source: hosted
version: "2.16.0"
firebase_messaging:
dependency: "direct main"
description:
name: firebase_messaging
sha256: "73a43445a7f8c6e6327f0ec3922b1c99a9f4a0e4896197bfe10a88259f775aad"
url: "https://pub.dev"
source: hosted
version: "14.9.1"
firebase_messaging_platform_interface:
dependency: transitive
description:
name: firebase_messaging_platform_interface
sha256: "675527aadccb679c9dfd43a4558690427123ac1e99f03eef5bbce9dc216edc91"
url: "https://pub.dev"
source: hosted
version: "4.5.34"
firebase_messaging_web:
dependency: transitive
description:
name: firebase_messaging_web
sha256: "66deff69307f54fc7a20732b4278af327ae378b86607d5ac877d8f2201fe881e"
url: "https://pub.dev"
source: hosted
version: "3.8.4"
fixnum:
dependency: transitive
description:
Expand Down
3 changes: 3 additions & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ dependencies:
in_app_review: ^2.0.9
upgrader: ^10.3.0

# Spicy
firebase_messaging: ^14.9.1

# Sentry
sentry_flutter: ^7.20.1
sentry_logging: ^7.20.0
Expand Down

0 comments on commit a96e06b

Please sign in to comment.