Closed yaming116 closed 8 years ago
@dlemures dependency to be optional build failed,i need remove it?
It seems that none of the previous solutions work:
You will need to create a new sibling module (dart-support
?) so if the app uses support fragment, users will need to include dart-support instead of dart:
compile 'com.f2prateek.dart:dart-support:XXX'
One possible approach:
com.f2prateek.dart.support.Dart
inside the new module dart-supportcom.f2prateek.dart.support.Dart
extends from com.f2prateek.dart.Dart
and adds the methods for support fragmentspublic Object getExtra(Object source, String key)
and both Dart classes define an enum which extends it. (in case we want to keep the enum approach...)What do you think? @yaming116 @stephanenicolas
I think it is a bit overkilling to make so many changes for a shortcut. From the support fragment we can always use:
Dart.inject(this, getArguments)
It failed, could you fix it?