An example application that starts to throw exceptions.

import

'package:flutter/material.dart'

void

main

()

runApp

MaterialApp

builder:

BuildContext

context

Widget

child

// Builds two parallel navigators. This throws

// error because both of navigators are under the same

// hero controller scope created by MaterialApp.

return

Stack

children:

Widget

>[

Navigator

onGenerateRoute:

RouteSettings

settings

return

MaterialPageRoute

void

>(

settings:

settings

builder: