Errors I encountered as a Flutter beginner

Image for post
Image for post
Image source: thedroidsonroids

Introduction

Error 1: flutter command not found

Error 2: Compiler cannot run without a compiler context

Internal problem: Compiler cannot run without a compiler context.Tip: Are calls to the compiler wrapped in CompilerContext.runInContext?#0      CompilerContext.current(package:front_end/src/fasta/compiler_context.dart:111:7)#1      internalProblem (package:front_end/src/fasta/problems.dart:45:25)#2      StackListener.checkEmpty(package:front_end/src/fasta/source/stack_listener.dart:184:7)<asynchronous suspension>
.
.
.
(dart:isolate/runtime/libisolate_patch.dart:172:5)Application finished.
import './home_page.dart';; //right here, double semicolon!!

Error 3: No Directionality widget found.

import 'package:flutter/material.dart';void main() => runApp(MyApp());class MyApp extends StatelessWidget {  @override
Widget build(BuildContext context) {
return Container(
child: Center(child: Text('my first app'))
);
}
}
flutter: ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
flutter: The following assertion was thrown building Text("my first app", dependencies: [DefaultTextStyle]):
flutter: No Directionality widget found.
flutter: RichText widgets require a Directionality widget ancestor.
flutter: The specific widget that could not find a Directionality ancestor was:
flutter: RichText(softWrap: wrapping at box width, maxLines: unlimited, text: "my first app")
Text('my first app', textDirection: TextDirection.ltr)

Tech enthusiast, Development Specialist @teammediaocean. Creator of https://explore-a11y.netlify.app/ My motto — ‘Choose RIGHT over easy, always!’

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store