Parameter format not correct in Flutter

Viewed 1463

I am using VS Code with Flutter SDK 1.2.0. While running my code I get an error saying parameter format not correct.

This is the error:

Launching lib\main.dart on Android SDK built for x86 in debug mode...
Parameter format not correct -
āœ“ Built build\app\outputs\flutter-apk\app-debug.apk.
Installing build\app\outputs\flutter-apk\app.apk...
D/EGL_emulation(11891): eglMakeCurrent: 0xe7c19420: ver 2 0 (tinfo 0xe7ca7180)

Currently it's not giving me any problems during execution, but I've seen examples where this error can cause gradle to fail and a few other fails. So I'd like to fix it now so to avoid any problems in future.

This is my code if anyone needs. It's just a basic homepage.

import 'package:flutter/material.dart';

main(List<String> args) {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        home: Scaffold(
      appBar: AppBar(
        title: Text("OCR"),
      ),
      body: Column(
        children: [
          Text('Question'),
          RaisedButton(
            child: Text('Option A'),
            onPressed: () {},
          ),
          RaisedButton(
            child: Text('Option B'),
            onPressed: () {},
          ),
          RaisedButton(
            child: Text('Option C'),
            onPressed: () {},
          ),
        ],
      ),
    ));
  }
}
1 Answers

Remove List<String> args in main() function

Related