Commit 3419b3e4 authored by Adam Barth's avatar Adam Barth

Merge pull request #764 from abarth/material_page_completer

Add a completer to MaterialPageRoute
parents ac96f74d 5ea4990c
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
import 'dart:async';
import 'package:flutter/animation.dart'; import 'package:flutter/animation.dart';
import 'package:flutter/widgets.dart'; import 'package:flutter/widgets.dart';
...@@ -41,8 +43,9 @@ const Duration kMaterialPageRouteTransitionDuration = const Duration(millisecond ...@@ -41,8 +43,9 @@ const Duration kMaterialPageRouteTransitionDuration = const Duration(millisecond
class MaterialPageRoute<T> extends PageRoute<T> { class MaterialPageRoute<T> extends PageRoute<T> {
MaterialPageRoute({ MaterialPageRoute({
this.builder, this.builder,
Completer<T> completer,
NamedRouteSettings settings: const NamedRouteSettings() NamedRouteSettings settings: const NamedRouteSettings()
}) : super(settings: settings) { }) : super(completer: completer, settings: settings) {
assert(builder != null); assert(builder != null);
assert(opaque); assert(opaque);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment