mirror of
https://github.com/Iconica-Development/flutter_image_picker.git
synced 2025-05-18 19:53:45 +02:00
something
This commit is contained in:
parent
2bc624f95c
commit
cc6af7fafe
5 changed files with 29 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-01 11:06:25.920284","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-01 12:25:01.884569","version":"3.0.5"}
|
2
example/.gitignore
vendored
2
example/.gitignore
vendored
|
@ -19,7 +19,7 @@ migrate_working_dir/
|
||||||
# The .vscode folder contains launch configuration and tasks you configure in
|
# The .vscode folder contains launch configuration and tasks you configure in
|
||||||
# VS Code which you may wish to be included in version control, so this line
|
# VS Code which you may wish to be included in version control, so this line
|
||||||
# is commented out by default.
|
# is commented out by default.
|
||||||
#.vscode/
|
.vscode/
|
||||||
|
|
||||||
# Flutter/Dart/Pub related
|
# Flutter/Dart/Pub related
|
||||||
**/doc/api/
|
**/doc/api/
|
||||||
|
|
|
@ -77,7 +77,9 @@ class _ImagePickerExampleHomePageState
|
||||||
),
|
),
|
||||||
SizedBox(height: whiteSpace / 2),
|
SizedBox(height: whiteSpace / 2),
|
||||||
ElevatedButton(
|
ElevatedButton(
|
||||||
onPressed: pickImage, child: const Text('Pick Image')),
|
onPressed: pickImage,
|
||||||
|
key: const Key("PickImageButton"),
|
||||||
|
child: const Text('Pick Image')),
|
||||||
SizedBox(height: whiteSpace),
|
SizedBox(height: whiteSpace),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
23
example/test/main_test.dart
Normal file
23
example/test/main_test.dart
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
import 'dart:math';
|
||||||
|
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
|
|
||||||
|
import '../lib/main.dart';
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
testWidgets("Test Main widget", ((WidgetTester tester) async {
|
||||||
|
// Initialization
|
||||||
|
final openImagePickerButton = find.byKey(const ValueKey("PickImageButton"));
|
||||||
|
|
||||||
|
// Execute Test
|
||||||
|
await tester.pumpWidget(const MaterialApp(
|
||||||
|
home:
|
||||||
|
ImagePickerExampleHomePage(title: 'Flutter Image Picker Example')));
|
||||||
|
await tester.tap(openImagePickerButton);
|
||||||
|
await tester.pump();
|
||||||
|
|
||||||
|
// Check Result
|
||||||
|
// expect(, findsOneWidget);
|
||||||
|
}));
|
||||||
|
}
|
|
@ -91,6 +91,7 @@ class ImagePickerUI {
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
IconButton(
|
IconButton(
|
||||||
|
key: Key(bottomText),
|
||||||
icon: Icon(icon),
|
icon: Icon(icon),
|
||||||
iconSize: iconSize,
|
iconSize: iconSize,
|
||||||
onPressed: () => _imagePickerService.pickImage(imageSource, context),
|
onPressed: () => _imagePickerService.pickImage(imageSource, context),
|
||||||
|
|
Loading…
Reference in a new issue