title: Error: unable to locate asset entry in pubspec.yaml: "fonts/Ranga-Regular.ttf"
body: <p><a href="https://i.stack.imgur.com/XRIPk.png" rel="nofollow noreferrer">enter image description here</a></p>
  <p>I have tried to work but font is not working
  Spaces are correct in a file pubspec.yaml
  I don't know where the error is and why
  There is always an error that makes the font not work
  <a href="https://i.stack.imgur.com/0ZAr2.png" rel="nofollow noreferrer">enter image description here</a></p>
  <p>in file pubspec.yaml</p>
  <pre><code>fonts:
  - family: Ranga
    fonts:
      - asset: asset/fonts/Ranga-Regular.ttf
      - asset: asset/fonts/Ranga-Bold.ttf
        weight: 700
  - family: Arimo
    fonts:
      - asset: asset/fonts/Arimo-Regular.ttf
      - asset: asset/fonts/Arimo-Italic.ttf
        style: italic
      - asset: asset/fonts/Arimo-Bold.ttf
        weight: 700
  </code></pre>
  <p>in file home_screecn.dart
  import 'package:flutter/material.dart';</p>
  <pre><code> class homescreen extends StatelessWidget {
     @override
     Widget build(BuildContext context) {
  // TODO: implement build
  return Center(
      child: Container(
          alignment: Alignment.center,
          color: Colors.cyan,
          child: Text(&quot;Hi amal&quot;,
              textDirection: TextDirection.ltr,
              style: TextStyle(
                  color: Colors.black, fontSize: 70, fontFamily: &quot;Ranga&quot; 
                  )
                  )
                  ));}}
  </code></pre>
  <p>in main.dart</p>
  <pre><code>  import 'package:flutter/material.dart';
     import 'layout/home_screen.dart';
  
    void main() =&gt; runApp(MyApp());
  
     class MyApp extends StatelessWidget {
       // This widget is the root of your application.
       @override
       Widget build(BuildContext context) {
        return homescreen();
  
  
  
  
        }}
  </code></pre>
  <p>Everything works except fonts
  font is not run in emulator</p>
  <p>font section
  <a href="https://i.stack.imgur.com/vIt1F.png" rel="nofollow noreferrer">enter image description here</a></p>