Giter Site home page Giter Site logo

dylanwuzh / flutter_progress_dialog Goto Github PK

View Code? Open in Web Editor NEW
22.0 22.0 10.0 93 KB

Flutter progress dialog, support Android and iOS platform.

License: Apache License 2.0

Kotlin 7.09% Swift 5.64% Objective-C 2.61% Dart 80.11% Ruby 3.91% Shell 0.64%
dialog flutter progress progress-dialog

flutter_progress_dialog's People

Contributors

dylanwuzh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

flutter_progress_dialog's Issues

dismiss error

Unhandled Exception: NoSuchMethodError: The method 'showDismissAnim' was called on null.
Receiver: null
Tried calling: showDismissAnim()
#0      Object.noSuchMethod (dart:core-patch/object_patch.dart:53:5)
#1      ProgressFuture.dismiss (package:flutter_progress_dialog/src/core/future.dart:25:34)
#2      ProgressManager.dismissAll.<anonymous closure>

App crashes when double tap or long press on Cupertino TextField with ProgressDialog

I am using this progress dialog library to show progress UI when app is performing something serious IO stuff. But i noticed when we double tap or long press on any Text Input Field, App crashed / shows Red screen in debug.

Here is the related logs:

======== Exception caught by widgets library =======================================================
The following ArgumentError was thrown building _OverlayEntryWidget-[LabeledGlobalKey<_OverlayEntryWidgetState>#235b1](dirty, dependencies: [MediaQuery], state: _OverlayEntryWidgetState#faabb):
Invalid argument(s): 26.0

The relevant error-causing widget was: 
  ProgressDialog file:///Users/bipinvaylu/Documents/Work/Workspaces/xyzapp/lib/main.dart:89:24
When the exception was thrown, this was the stack: 
#0      double.clamp (dart:core-patch/double.dart:183:7)
#1      _CupertinoTextSelectionControls.buildToolbar (package:flutter/src/cupertino/text_selection.dart:478:72)
#2      TextSelectionOverlay._buildToolbar (package:flutter/src/widgets/text_selection.dart:578:34)
#3      _OverlayEntryWidgetState.build (package:flutter/src/widgets/overlay.dart:179:34)
#4      StatefulElement.build (package:flutter/src/widgets/framework.dart:4744:28)
...
====================================================================================================

main.dart - MyApp:

class MyApp extends StatelessWidget {
  MyApp();

  @override
  Widget build(BuildContext context) {
    SystemChrome.setPreferredOrientations([
      DeviceOrientation.portraitUp,
    ]);

    return Localizations(
      locale: const Locale('en', 'US'),
      delegates: <LocalizationsDelegate<dynamic>>[
        DefaultWidgetsLocalizations.delegate,
        DefaultMaterialLocalizations.delegate,
      ],
      child: MediaQuery(
        data: const MediaQueryData(),
        child: ThemeBuilder(
          defaultThemeMode: ThemeMode.system,
          darkTheme: darkTheme,
          lightTheme: lightTheme,
          statusBarColorBuilder: (theme) => HomePage.tabBackgroundColor,
          themes: getThemes(),
          builder: (context, regularTheme, darkTheme, themeMode) {
            return LayoutBuilder(
                //return LayoutBuilder
                builder: (context, constraints) {
              return OrientationBuilder(
                  //return OrientationBuilder
                  builder: (context, orientation) {
                //initialize SizerUtil()
                SizerUtil().init(constraints, orientation);

                return ProgressDialog(
                  orientation: ProgressOrientation.vertical,
                  loadingText: "Please wait...",
                  backgroundColor: Theme.of(context).backgroundColor,
                  child: MaterialApp(
                    title: "Xyz app",
                    theme: regularTheme,
                    darkTheme: darkTheme,
                    themeMode: themeMode,
                    home: SplashScreen(),
                  ),
                );
              });
            });
          },
        ),
      ),
    );
  }
}

Text input field setup in other screen as follow:

                    Expanded(
                      child: CupertinoTextField(
                        controller: _userNameTextController,
                        keyboardType: TextInputType.name,
                        placeholder: "Friend username",
                        style: Theme.of(context).textTheme.bodyText1,
                        cursorColor: Theme.of(context).primaryColor,
                        prefix: Padding(
                          padding:
                              const EdgeInsets.fromLTRB(9.0, 6.0, 9.0, 6.0),
                          child: Icon(
                            Icons.search,
                            color: Theme.of(context).primaryColor,
                          ),
                        ),
                        decoration: BoxDecoration(
                          borderRadius: BorderRadius.circular(8.0),
                          color: Theme.of(context).accentColor.withAlpha(70),
                        ),
                      ),
                    ),

I don't see any proper solution as of now. Please help me here to resolve this issue. Else i might need try and switch over to other library and that some extra work. Thanks.

properties do not work

used

loadingText
backgroundColor

the text is always chinese
background color does not follow what is specified.

如何在loading时不允许点击

方法: 使用ProgressDialog包裹MaterialApp
现象: loading在生效的时候可以点到appbar的返回键,如何禁用?是否有类似barrierDismissible这样的属性设置,
不过oktoast好像也是没有这样的属性
flutter_progress_dialog: ^0.1.0
flutter 1.9.1+hotfix.6
感谢

dialog should act like a dialog

the visual display is very nice. one thing lacking is that the user can click anywhere on the screen.
the behavior should still be the same as a dialog where clicking anywhere will dismiss it, or have an option to not dismiss it and can only do so programmatically.

Project not building on new beta sdk 1.26.0-17.6.pre

/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_progress_dialog-0.1.0/lib/src/widget/theme.dart:39:15: Error: The method 'inheritFromWidgetOfExactType' isn't defined for the class 'BuildContext'.

  • 'BuildContext' is from 'package:flutter/src/widgets/framework.dart' ('/C:/src/flutter/packages/flutter/lib/src/widgets/framework.dart').
    Try correcting the name to the name of an existing method, or defining a method named 'inheritFromWidgetOfExactType'.
    context.inheritFromWidgetOfExactType(_ProgressTheme);
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    Failed to compile application.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.