prompt_dialog 0.1.0 prompt_dialog: ^0.1.0 copied to clipboard
Prompt Dialog Widget JS-LIKE for Flutter. Use prompt dialog easy and simple for your flutter app.
import 'package:flutter/material.dart';
import 'package:prompt_dialog/prompt_dialog.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Welcome to Flutter',
home: Scaffold(
appBar: AppBar(
title: Text('Welcome to Flutter'),
),
body: Center(
child: FlatButton(
child: Text('Prompt Dialog'),
onPressed: () async {
return print(await prompt(context));
},
),
),
),
);
}
}