Why do am I getting this Error???
Isn't the Mediaquery provided by the MaterialApp? I don't quite understand.
class Test extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
theme: themeBuilder(context),
home: Scaffold(
appBar: AppBar(
title: Text('Title'),
),
body: Container(
alignment: Alignment.center,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
'All their equipment and instruments are alive.',
),
Text(
'All their equipment and instruments are alive.',
style: TextStyle(
fontSize: 34,
fontWeight: FontWeight.w700,
),
),
GradientButton(
child: Text('click me!'),
onPressed: () {},
width: MediaQuery.of(context).size.width,
),
TextField()
],
),
),
),
);
}
}
I don't know what is it I am doing wrong here. It worked just fine before.