handle_notification 1.0.0 copy "handle_notification: ^1.0.0" to clipboard
handle_notification: ^1.0.0 copied to clipboard

A new Flutter plugin.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:handle_notification/handle_notification.dart';
import 'package:handle_notification_example/second_screen.dart';

import 'first_screen.dart';

//final RouteObserver<PageRoute<dynamic>> routeObserver =
//    RouteObserver<PageRoute<dynamic>>();

void main() => runApp(MyApp());

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

class _MyAppState extends State<MyApp> {
  @override
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      navigatorObservers: [HandleNotification.routeObserver],
      initialRoute: '/',
      routes: <String, WidgetBuilder>{
        "/": (BuildContext context) => FirstScreen(),
        "/second": (BuildContext context) => SecondScreen()
      },
      //navigatorObservers: [routeObserver],
    );
  }
}
0
likes
30
pub points
0%
popularity

Publisher

unverified uploader

A new Flutter plugin.

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on handle_notification