Home > Enterprise >  why am i not able to use this( RaisedButton) keyword?
why am i not able to use this( RaisedButton) keyword?

Time:11-18

enter image description hereim not able to use this keyword

i was expecting to use this keywordim not able to use this keyword

i was expecting to use this keywordim not able to use this keyword

i was expecting to use this keywordim not able to use this keyword

i was expecting to use this keywordim not able to use this keyword

i was expecting to use this keywordim not able to use this keyword

i was expecting to use this keywordim not able to use this keyword

i was expecting to use this keywordim not able to use this keyword

i was expecting to use this keywordim not able to use this keyword

i was expecting to use this keywordim not able to use this keyword

i was expecting to use this keywordim not able to use this keyword

i was expecting to use this keyword

CodePudding user response:

Its replaced by ElevatedButton. New Buttons and Button Themes

CodePudding user response:

the RaisedButton is deprecated, it's replaced by ElevatedButton:

replace:

RaisedButton(/*...*/),

with:

ElevatedButton(/*...*/),

check all new migrations here:

https://docs.flutter.dev/release/breaking-changes/buttons#context

CodePudding user response:

RaisedButton is deprecated. Replace it with ElevatedButton

return MaterialApp(
      home: Scaffold(
          body: Column(
            children: <Widget>[
              Text('question'),
              ElevatedButton(
                child: Text('answer1'),
                onPressed: null,
              ),
            ],
          ),
      ),
    );
  • Related