Indroduction
In this article I'll share with you how to fix'AssetManifest' is imported from both 'package:flutter/src/services/asset_manifest.dart' and 'package:google_fonts/src/asset_manifest.dart'.
When you run your flutter app you might notice this error in your debug console.
Launching lib/main.dart on SM A225M in debug mode...
main.dart:1
Warning: Errors limit exceeded. To receive all errors set com.sun.xml.bind logger to FINEST level.
Warning: unexpected element (uri:"", local:"extension-level"). Expected elements are <{}codename>,<{}layoutlib>,<{}api-level>
: Error: 'AssetManifest' is imported from both 'package:flutter/src/services/asset_manifest.dart' and 'package:google_fonts/src/asset_manifest.dart'.
google_fonts_base.dart:14
import 'asset_manifest.dart';
^^^^^^^^^^^^^
Solution
Fortunately this is a simple fix, update your google_fonts:
package in pubspec.yaml
to the latest version
Run your flutter app and your code should be fine.
Connect with me
Thank you for reading my post. Feel free to like, comment, subscribe or connect with me on LinkedIn and Twitter. You can also buy me a book to show your support.
Top comments (0)