Fixes due to flutter updates
This commit is contained in:
parent
76a625c8c7
commit
5292a03d97
|
@ -10,7 +10,7 @@ import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:fluro/fluro.dart';
|
import 'package:fluro/fluro.dart';
|
||||||
import '../home/home_component.dart';
|
import '../home/home_component.dart';
|
||||||
import 'package:router_example/config/routes.dart';
|
import '../../config/routes.dart';
|
||||||
|
|
||||||
class AppComponent extends StatefulWidget {
|
class AppComponent extends StatefulWidget {
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,7 @@ class Router {
|
||||||
///
|
///
|
||||||
Route<Null> _notFoundRoute(BuildContext context, String path) {
|
Route<Null> _notFoundRoute(BuildContext context, String path) {
|
||||||
RouteCreator creator = (RouteSettings routeSettings, Map<String, dynamic> parameters) {
|
RouteCreator creator = (RouteSettings routeSettings, Map<String, dynamic> parameters) {
|
||||||
return new MaterialPageRoute<dynamic>(settings: routeSettings, builder: (BuildContext context) {
|
return new MaterialPageRoute<Null>(settings: routeSettings, builder: (BuildContext context) {
|
||||||
return notFoundHandler.handlerFunc(context, parameters);
|
return notFoundHandler.handlerFunc(context, parameters);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -102,7 +102,7 @@ class Router {
|
||||||
} else {
|
} else {
|
||||||
routeTransitionsBuilder = _standardTransitionsBuilder(transitionType);
|
routeTransitionsBuilder = _standardTransitionsBuilder(transitionType);
|
||||||
}
|
}
|
||||||
return new PageRouteBuilder<dynamic>(settings: routeSettings,
|
return new PageRouteBuilder<Null>(settings: routeSettings,
|
||||||
pageBuilder: (BuildContext context, Animation<double> animation, Animation<double> secondaryAnimation) {
|
pageBuilder: (BuildContext context, Animation<double> animation, Animation<double> secondaryAnimation) {
|
||||||
return handler.handlerFunc(context, parameters);
|
return handler.handlerFunc(context, parameters);
|
||||||
},
|
},
|
||||||
|
@ -128,7 +128,7 @@ class Router {
|
||||||
Offset startOffset = bottomLeft;
|
Offset startOffset = bottomLeft;
|
||||||
Offset endOffset = topLeft;
|
Offset endOffset = topLeft;
|
||||||
if (transitionType == TransitionType.inFromLeft) {
|
if (transitionType == TransitionType.inFromLeft) {
|
||||||
startOffset = new FractionalOffset(-1.0, 0.0);
|
startOffset = new Offset(-1.0, 0.0);
|
||||||
endOffset = topLeft;
|
endOffset = topLeft;
|
||||||
} else if (transitionType == TransitionType.inFromRight) {
|
} else if (transitionType == TransitionType.inFromRight) {
|
||||||
startOffset = topRight;
|
startOffset = topRight;
|
||||||
|
|
Loading…
Reference in New Issue