I’m new to flutter.
I’m trying to copy an existing flutter project for my next project.
I tried following, but I still receive an exception error. What are reason and how could I resolve this?
- Copy an existing project. Select the project folder and copy and paste it to a new location.
- Decide on a new project name. Please rename the copied project folder.
- Open the pubspec.yaml file and change the name property to the new project name.
- Change the package name. Updated the package name (e.g. com.example.newproject) on both Android and iOS.
For Android, edit the package attribute in android/app/src/main/AndroidManifest.xml.
For iOS, edit her PRODUCT_BUNDLE_IDENTIFIER in ios/Runner.xcodeproj/project.pbxproj. - Update dependencies -> found pubspec.yaml file are up to date and updated.
- Clean the project. Run the flutter clean command in terminal to remove old build files.
- Rebuild the project. Run flutter pub get to get the dependencies and rebuild the project.
Error after running debug:
Exception has occurred.
TestFailure (Expected: exactly one matching candidate
Actual: _TextWidgetFinder:<Found 0 widgets with text “0”: []>
Which: means none were found but one was expected
)