blob: 1669b49f509e4800389d0d49f1a1632d6fc8918a [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/framework.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)
);
}
}