Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Range Error #6

Closed
niravt07 opened this issue Jun 18, 2019 · 4 comments · Fixed by #8
Closed

Range Error #6

niravt07 opened this issue Jun 18, 2019 · 4 comments · Fixed by #8
Labels
bug Something isn't working

Comments

@niravt07
Copy link

I/flutter (25293): ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
I/flutter (25293): The following RangeError was thrown building MyApp(dirty, state: _MyAppState#de240):
I/flutter (25293): RangeError (index): Invalid value: Not in range 0..6, inclusive: -2
I/flutter (25293):
I/flutter (25293): When the exception was thrown, this was the stack:
I/flutter (25293): #0 List.[] (dart:core-patch/array.dart:161:52)
I/flutter (25293): #1 new CallLogEntry.fromMap (package:call_log/call_log.dart:67:31)
I/flutter (25293): #2 CallLog.query. (package:call_log/call_log.dart:41:45)
I/flutter (25293): #3 MappedListIterable.elementAt (dart:_internal/iterable.dart:414:29)
I/flutter (25293): #4 ListIterable.forEach (dart:_internal/iterable.dart:39:14)
I/flutter (25293): #5 _MyAppState.build (package:call_log_example/main.dart:17:21)
I/flutter (25293): #6 StatefulElement.build (package:flutter/src/widgets/framework.dart:3825:27)
I/flutter (25293): #7 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3739:15)
I/flutter (25293): #8 Element.rebuild (package:flutter/src/widgets/framework.dart:3565:5)
I/flutter (25293): #9 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2278:33)
I/flutter (25293): #10 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding&WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:700:20)
I/flutter (25293): #11 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:286:5)
I/flutter (25293): #12 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1012:15)
I/flutter (25293): #13 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:952:9)
I/flutter (25293): #14 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:864:5)
I/flutter (25293): #18 _invoke (dart:ui/hooks.dart:219:10)
I/flutter (25293): #19 _drawFrame (dart:ui/hooks.dart:178:3)
I/flutter (25293): (elided 3 frames from package dart:async)
I/flutter (25293): ════════════════════════════════════════════════════════════════════════════════════════════════════

@MartinHlavna MartinHlavna added the bug Something isn't working label Aug 5, 2019
@jafarzzz
Copy link

jafarzzz commented Feb 3, 2020

same here range error...please solve this issue as soon as possible

@syubo123
Copy link

syubo123 commented Mar 27, 2020

修改下代码call_log.dart文件中:

CallLogEntry.fromMap(Map m) {
    name = m['name'];
    number = m['number'];
    formattedNumber = m['formattedNumber'];
    callType = CallType.values[
        m['callType'] < 8 && m['callType'] > 0 ? (m['callType'] - 1) : 7];
    duration = m['duration'];
    timestamp = m['timestamp'];
  }

在CallType加unkonw:

enum CallType {
  incoming,
  outgoing,
  missed,
  voiceMail,
  rejected,
  blocked,
  answeredExternally,
  unkonw
}

@synw synw mentioned this issue Apr 25, 2020
@fpicoitoj
Copy link
Contributor

Hey, I did a fork that fixes this if anyone is interested:
https://github.com/Cenas-Factory/call_log

@ethael
Copy link
Member

ethael commented May 1, 2020

thanks a lot. we will check it out during next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants