Giter Club home page Giter Club logo

Comments (6)

Ritik609 avatar Ritik609 commented on May 18, 2024 1

Actually This is a warning. Better you should define a class MyApp and call this class under runApp.
Example:
void main() {
runApp(MyApp());
}

class MyApp extends StatelessWidget {
@OverRide
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
debugShowCheckedModeBanner: false,
theme: ThemeData(
scaffoldBackgroundColor: Color(0xff1f1f1f),
primarySwatch: Colors.blue,
),

I think this may solve this warning.

from flutterexampleapps.

sdoshi983 avatar sdoshi983 commented on May 18, 2024

my code is right but I don't know why it is showing issue.
By the way I use Ubuntu
Error

The solution can be found out here

from flutterexampleapps.

valen-developer avatar valen-developer commented on May 18, 2024

Simply, import MyApp in your widget_test.dart.

from flutterexampleapps.

JaiAravindh-git avatar JaiAravindh-git commented on May 18, 2024

I would like to be assigned to this

from flutterexampleapps.

01mahdivalipoor avatar 01mahdivalipoor commented on May 18, 2024

if you dont test your app, you can delete test folder for now.

from flutterexampleapps.

Harikrishnan001 avatar Harikrishnan001 commented on May 18, 2024

When we create a flutter project, by default flutter create a test folder that contains widget_test.dart. Inside that, the pumpWidget method requires a widget to build our app and trigger a frame. It is not necessary but can be used for widget testing purposes. By default, it takes a widget named MyApp which is the first root widget that flutter creates for you. I assume that you might have removed the boilerplate code, which in turn removed that widget. You can either provide the name of the root widget(the widget given to the runApp method) as an argument to that method or create a widget named MyApp which is the root widget. You can also just ignore the warning or delete the folder widget_test.dart.

from flutterexampleapps.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.