Search code examples
flutterdartflutter-packages

Need help to resolve this issue while running flutter code


This is the error I'm facing while running flutter programs:

lib/main.dart: Warning: Interpreting this as package URI, 'package:flutter_guide_1/main.dart'.

My code:

import 'package:flutter/material.dart';

void mian() {}

class MyApp extends StatelessWidget {
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Text('Hello!'),
    );
  }
}

Solution

  • you need to return runApp

       void main() => runApp(MyApp());