Expected ; error driving me crazy

I have 2 problems
The first in my code is the return on MaterialApp says its expecting a ‘;’ but for the life of me cant understand where it wants it . I even tried adding it to every line one at a time with no result it is driving me crazy. I am very new to programming all together and am trying to learn but I just cannot see what I am missing here.

Secondly I was trying to print all the items in the variable features to the body and always ending up with a void error. can someone please explain what I am doing wrong and what I should be doing.

for the body I tried using the Text widget and the Print widget to no avail.

import ‘package:flutter/material.dart’;

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

class FeatureApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
var features = [
‘Feature 1’,
‘Feature 2’,
‘Feature 3’,
‘Feature 4’,
‘Feature 5’,
‘Feature 6’,
‘Feature 7’,
‘Feature 8’,
‘Feature 9’,
],
return MaterialApp(
home: Scaffold(
appBar: AppBar(
leading: Padding(
padding: const EdgeInsets.all(8.0),
child: Image.asset(
“assets/images/appicon.png”,
),
),
title: Text(
‘My Feature App’,
style: TextStyle(fontSize: 20),
),
backgroundColor: Colors.redAccent[700],
),
body: Column(
children: [
WANT FEATURES TO BE LISTED HERE
],)
),
);

}
}

Hello and welcome.

This:

var features = [
‘Feature 1’,
‘Feature 2’,
‘Feature 3’,
‘Feature 4’,
‘Feature 5’,
‘Feature 6’,
‘Feature 7’,
‘Feature 8’,
‘Feature 9’,
],

is ending with a colon, but should end with a semicolon;
I guess this is producing the Expected ; Error.

Then I think you’d need to give the Column.children property a list of widgets to properly render them in the column itself, i.e.

   var features = <Widget>[
     Text('Feature 1'),
     Text('Feature 2'),
   ];

   ..

   body: Column(
     children: features,
   ),
   
   ..

I’d also like to suggest you this pretty good and free(!) course on Flutter development:

Hth.

1 Like

Wow ty so much that all worked. I guess I still got alot to learn so the recommended class is a blessing ty… I would have never assumed the trouble as happening on a line of code before the actual issue in that case but its good to see someone knows wwhat they are doing ty very much.

1 Like

Glad to know it helped! I just had so many hours of frustration with similar issues in the past, so I can feel your; try to really read the code when it seems ok but it is not, not just stare at it :wink: But again, it’s just a matter of failing enough times to learn by your mistakes, so don’t be afraid of making them. Just have fun with it! Enjoy your learning -alot- !

alot