xxxxxxxxxx
i solved this issue by adding Scaffold to my Screen i want to Navigator to it
xxxxxxxxxx
import 'package:flutter/material.dart';
void main() {
runApp(MaterialApp(
home: Scaffold(
appBar: AppBar(
title: Text('Material Widget Demo'),
),
body: Center(
child: Material(
child: Container(
width: 200,
height: 200,
color: Colors.blue,
child: Center(
child: Text(
'Hello, Material!',
style: TextStyle(fontSize: 20, color: Colors.white),
),
),
),
),
),
),
));
}
xxxxxxxxxx
@override
Widget build(BuildContext context) {
return new Scaffold(
body: new Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
new TextField(
controller: _controller,
decoration: new InputDecoration(
hintText: 'Type something',
),
),
new RaisedButton(
onPressed: () {
showDialog(
context: context,
child: new AlertDialog(
title: new Text('What you typed'),
content: new Text(_controller.text),
),
);
},
child: new Text('DONE'),
),
],
),
);
}