Reputation: 11
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({ ^^^^^^^^
Upvotes: 1
Views: 38
Reputation: 15
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.
Upvotes: 0