1

having a problem with my BAF widget please help. trying to get the button to my right bottom side. scanffold is used so i dont understand my problem. also am new to flutter please explain with ease :

void main() => runApp(MaterialApp( home: Scaffold( appBar: AppBar( title: Text('my first app'), centerTitle: true, ),//Appbar body: Center( child: Text('Hello maggots'), ),//center FloatingActionButton( child: Text("click"), ),//floating action button ),//scaffold )); //MaterialApp

tried using center but i keep messing up the code help!!

reuslts: lib/main.dart:4:17: Error: Too many positional arguments: 0 allowed, but 1 found. Try removing the extra positional arguments. home: Scaffold( ^ /C:/src/flutter/packages/flutter/lib/src/material/scaffold.dart:1601:9: Context: Found this candidate, but the arguments don't match. const Scaffold({ ^^^^^^^^

2 Answers 2

0

just add onPress to the widget thank you me hahahah

Sign up to request clarification or add additional context in comments.

1 Comment

Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
0

In FloatingActionButton widget you have to just add onPressed: null, property , I know i am late to give answer .

And Follow the documentation https://api.flutter.dev/flutter/material/FloatingActionButton-class.html for further information .

Thank You.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.