blob: abfee7a53909e964e7f44e67ec91b533b9af45d9 [file] [log] [blame]
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:sky/widgets/basic.dart';
import 'package:sky/widgets/widget.dart';
class ModalOverlay extends Component {
ModalOverlay({ Key key, this.children, this.onDismiss }) : super(key: key);
final List<Widget> children;
final Function onDismiss;
Widget build() {
return new Listener(
onGestureTap: (_) {
if (onDismiss != null)
onDismiss();
},
child: new Stack(children)
);
}
}