Home > Blockchain >  I have given proper indentation in pubspec with right image path and without any spelling mistakes s
I have given proper indentation in pubspec with right image path and without any spelling mistakes s

Time:05-09

PUBSPEC.YAML file

flutter:
  uses-material-design: true
  assets:
    - assets/images/
    - assets/fonts/
Container(
                                  height: 45,
                                  padding: EdgeInsets.all(6),
                                  decoration: BoxDecoration(
                                    color: Colors.green[300],
                                    borderRadius: BorderRadius.circular(10),
                                  ),
                                  child: Image.asset(
                                    'images/rupee.jpg',
                                    color: Colors.white,
                                  )),
                              Text(
                                'Online Payments',
                                style: TextStyle(
                                    fontSize: 17, fontWeight: FontWeight.w500),
                              )
                            ],
                          ),
                        ),
                      ),

CodePudding user response:

"assets/" is missing, you need to use asset image like below:

Image.asset(
  'assets/images/rupee.jpg',
  color: Colors.white,
))

  • Related