fxdialogs 0.1.0 copy "fxdialogs: ^0.1.0" to clipboard
fxdialogs: ^0.1.0 copied to clipboard

discontinued

A Flutter package to use custom dialogs.

example/example.dart

import 'package:flutter/material.dart';
import 'package:fxdialogs/fxdialogs.dart';

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  void initState() async {
    super.initState();

    /// Checks for an app update on app init state.
    final newVersion = FXNewVersion();
    final status = await newVersion.getVersionStatus();
    newVersion.showUpdateDialog(
      context: context,
      versionStatus: status!,
    );
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text("Flutter FXDialogs Example.")),
      body: Column(
        mainAxisAlignment: MainAxisAlignment.center,
        children: [
          // Opening a dialog to show custom message.
          ElevatedButton(
            onPressed: () => FXDialog(
              context,
              dialogType: DialogType.success,
              message: "Custom Dialog message",
            ),
            child: Text("Open Success Dialog"),
          ),

          // Opening and show user linear progress indicator.
          ElevatedButton(
            onPressed: () => FXDialog.progress(
              context,
              progressType: ProgressType.linear,
              subtitle: "Loading...",
            ),
            child: Text("Open Linear Progress Dialog"),
          ),
        ],
      ),
    );
  }
}
2
likes
110
pub points
0%
popularity

Publisher

unverified uploader

A Flutter package to use custom dialogs.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

collection, flutter, html, http, lottie, package_info_plus, url_launcher

More

Packages that depend on fxdialogs