1. Customize a Flutter application

Write a Flutter app that can handle an incoming URL.
This example uses the go_router package to handle the routing.
The Flutter team maintains the go_router package.
It provides a simple API to handle complex routing scenarios.

To create a new application, type flutter create <app-name>.

    
 $ flutter create deeplink_cookbook

To include go_router package in your app, add a dependency for
go_router in the pubspec.yaml file.

    
 dependencies:
   flutter:
     sdk: flutter
   go_router: ^6.0.9

To handle the routing, create a GoRouter object in the main.dart file:

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

 void main() => runApp(MaterialApp.router(routerConfig: router));