mmcc007 / modal_progress_hud

A simple modal progress HUD (heads-up display, or progress indicator) for flutter
MIT License
158 stars 71 forks source link

Migrate to null safety please? #37

Open atebitftw opened 3 years ago

atebitftw commented 3 years ago

:)

Mayb3Nots commented 3 years ago

Alternative to this package is this loading_overlay.

FelipeFernandesLeandro commented 3 years ago

Alternative to this package is this loading_overlay.

right link > loading_overlay

Mayb3Nots commented 3 years ago

Alternative to this package is this loading_overlay.

right link > loading_overlay

Ahhh yes my bad, edited my link to the right one. Thanks!

EgHubs commented 3 years ago

Any news?

atebitftw commented 3 years ago

@EgHubs I found that someone published a null-safe version of the same package here: https://pub.dev/packages/modal_progress_hud_nsn

luis901101 commented 3 years ago

https://pub.dev/packages/modal_progress_hud_nsn is not a good alternative because it only supports iOS and Android. I just created a null-safety clone of this package which as it is a clone it has support for all flutter supported platforms not only for Android and iOS. Here: modal_progress_hud_alt

I also made a PR40

bkoznov commented 3 years ago

@mmcc007 Any timeline on merging the null safety PR? Appreciate your work, and that of @luis901101 !

Lakhankumawat commented 3 years ago

In my case Loading_Overlay also didn't worked , please don't try that ....That too ( Loading Overlay) does not support Null Safety Watch this

luis901101 commented 3 years ago

The amount of code necessary for this plugin to work is just a few lines, I recommend for those who needs some specific behavior to checkout at the source code at https://github.com/luis901101/modal_progress_hud_alt which is alreeady null-safe and copy from there. It is literally a widget.

Mayb3Nots commented 3 years ago

@Lakhankumawat what version are you using it on? Because loading_overlay is on null safety and I'm using it right now. Please check your configuration.

Lakhankumawat commented 3 years ago

Thanks to @luis901101 for his modal_progress_hud_alt it worked in my case after using lots of loading progress indicator. Thanks again @luis901101 . You are awesome

neelayak commented 3 years ago

this is the null safety version

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

class ModalProgressHUD extends StatelessWidget {
  final bool inAsyncCall;
  final double opacity;
  final Color color;
  final Widget progressIndicator;
  Offset? offset;
  final bool dismissible;
  final Widget child;

  ModalProgressHUD({
    Key? key,
    required this.inAsyncCall,
    this.opacity = 0.3,
    this.color = Colors.grey,
    this.progressIndicator = const CircularProgressIndicator(),
    this.offset,
    this.dismissible = false,
    required this.child,
  })  : assert(child != null),
        assert(inAsyncCall != null),
        super(key: key);

  @override
  Widget build(BuildContext context) {
    if (!inAsyncCall) return child;

    Widget layOutProgressIndicator;
    if (offset == null)
      layOutProgressIndicator = Center(child: progressIndicator);
    else {
      layOutProgressIndicator = Positioned(
        child: progressIndicator,
        left: offset!.dx,
        top: offset!.dy,
      );
    }

    return new Stack(
      children: [
        child,
        new Opacity(
          child: new ModalBarrier(dismissible: dismissible, color: color),
          opacity: opacity,
        ),
        layOutProgressIndicator,
      ],
    );
  }
}
`
joeyyy688 commented 2 years ago

https://pub.dev/packages/blurry_modal_progress_hud/versions/1.0.1

joseph-fox commented 2 years ago

Is this repo abandoned by the original maintainers?

joeyyy688 commented 2 years ago

Is this repo abandoned by the original maintainers?

yes, Its been a while since it was updated. Anyways feel free to check this out. It's an upgraded one

dpedrinha commented 2 years ago

@mmcc007 you ok? Can you please push this update?