Comments (6)
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.
my code is right but I don't know why it is showing issue.
By the way I use Ubuntu
The solution can be found out here
from flutterexampleapps.
Simply, import MyApp in your widget_test.dart.
from flutterexampleapps.
I would like to be assigned to this
from flutterexampleapps.
if you dont test your app, you can delete test folder for now.
from flutterexampleapps.
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)
- Flutter app clone
- Contribute a spotify clone to the community
- Geen geld HOT 1
- Flutter example apps HOT 1
- Please add Examples of flutter WebApps. HOT 3
- Flutter example
- Flutter
- Instagram token HOT 1
- Flutter ex HOT 1
- FlutterApp HOT 1
- How to create a centre method in flutter? HOT 6
- Flutter Examples apps
- urgent help for sound wave recorder to forward and backward functionality HOT 2
- Exp
- Flutter Tutorial HOT 4
- Update for flutter 3.13?? HOT 1
- Flutter
- Примеры приложений
- To do HOT 1
- [email protected] This is not accessible and after trying nothing happens although I add my payment card HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutterexampleapps.