离子玉-价格输入

时间:2018-09-05 03:50:23

标签: ionic-framework input pug

我正在构建一个Ionic应用程序,并且试图创建一个价格输入。条件很简单:

  1. 只允许输入数字
  2. 仅允许使用一个小数点,因此用户不能两次输入小数点。
  3. 十进制后只能输入2个数字。示例2.10不需要任何舍入。
  4. 小数点是可选的

我正在使用Jade作为我的UI模板。我已经尝试了stackoverflow中提供的一些答案,但是它不起作用。

══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
The following assertion was thrown running a test:
pumpAndSettle timed out

When the exception was thrown, this was the stack:
#0      WidgetTester.pumpAndSettle.<anonymous closure> (package:flutter_test/src/widget_tester.dart:299:11)
<asynchronous suspension>
#3      TestAsyncUtils.guard (package:flutter_test/src/test_async_utils.dart:69:41)
#4      WidgetTester.pumpAndSettle (package:flutter_test/src/widget_tester.dart:295:27)
#5      main.<anonymous closure>.<anonymous closure> (file:///Users/ssiddh/Documents/projects/mobile-flutter/test/ui/pages/login/login_full_test.dart:114:20)
<asynchronous suspension>
#6      testWidgets.<anonymous closure>.<anonymous closure> (package:flutter_test/src/widget_tester.dart:72:23)
#7      TestWidgetsFlutterBinding._runTestBody (package:flutter_test/src/binding.dart:555:19)
<asynchronous suspension>
#10     TestWidgetsFlutterBinding._runTest (package:flutter_test/src/binding.dart:539:14)
#11     AutomatedTestWidgetsFlutterBinding.runTest.<anonymous closure> (package:flutter_test/src/binding.dart:883:24)
#17     AutomatedTestWidgetsFlutterBinding.runTest (package:flutter_test/src/binding.dart:880:15)
#18     testWidgets.<anonymous closure> (package:flutter_test/src/widget_tester.dart:71:22)
#19     Declarer.test.<anonymous closure>.<anonymous closure>.<anonymous closure> (package:test/src/backend/declarer.dart:168:27)
<asynchronous suspension>
#20     Invoker.waitForOutstandingCallbacks.<anonymous closure> (package:test/src/backend/invoker.dart:249:15)
<asynchronous suspension>
#25     Invoker.waitForOutstandingCallbacks (package:test/src/backend/invoker.dart:246:5)
#26     Declarer.test.<anonymous closure>.<anonymous closure> (package:test/src/backend/declarer.dart:166:33)
#31     Declarer.test.<anonymous closure> (package:test/src/backend/declarer.dart:165:13)
<asynchronous suspension>
#32     Invoker._onRun.<anonymous closure>.<anonymous closure>.<anonymous closure>.<anonymous closure> (package:test/src/backend/invoker.dart:403:25)
<asynchronous suspension>
#46     _Timer._runTimers (dart:isolate/runtime/libtimer_impl.dart:382:19)
#47     _Timer._handleMessage (dart:isolate/runtime/libtimer_impl.dart:416:5)
#48     _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:169:12)
(elided 30 frames from class _FakeAsync, package dart:async, and package stack_trace)

有人能帮助我吗?

0 个答案:

没有答案