mirror of
https://github.com/Iconica-Development/flutter_image_picker.git
synced 2025-05-18 19:53:45 +02:00
Solved the flutter analyze errors
This commit is contained in:
parent
6cec1140b3
commit
1ec1861ba2
4 changed files with 6 additions and 3 deletions
|
@ -1 +1 @@
|
||||||
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"image_picker_ios","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\image_picker_ios-0.8.5+6\\\\","native_build":true,"dependencies":[]}],"android":[{"name":"flutter_plugin_android_lifecycle","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_plugin_android_lifecycle-2.0.7\\\\","native_build":true,"dependencies":[]},{"name":"image_picker_android","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\image_picker_android-0.8.5+2\\\\","native_build":true,"dependencies":["flutter_plugin_android_lifecycle"]}],"macos":[],"linux":[],"windows":[],"web":[{"name":"image_picker_for_web","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\image_picker_for_web-2.1.8\\\\","dependencies":[]}]},"dependencyGraph":[{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"image_picker","dependencies":["image_picker_android","image_picker_for_web","image_picker_ios"]},{"name":"image_picker_android","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"image_picker_for_web","dependencies":[]},{"name":"image_picker_ios","dependencies":[]}],"date_created":"2022-09-05 08:55:11.890091","version":"3.0.5"}
|
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"image_picker_ios","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\image_picker_ios-0.8.5+6\\\\","native_build":true,"dependencies":[]}],"android":[{"name":"flutter_plugin_android_lifecycle","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_plugin_android_lifecycle-2.0.7\\\\","native_build":true,"dependencies":[]},{"name":"image_picker_android","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\image_picker_android-0.8.5+2\\\\","native_build":true,"dependencies":["flutter_plugin_android_lifecycle"]}],"macos":[],"linux":[],"windows":[],"web":[{"name":"image_picker_for_web","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\image_picker_for_web-2.1.8\\\\","dependencies":[]}]},"dependencyGraph":[{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"image_picker","dependencies":["image_picker_android","image_picker_for_web","image_picker_ios"]},{"name":"image_picker_android","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"image_picker_for_web","dependencies":[]},{"name":"image_picker_ios","dependencies":[]}],"date_created":"2022-09-05 09:08:26.322276","version":"3.0.5"}
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -28,3 +28,4 @@ migrate_working_dir/
|
||||||
.dart_tool/
|
.dart_tool/
|
||||||
.packages
|
.packages
|
||||||
build/
|
build/
|
||||||
|
coverage/
|
||||||
|
|
|
@ -97,7 +97,8 @@ class _ImagePickerExampleHomePageState
|
||||||
/// When the same image is chosen there will be a snackbar popping up to let you know it's already being displayed.
|
/// When the same image is chosen there will be a snackbar popping up to let you know it's already being displayed.
|
||||||
void pickImage() async {
|
void pickImage() async {
|
||||||
Uint8List? imageInBytes = await showModalBottomSheet<Uint8List?>(
|
Uint8List? imageInBytes = await showModalBottomSheet<Uint8List?>(
|
||||||
context: context, builder: (BuildContext context) => ImagePicker());
|
context: context,
|
||||||
|
builder: (BuildContext context) => const ImagePicker());
|
||||||
if (imageInBytes != null) {
|
if (imageInBytes != null) {
|
||||||
if (!listEquals(image, imageInBytes)) {
|
if (!listEquals(image, imageInBytes)) {
|
||||||
setState(() {
|
setState(() {
|
||||||
|
|
|
@ -86,9 +86,10 @@ class ImagePicker extends StatelessWidget {
|
||||||
icon: Icon(icon),
|
icon: Icon(icon),
|
||||||
iconSize: imagePickerTheme.iconSize,
|
iconSize: imagePickerTheme.iconSize,
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
|
final navigator = Navigator.of(context);
|
||||||
var image = await (imagePickerService ?? ImagePickerService())
|
var image = await (imagePickerService ?? ImagePickerService())
|
||||||
.pickImage(imageSource);
|
.pickImage(imageSource);
|
||||||
Navigator.of(context).pop(image);
|
navigator.pop(image);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
|
|
Loading…
Reference in a new issue