Make custom transition transparent so we dont need a 'background'

This reduces the animation overhead and cleanup the code.
This commit is contained in:
Ricardo Markiewicz
2019-07-02 10:02:37 -03:00
parent a9453903e8
commit 8ab8692bbb
4 changed files with 19 additions and 26 deletions
+12 -8
View File
@@ -22,12 +22,18 @@ class MyApp extends StatelessWidget {
onGenerateRoute: (settings) {
if (settings.name == '/details') {
DetailsParams params = settings.arguments;
return MaterialPageRoute(
builder: (BuildContext context) {
return DetailsPage(
params: params ,
);
}
return MaterialPageRoute(builder: (BuildContext context) {
return DetailsPage(
params: params,
);
});
} else if (settings.name == '/add') {
Rect buttonRect = settings.arguments;
return AddPageTransition(
page: AddPage(
buttonRect: buttonRect,
),
);
}
},
@@ -45,5 +51,3 @@ class MyApp extends StatelessWidget {
);
}
}