intent icon indicating copy to clipboard operation
intent copied to clipboard

Add support for custom extra types

Open ali2236 opened this issue 5 years ago • 1 comments

If you pass boolean or int for other Extras, it will just try to cast them to String which will result in an exception.

Example for openning a calendar's add event page:

Intent()
  ..setAction(Action.ACTION_INSERT)
  ..setData(Uri.parse('content://com.android.calendar/events'))
  ..putExtra("description", dayName)
  ..putExtra('beginTime', time)
  ..putExtra('endTime', time)
  ..putExtra('allDay', true)
  ..startActivityForResult(createChooser: true)
    .catchError((e) => print(e));

ali2236 avatar Feb 27 '20 10:02 ali2236

Thanks for reporting, I'm digging deeper

itzmeanjan avatar Apr 26 '20 16:04 itzmeanjan