mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-11-29 23:20:03 +03:00
f944c9cf86
Also moved the class to lib/widgets/
23 lines
644 B
Dart
Executable File
23 lines
644 B
Dart
Executable File
import 'package:flutter/material.dart';
|
|
|
|
class DialogFrame extends StatelessWidget {
|
|
final Widget child;
|
|
const DialogFrame({Key? key, required this.child}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) => GestureDetector(
|
|
onTap: () {
|
|
Navigator.of(context).pop();
|
|
},
|
|
// Shows Snackbars above modal
|
|
child: Scaffold(
|
|
backgroundColor: Colors.transparent,
|
|
body: GestureDetector(
|
|
behavior: HitTestBehavior.deferToChild,
|
|
onTap: () {}, // Block onTap of parent gesture detector
|
|
child: child,
|
|
),
|
|
),
|
|
);
|
|
}
|