title: The name 'File' is defined in the libraries 'dart:html' and 'dart:io'
body: <p>Does anybody know how to solve this error here's my code and the imports the error is in the &quot;File&quot; the error is as follows:</p>
  <blockquote>
  <p>The name 'File' is defined in the libraries 'dart:html' and 'dart:io'.</p>
  </blockquote>
  <pre><code> @override
    State createState() =&gt; ChatScreenState(receiverId: receiverId, receiverAvatar: receiverAvatar);
  }
  
  
  
  
  class ChatScreenState extends State&lt;ChatScreen&gt;
  {
    final String receiverId;
    final String receiverAvatar;
  
    ChatScreenState({
      Key key,
      @required this.receiverId,
      @required this.receiverAvatar,
    });
  
    final TextEditingController textEditingController = TextEditingController();
    final ScrollController listScrollController = ScrollController();
    final FocusNode focusNode = FocusNode();
    bool isDisplaySticker;
    bool isLoading;
  
    File imageFile;
    String imageUrl;
  
    String chatId;
    SharedPreferences preferences;
    String id;
    var listMessage;
  
    @override
    void initState() {
      // TODO: implement initState
      super.initState();
      focusNode.addListener(onFocusChange);
  
      isDisplaySticker = false;
      isLoading = false;
  
      chatId = &quot;&quot;;
  
      readLocal();
    }
  </code></pre>
  <p>I also imported this</p>
  <pre><code>import 'dart:async';
  import 'dart:html';
  import 'dart:io';
  import 'package:file/file.dart';
  import 'package:cached_network_image/cached_network_image.dart';
  import 'package:cloud_firestore/cloud_firestore.dart';
  import 'package:firebase_storage/firebase_storage.dart';
  import 'package:flutter/material.dart';
  import 'package:telegramchatapp/Widgets/FullImageWidget.dart';
  import 'package:telegramchatapp/Widgets/ProgressWidget.dart';
  import 'package:fluttertoast/fluttertoast.dart';
  import 'package:image_picker/image_picker.dart';
  import 'package:intl/intl.dart';
  import 'package:shared_preferences/shared_preferences.dart';
  </code></pre>
  <p><a href="https://i.stack.imgur.com/R2HQN.png" rel="nofollow noreferrer">imports</a>
  <a href="https://i.stack.imgur.com/jVGPk.png" rel="nofollow noreferrer">Main sample of code</a></p>