dylanwuzh / flutter_progress_dialog Goto Github PK
View Code? Open in Web Editor NEWFlutter progress dialog, support Android and iOS platform.
License: Apache License 2.0
Flutter progress dialog, support Android and iOS platform.
License: Apache License 2.0
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>
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.
used
loadingText
backgroundColor
the text is always chinese
background color does not follow what is specified.
方法: 使用ProgressDialog包裹MaterialApp
现象: loading在生效的时候可以点到appbar的返回键,如何禁用?是否有类似barrierDismissible这样的属性设置,
不过oktoast好像也是没有这样的属性
flutter_progress_dialog: ^0.1.0
flutter 1.9.1+hotfix.6
感谢
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.
/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'.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.