o_popup 0.1.3
o_popup: ^0.1.3 copied to clipboard
An overlaid content, which closes itself into opening place (on back button) or into the position where the pointer contacted the screen. It means, popup supports tap gesture.
example/lib/main.dart
import 'package:flutter/material.dart';
import 'package:o_popup/o_popup.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'o_popup demo app',
routes: {
'/': (BuildContext context) => MyHomePage(),
},
);
}
}
class MyHomePage extends StatelessWidget {
@override
Widget build(BuildContext context) => Scaffold(
body: Center(
child: OPopupTrigger(
triggerWidget: Text('Click me'),
popupHeader: OPopupContent.standardizedHeader('Click anywhere'),
popupContent: Container(
width: 50.0,
height: 50.0,
color: Colors.blue,
),
),
),
);
}