push_notification_pedro_duarte 0.0.9 copy "push_notification_pedro_duarte: ^0.0.9" to clipboard
push_notification_pedro_duarte: ^0.0.9 copied to clipboard

PlatformAndroid

Lançar Notificações e redirecionar

example/lib/main.dart

import 'package:flutter/material.dart';
import 'dart:async';

import 'package:flutter/services.dart';
import 'package:push_notification_pedro_duarte/push_notification_pedro_duarte.dart';

void main() {
  runApp( MyApp());
}

class MyApp extends StatefulWidget {
  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {



initPlatformState() async {
    try {

     // await PushNotificationPedroDuarte.notification_push("Titulo","Descricao");
await PushNotificationPedroDuarte.notification_push_event();
    } on Exception {
    print("Algo deu erro não estava previsto !");
    }

  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: ElevatedButton(
            onPressed: ()async{
   await initPlatformState();
    },
    child: Text("Ola")

          ),
        ),
      ),
    );
  }
}
0
likes
120
points
4
downloads

Publisher

unverified uploader

Weekly Downloads

Lançar Notificações e redirecionar

Repository (GitHub)
View/report issues

Documentation

API reference

License

unknown (license)

Dependencies

flutter

More

Packages that depend on push_notification_pedro_duarte

Packages that implement push_notification_pedro_duarte