- Add this to your package's pubspec.yaml file:
dependencies:
flutter_push_link: ^0.0.1
and
- Download dependencies
flutter pub get
and
- Create or Edit file .env api Key
PUSH_LINK_API_KEY=your-api-key
cd ./example && flutter run -d 'DeviceName or Id' -t lib/main.dart
flutter pub run flutter_push_link:prepare
- Required .env [PUSH_LINK_API_KEY=your-api-key] in project root
flutter pub run flutter_push_link:publish.apk
- Required .env [PUSH_LINK_API_KEY=your-api-key] in project root
flutter pub run flutter_push_link:download.apk
Example Project Flutter - PushLink
import 'package:flutter_push_link/flutter_push_link.dart';
...
String deviceId = await FlutterPushLink.deviceId().catchError(onError);
bool started = await FlutterPushLink.startPushLink(DotEnv.env['PUSH_LINK_API_KEY'], deviceId).catchError(onError);
Open file Application: main.dart
- Use
adb logcat | grep PUSHLINK
to check what's going on. If you can't solve the problem by yourself, please contact the support.
Always feel free to drop a line to support at pushlink dot com or visit our support.
Users are always welcome to contribute with issues and pull requests