I try to install an icon as a custom font but whenever I try to run my app the console tells me that I got an error in the pubspec.yaml file. My font location is: myapp/fonts/icomoon.ttf and this is the relevant part of the pubspec.yaml file:
fonts:
- family: icomoon
fonts:
-asset: fonts/icomoon.ttf
and the error message I got is:
#/properties/flutter/properties/fonts/items/properties/fonts: type: wanted [array] got {-asset: fonts/icomoon.ttf} Error building assets for C:\Users\merli\Documents\Projects\WorkoutApp\myapp\build\app\intermediates\flutter\debug/app.flx
FAILURE: Build failed with an exception.
Where: Script 'C:\Users\merli\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 441
What went wrong: Execution failed for task ':app:flutterBuildDebug'.
Process 'command 'C:\Users\merli\flutter\bin\flutter.bat'' finished with non-zero exit value 1
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Get more help at https://help.gradle.org
BUILD FAILED in 4s Finished with error: Gradle build failed: 1
fonts:node under the top levelflutter:node (and not, for example, underdependencies > flutter) - ccpizza