flutter 감청 시스템 반환 버튼

6459 단어 flutter
 WillPopScope , onWillPop ,
Future<bool> _onWillPop()=>new Future.value(false);  dialog, , ,
 , pop dialog 。
class _DialogComponent extends StatelessWidget {

  @override
  Widget build(BuildContext context) {
    Future<bool> _onWillPop()=>new Future.value(false);
    return WillPopScope(
      onWillPop:_onWillPop,
      child: Dialog(
        child: new Container(
            height: 64.0,
            alignment: Alignment.center,
            child: Row(
              mainAxisAlignment: MainAxisAlignment.center,
              children: <Widget>[
                new Text(
                  " ",
                  style: TextStyle(fontSize: 15.0, color: Colors.black),
                ),
                new Container(
                  width: 10.0,
                  height: 1.0,
                ),
                new CircularProgressIndicator(),
              ],
            )),
      ),
    );
  }
}

좋은 웹페이지 즐겨찾기