Flutter Navigator not working

前端 未结 6 1094
死守一世寂寞
死守一世寂寞 2020-12-09 11:04

I have app with two screens, and I want to make push from 1st to second screen by pressing button.

Screen 1

import \'package:flutter/m         


        
6条回答
  •  死守一世寂寞
    2020-12-09 12:07

    Am a newbie and have spent two days trying to get over the Navigtor objet linking to a black a screen.

    The issue causing this was dublicated dummy data. Find Bellow the two dummny data blocks:

    **Problematic data **- duplicate assets/image:
    
    _buildFoodItem('assets/plate1.png', 'Salmon bowl', '\$24'),
    _buildFoodItem('assets/plate2.png', 'Spring bowl', '\$13'),
    _buildFoodItem('assets/plate1.png', 'Salmon bowl', '\$24'),
    _buildFoodItem('assets/plate5.png', 'Berry bowl', '\$34'),
    
    **Solution **- after eliminating duplicated image argument:
    _buildFoodItem('assets/plate1.png', 'Salmon bowl', '\$24'),
    _buildFoodItem('assets/plate2.png', 'Spring bowl', '\$13'),
    _buildFoodItem('assets/plate6.png', 'Avocado bowl', '\$34'),
    

    I hope this helps someone,,,,,,,

提交回复
热议问题