knock_flutter 0.1.3 copy "knock_flutter: ^0.1.3" to clipboard
knock_flutter: ^0.1.3 copied to clipboard

A client-side Flutter library to interact with user-facing Knock features, such as feeds.

Knock Flutter client library #

A client-side Flutter library to interact with user-facing Knock features, such as feeds.

Note: this is a lower level library designed for building UI on top of

Documentation #

See the documentation for usage examples.

iOS #

To receive push notifications via APNS (Apple Push Notification Service) you will need to enable the push notification capability in your application. You can find instructions on how to do this at https://developer.apple.com/documentation/usernotifications/registering_your_app_with_apns.

Example App

To test APNS integration in the example app, you will need to open example/ios in Xcode and select your Development Team and choose Bundle Identifier unique to you.

Android #

To receive push notifications via FCM (Firebase Cloud Messaging) you will need to add Firebase and related dependencies to your application. You can find instructions on how to do this at: https://firebase.google.com/docs/android/setup.

Note: If you've added Firebase to your Flutter app (https://firebase.google.com/docs/flutter/setup?platform=android), you should only need to add a dependency on firebase_messaging (https://firebase.google.com/docs/cloud-messaging/flutter/client).

  1. In your project's android/build.gradle add:
buildscript {
    dependencies {
        ...
        classpath "com.google.gms:google-services:4.3.15"
        ...
    }
}
  1. In your project's android/app/build.gradle add:
plugins {
    ...
    id "com.google.gms.google-services"
    ...
}

dependencies {
    ...
    implementation(platform("com.google.firebase:firebase-bom:YOUR_VERSION"))
    implementation("com.google.firebase:firebase-messaging")
    ...
}
  1. Add google-services.json provided by your Firebase project to app/google-services.json.

Example App

To test FCM integration in the example app, you will need to create a Firebase project and add an appropriate google-services.json file to example/app/google-services.json.

Package Development #

Code generation #

Code generation is limited to supporting JSON serialization/deserization of API messages. If you need to adust the generated code you will want to run this command from the top level directory.

dart run build_runner build --delete-conflicting-outputs

If you need to update the generated platform channel messages you will want to run this command from the top level directory.

flutter pub run pigeon --input pigeons/messages.dart

Note: Generated files are checked into version control because they are part of the released packaged.

1
likes
0
pub points
57%
popularity

Publisher

verified publisherknock.app

A client-side Flutter library to interact with user-facing Knock features, such as feeds.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, freezed_annotation, http, json_annotation, phoenix_socket

More

Packages that depend on knock_flutter