我无法在颤振中导航 Ti 在颤振中始终显示为黑屏

时间:2021-01-17 02:57:48

标签: flutter dart

我尝试使用此手势检测器导航到新页面,但每次单击它时,它根本不起作用 这是手势检测器的代码:

             onTap: (){
               Navigator.push(context, MaterialPageRoute(builder: (context)=> ResultsPage()));
             },
             child: Container(
               child: Center(
                 child: Text(
                   'CALCULATE YOUR BMI',
                   style: TextStyle(
                     fontSize: 20.0,
                   ),
                 ),
               ),
               color: Color(0xFFEB1555),
               width: double.infinity,
               height: 45.0,
               margin: EdgeInsets.only(top: 7.0),
         ),
           ),```



and this is the new page that I want to navigate to:

```    import 'package:flutter/material.dart';
      class ResultsPage extends StatelessWidget and the result of the code that I'm sure 100% that it is working

and for some reason that is what I can see everytime I try to navigate:  

[the page that I want to navigate to][1]


[1]: https://i.stack.imgur.com/hezEm.jpg

0 个答案:

没有答案