intent 1.0.0 copy "intent: ^1.0.0" to clipboard
intent: ^1.0.0 copied to clipboard

outdated

A simple to use Flutter plugin to deal with Android Intents - your one-stop-solution for Android Intents.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:intent/intent.dart';
import 'package:intent/action.dart';
import 'package:intent/extra.dart';
import 'package:intent/category.dart';
import 'package:intent/flag.dart';

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text(
            'Plugin Example App',
            style: TextStyle(
              color: Colors.black,
            ),
          ),
          centerTitle: true,
          backgroundColor: Colors.cyanAccent,
        ),
        body: Center(
          child: RaisedButton(
            color: Colors.cyanAccent,
            elevation: 16,
            onPressed: () => Intent()
              ..setAction(Action.ACTION_TRANSLATE)
              ..putExtra(Extra.EXTRA_TEXT, "I Love Computers")
              ..startActivity().catchError((e) => print(e)),
            child: Text('Intent'),
          ),
        ),
      ),
    );
  }
}
122
likes
0
points
72
downloads

Publisher

verified publisheritzmeanjan.in

Weekly Downloads

A simple to use Flutter plugin to deal with Android Intents - your one-stop-solution for Android Intents.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on intent