flutter_launcher_icons icon indicating copy to clipboard operation
flutter_launcher_icons copied to clipboard

This package causes an error in LicensePage

Open granoeste opened this issue 6 years ago • 8 comments

LicensePage raises an error if this plugin is specified as dependencies

Caused by com.kiwi.fluttercrashlytics.FlutterException: 'package:flutter/src/foundation/licenses.dart': Failed assertion: line 159 pos 14: 'result.text.trimLeft() == result.text': is not true.
       at _AssertionError._doThrowNew(liberrors_patch.dart:40)
       at _AssertionError._throwNew(liberrors_patch.dart:36)
       at LicenseEntryWithLineBreaks.paragraphs.getParagraph(licenses.dart:159)
       at LicenseEntryWithLineBreaks.paragraphs(licenses.dart:203)
       at _SyncIterator.moveNext(libcore_patch.dart:151)
       at new List.from(libarray_patch.dart:40)
       at Iterable.toList(iterable.dart:398)
       at _LicensePageState._initLicenses.<fn>(about.dart:391)
       at _TaskEntry.run.<fn>(binding.dart:81)
       at Timeline.timeSync(timeline.dart:168)
       at _TaskEntry.run(binding.dart:78)
       at _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleEventLoopCallback(binding.dart:363)
       at _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._runTasks(binding.dart:341)
       at ._rootRun(zone.dart:1120)
       at _CustomZone.run(zone.dart:1021)
       at _CustomZone.runGuarded(zone.dart:923)
       at _CustomZone.bindCallbackGuarded.<fn>(zone.dart:963)
       at ._rootRun(zone.dart:1124)
       at _CustomZone.run(zone.dart:1021)
       at _CustomZone.bindCallback.<fn>(zone.dart:947)
       at Timer._createTimer.<fn>(libtimer_patch.dart:21)
       at _Timer._runTimers(libtimer_impl.dart:382)
       at _Timer._handleMessage(libtimer_impl.dart:416)
       at _RawReceivePortImpl._handleMessage(libisolate_patch.dart:171)

granoeste avatar Jan 13 '19 14:01 granoeste

Hi thanks for reporting this.

I'll need more information. Could you provide steps on how to replicate this issue?

MarkOSullivan94 avatar Jan 13 '19 21:01 MarkOSullivan94

  1. Define flutter_launcher_icons in pubspec.yaml
dev_dependencies:
  flutter_launcher_icons: ^0.7.0
  1. Display LicensePage with the following code with onPressed of Button etc.
            showLicensePage(context: context);

showLicensePage function - material library - Dart API

I think the definition of LICENSE is a problem...

granoeste avatar Jan 24 '19 16:01 granoeste

Might have been due to the year / name not being put in, I've updated it in the master branch for now and should hopefully no longer cause any issues in the next release

MarkOSullivan94 avatar Feb 16 '19 15:02 MarkOSullivan94

@MarkOSullivan94 This issue keeps happening, but not because of flutter_launcher_icons, but because of image package. At least for me that's where it broke...

miguelcmedeiros avatar Apr 12 '19 10:04 miguelcmedeiros

@granoeste v0.7.1 has been released - let me know if this fixes your issue

@miguelcmedeiros that issue is unrelated to this one and should be fixed in v0.7.1 see these two issues which are related

https://github.com/fluttercommunity/flutter_launcher_icons/issues/101 https://github.com/fluttercommunity/flutter_launcher_icons/issues/102

MarkOSullivan94 avatar May 23 '19 23:05 MarkOSullivan94

I am not sure about the status of this.

I've started working on a flutter project on and off around two months ago. After noticing this week that showLicensePage generates an exception, I've disabled all packages from pubspec.yaml one at a time and found out that "flutter_launcher_icons" was responsible for the problem.

After that, I've updated the version to 0.7.3, uncommented the dependency and showLicensePage seems to still work fine.

micsanbr avatar Sep 04 '19 14:09 micsanbr

Okay so I forgot to clean / rebuild the project properly. The issue reappears after re-introducing the dependency.

micsanbr avatar Sep 04 '19 14:09 micsanbr

I can confirm what @micsan13br is seeing. Since we don't need flutter_launcher_icons at runtime, we just comment it out in pubspec.yaml for our builds and showLicensePage works correctly from there.

RabbitKabong avatar Oct 24 '19 18:10 RabbitKabong