gal 1.0.6 gal: ^1.0.6 copied to clipboard
Gal is a Flutter plugin for handle native gallary apps. Easily open or save media files to native gallery apps (iOS Photos or Android Google Photos)
Gal🖼️ #
Hi👋 Gal is very easy to use Flutter Plugin for handle native gallery apps, iOS and Android .
Features #
- Open gallery
- Save video
- Save image
Installation #
First, add gal
as a
dependency in your pubspec.yaml file.
iOS #
Add the following key to your Info.plist file, located in
<project root>/ios/Runner/Info.plist
:
NSPhotoLibraryAddUsageDescription
- you can copy from Info.plist in example.
Example #
import 'package:flutter/material.dart';
import 'package:gal/gal.dart';
void main() {
runApp(const App());
}
class App extends StatelessWidget {
const App({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: Center(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
FilledButton.icon(
onPressed: () async => Gal.open(),
label: const Text('Open Gallery'),
icon: const Icon(Icons.open_in_new),
),
FilledButton.icon(
onPressed: () async => Gal.putVideo('TODO: Change this text to video path'),
label: const Text('Save Video'),
icon: const Icon(Icons.video_file),
),
FilledButton.icon(
onPressed: () async => Gal.putImage('TODO: Change this text to image path'),
label: const Text('Save Image'),
icon: const Icon(Icons.image),
),
],
),
),
),
);
}
}
Contributing #
Welcome💚 Feel free to create issue or PR. Basically, please follows Effective Dart.