image

I wrote it myself because statefulwidget didn't automatically create the pattern and out of 7 different errors I just couldn't fix this

import 'package:flutter/material.dart';

class NaberMain extends StatefulWidget {
  NaberMain({Key key}) : super(key: key)

  // ignore: empty_constructor_bodies
  @override 
  _NaberMainState createState() => _NaberMainState();
}

class _NaberMainState extends State<NaberMain> {
  @override
  Widget build(BuildContext context) {
    return Container(
    );
  }
}


Solution 1: Josteve

You have a missing semi-colon after super(key: key). Add the semi-colon.

class NaberMain extends StatefulWidget {
  NaberMain({Key key}) : super(key: key); //This is the semi-colon.

  @override 
  _NaberMainState createState() => _NaberMainState();
}

class _NaberMainState extends State<NaberMain> {
  @override
  Widget build(BuildContext context) {
    return Container(
    );
  }
}


Solution 2: Samet ÖZTOPRAK

Check it, please! maybe you forget the semocolon ";" before the error.