Add animations and details page screen
This commit is contained in:
+14
-1
@@ -1,5 +1,7 @@
|
||||
import 'package:como_gasto/add_page_transition.dart';
|
||||
import 'package:como_gasto/login_state.dart';
|
||||
import 'package:como_gasto/pages/add_page.dart';
|
||||
import 'package:como_gasto/pages/details_page.dart';
|
||||
import 'package:como_gasto/pages/home_page.dart';
|
||||
import 'package:como_gasto/pages/login_page.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@@ -17,6 +19,18 @@ class MyApp extends StatelessWidget {
|
||||
theme: ThemeData(
|
||||
primarySwatch: Colors.blue,
|
||||
),
|
||||
onGenerateRoute: (settings) {
|
||||
if (settings.name == '/details') {
|
||||
DetailsParams params = settings.arguments;
|
||||
return MaterialPageRoute(
|
||||
builder: (BuildContext context) {
|
||||
return DetailsPage(
|
||||
params: params ,
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
},
|
||||
routes: {
|
||||
'/': (BuildContext context) {
|
||||
var state = Provider.of<LoginState>(context);
|
||||
@@ -26,7 +40,6 @@ class MyApp extends StatelessWidget {
|
||||
return LoginPage();
|
||||
}
|
||||
},
|
||||
'/add': (BuildContext contex) => AddPage(),
|
||||
},
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user