discontinuedPackage fluttersdk_artisan has been discontinued and replaced by dowel.

InjectAndroidActivity class final

Adds an <activity> element, with its intent filters, inside <application> in AndroidManifest.xml.

Idempotency compares content, not only the name: an activity with the same android:name and an equal set of intent filters is left as it is, and one with different filters is never rewritten; the executor warns with the block it expected instead. exported and taskAffinity are not part of that comparison.

Example

InjectAndroidActivity(
  name: 'com.linusu.flutter_web_auth_2.CallbackActivity',
  exported: true,
  taskAffinity: '',
  intentFilters: [
    AndroidIntentFilter(
      autoVerify: true,
      actions: ['android.intent.action.VIEW'],
      categories: [
        'android.intent.category.DEFAULT',
        'android.intent.category.BROWSABLE',
      ],
      data: [
        AndroidIntentData(
          scheme: 'https',
          host: 'auth.example.com',
          path: '/social/callback',
        ),
      ],
    ),
  ],
)
Inheritance

Constructors

InjectAndroidActivity({required String name, required bool exported, String? taskAffinity, List<AndroidIntentFilter> intentFilters = const <AndroidIntentFilter>[]})
Creates an InjectAndroidActivity operation.
const

Properties

exported → bool
The android:exported attribute value.
final
hashCode → int
The hash code for this object.
no setterinherited
intentFilters → List<AndroidIntentFilter>
The <intent-filter> elements the activity declares.
final
name → String
The android:name attribute value.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
taskAffinity → String?
The android:taskAffinity value; '' is an empty affinity, null omits the attribute.
final

Methods

describe() → String
Returns a human-readable dry-run line for this operation.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited