insta_widgets 0.0.1+1
insta_widgets: ^0.0.1+1 copied to clipboard
You can use widgets like Instagram.
Features #
- Can pick images like instagram.
- Can take a picture like instagram.
- Can zoom in on pictures like Instagram.
Supported platform #
- Flutter Android
- Flutter iOS
Screenshots #
Installation #
You have to add insta_widgets in pubspec.yaml
flutter pub add insta_widgets
Android #
you have to add 5 permissions in your android/app/src/main/res/AndroidManifest.xml
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES"/>
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO"/>
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
iOS #
you have to add 3 permissions with your description in your ios/Runner/Info.plist
<key>NSMicrophoneUsageDescription</key>
<string>your description</string>
<key>NSCameraUsageDescription</key>
<string>your description</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>your description</string>
Import #
import 'package:insta_widgets/insta_widgets.dart';
How to use ? #
InstaPhotoPicker #
pick photos #
InstaPhotoPicker.instance.pickPhotos(
context: context,
onPicked: (photos) => setState(() {
_pickedPhotos.clear();
_pickedPhotos.addAll(photos);
}),
onTookPicture: (photo){
if(photo != null) setState(() => _pickedPhotos.add(photo));
},
)
take a picture #
InstaPhotoPicker.instance.takePicture(
context: context,
onTookPicture: (photo){
if(photo != null) {
setState((){
_pickedPhotos.clear();
_pickedPhotos.add(photo);
});
}
}
)