bubble_popup_window 0.0.1
bubble_popup_window: ^0.0.1 copied to clipboard
A Flutter Bubble popup library, providing floating popup components with arrow indicators.
import 'package:flutter/material.dart';
import 'package:example/pages/basic_example.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Bubble PopupWindow Demo',
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
useMaterial3: true,
),
home: const MyHomePage(title: 'Bubble PopupWindow Demo'),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({super.key, required this.title});
final String title;
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Theme.of(context).colorScheme.inversePrimary,
title: Text(widget.title),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
const SizedBox(
height: 20,
),
ElevatedButton(
onPressed: () {
Navigator.push(context, MaterialPageRoute(
builder: (BuildContext context) {
return const BasicExample();
},
));
},
child: const Text("Basic Example"),
),
],
),
), // This trailing comma makes auto-formatting nicer for build methods.
);
}
}