import 'package:flutter/material.dart';
import 'package:piring_baru/notification/notification2.dart';

class tesnotif extends StatefulWidget {
  @override
  State<tesnotif> createState() => _tesnotifState();
}

class _tesnotifState extends State<tesnotif> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text('Contoh Notifikasi'),
        ),
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              ElevatedButton(
                onPressed: () async {
                  await NotificationController.sendSimpleNotification();
                },
                child: Text('Kirim Notifikasi Sederhana'),
              ),
              ElevatedButton(
                onPressed: () async {
                  await NotificationController.scheduleNotification();
                },
                child: Text('Jadwalkan Notifikasi'),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
