android_content_provider 0.3.0 copy "android_content_provider: ^0.3.0" to clipboard
android_content_provider: ^0.3.0 copied to clipboard

Flutter plugin to use ContentProvider/ContentResolver APIs on Android

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';

import 'books_page.dart';
import 'media_store_songs_page.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  runApp(const ProviderScope(child: MyApp()));
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Builder(
        builder: (context) => Scaffold(
          appBar: AppBar(
            title: const Text('AndroidContentResolver example'),
          ),
          body: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              ElevatedButton(
                child: const Text('Books example (provider from example_provider)'),
                onPressed: () {
                  Navigator.of(context).push(
                    MaterialPageRoute(builder: (context) => const BooksPage()),
                  );
                },
              ),
              ElevatedButton(
                child: const Text('MediaStore songs example (common Android provider)'),
                onPressed: () {
                  Navigator.of(context).push(
                    MaterialPageRoute(builder: (context) => const MediaStoreSongsPage()),
                  );
                },
              ),
            ],
          ),
        ),
      ),
    );
  }
}
15
likes
0
points
1.38k
downloads

Publisher

unverified uploader

Weekly Downloads

Flutter plugin to use ContentProvider/ContentResolver APIs on Android

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

async, flutter, uuid

More

Packages that depend on android_content_provider