a_dialog 1.0.1 copy "a_dialog: ^1.0.1" to clipboard
a_dialog: ^1.0.1 copied to clipboard

A Dialog Package Is For Show Awesome Dialogs With Simple Lines Of Code

example/lib/main.dart

import 'package:a_dialog/enums/enums.dart';
import 'package:a_dialog/utils/a_dialog_controller.dart';
import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      title: "Test",
      home: TestPage(),
    );
  }
}

class TestPage extends StatelessWidget {
  const TestPage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text("Test ADialog")),
      body: Column(
        mainAxisAlignment: MainAxisAlignment.center,
        children: [
          Center(
            child: ElevatedButton(
              onPressed: () {
                ADialog.show(
                  context,
                  DialogType.loading,
                  animationType: AnimationType.scale,
                );
              },
              child: const Text("Loading Dialog"),
            ),
          ),
          Center(
            child: ElevatedButton(
              onPressed: () {
                ADialog.show(
                  context,
                  DialogType.success,
                  animationType: AnimationType.rotate,
                );
              },
              child: const Text("Success Dialog"),
            ),
          ),
          Center(
            child: ElevatedButton(
              onPressed: () {
                ADialog.show(
                  context,
                  DialogType.notify,
                  animationType: AnimationType.upToDown,
                );
              },
              child: const Text("Notify Dialog"),
            ),
          ),
          Center(
            child: ElevatedButton(
              onPressed: () {
                ADialog.show(
                  context,
                  DialogType.warning,
                  animationType: AnimationType.downToUp,
                );
              },
              child: const Text("Warining Dialog"),
            ),
          ),
          Center(
            child: ElevatedButton(
              onPressed: () {
                ADialog.show(
                  context,
                  DialogType.info,
                  animationType: AnimationType.leftToRight,
                );
              },
              child: const Text("Info Dialog"),
            ),
          ),
          Center(
            child: ElevatedButton(
              onPressed: () {
                ADialog.show(
                  context,
                  DialogType.error,
                  animationType: AnimationType.rightToLeft,
                );
              },
              child: const Text("Error Dialog"),
            ),
          ),
          Center(
            child: ElevatedButton(
              onPressed: () {
                ADialog.show(
                  context,
                  DialogType.custom,
                  animationType: AnimationType.leftToRight,
                  customDialog: const Center(
                    child: Text('Hi I am a custom Dialog'),
                  ),
                );
              },
              child: const Text("CustomDialog"),
            ),
          ),
        ],
      ),
    );
  }
}
10
likes
110
points
29
downloads

Publisher

unverified uploader

Weekly Downloads

A Dialog Package Is For Show Awesome Dialogs With Simple Lines Of Code

Repository (GitHub)
View/report issues

Documentation

API reference

License

unknown (license)

Dependencies

flutter, vector_math

More

Packages that depend on a_dialog