cjl_macbook 6 anni fa
parent
commit
782c4e930b

+ 1
- 0
.flutter-plugins Vedi File

@@ -0,0 +1 @@
1
+photo_manager=/Users/caijinglong/.pub-cache/git/flutter_photo_manager-567b73d36baad10092d72bde41fc5e64e39594c5/

+ 10
- 0
.gitignore Vedi File

@@ -0,0 +1,10 @@
1
+.DS_Store
2
+.dart_tool/
3
+
4
+.packages
5
+.pub/
6
+
7
+build/
8
+ios/.generated/
9
+ios/Flutter/Generated.xcconfig
10
+ios/Runner/GeneratedPluginRegistrant.*

+ 19
- 0
.idea/libraries/Dart_SDK.xml Vedi File

@@ -0,0 +1,19 @@
1
+<component name="libraryTable">
2
+  <library name="Dart SDK">
3
+    <CLASSES>
4
+      <root url="file:///Users/caijinglong/Library/Flutter/flutter/bin/cache/dart-sdk/lib/async" />
5
+      <root url="file:///Users/caijinglong/Library/Flutter/flutter/bin/cache/dart-sdk/lib/collection" />
6
+      <root url="file:///Users/caijinglong/Library/Flutter/flutter/bin/cache/dart-sdk/lib/convert" />
7
+      <root url="file:///Users/caijinglong/Library/Flutter/flutter/bin/cache/dart-sdk/lib/core" />
8
+      <root url="file:///Users/caijinglong/Library/Flutter/flutter/bin/cache/dart-sdk/lib/developer" />
9
+      <root url="file:///Users/caijinglong/Library/Flutter/flutter/bin/cache/dart-sdk/lib/html" />
10
+      <root url="file:///Users/caijinglong/Library/Flutter/flutter/bin/cache/dart-sdk/lib/io" />
11
+      <root url="file:///Users/caijinglong/Library/Flutter/flutter/bin/cache/dart-sdk/lib/isolate" />
12
+      <root url="file:///Users/caijinglong/Library/Flutter/flutter/bin/cache/dart-sdk/lib/math" />
13
+      <root url="file:///Users/caijinglong/Library/Flutter/flutter/bin/cache/dart-sdk/lib/mirrors" />
14
+      <root url="file:///Users/caijinglong/Library/Flutter/flutter/bin/cache/dart-sdk/lib/typed_data" />
15
+    </CLASSES>
16
+    <JAVADOC />
17
+    <SOURCES />
18
+  </library>
19
+</component>

+ 8
- 0
.idea/modules.xml Vedi File

@@ -0,0 +1,8 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="ProjectModuleManager">
4
+    <modules>
5
+      <module fileurl="file://$PROJECT_DIR$/photo.iml" filepath="$PROJECT_DIR$/photo.iml" />
6
+    </modules>
7
+  </component>
8
+</project>

+ 36
- 0
.idea/workspace.xml Vedi File

@@ -0,0 +1,36 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="FileEditorManager">
4
+    <leaf>
5
+      <file leaf-file-name="main.dart" pinned="false" current-in-tab="true">
6
+        <entry file="file://$PROJECT_DIR$/lib/main.dart">
7
+          <provider selected="true" editor-type-id="text-editor">
8
+            <state relative-caret-position="0">
9
+              <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
10
+            </state>
11
+          </provider>
12
+        </entry>
13
+      </file>
14
+    </leaf>
15
+  </component>
16
+  <component name="ToolWindowManager">
17
+    <editor active="true" />
18
+    <layout>
19
+      <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
20
+    </layout>
21
+  </component>
22
+  <component name="ProjectView">
23
+    <navigator currentView="ProjectPane" proportions="" version="1">
24
+    </navigator>
25
+    <panes>
26
+      <pane id="ProjectPane">
27
+        <option name="show-excluded-files" value="false" />
28
+      </pane>
29
+    </panes>
30
+  </component>
31
+  <component name="PropertiesComponent">
32
+    <property name="last_opened_file_path" value="$PROJECT_DIR$" />
33
+    <property name="dart.analysis.tool.window.force.activate" value="true" />
34
+    <property name="show.migrate.to.gradle.popup" value="false" />
35
+  </component>
36
+</project>

+ 3
- 0
CHANGELOG.md Vedi File

@@ -0,0 +1,3 @@
1
+## [0.0.1] - TODO: Add release date.
2
+
3
+* TODO: Describe initial release.

+ 1
- 0
LICENSE Vedi File

@@ -0,0 +1 @@
1
+TODO: Add your license here.

+ 25
- 0
android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java Vedi File

@@ -0,0 +1,25 @@
1
+package io.flutter.plugins;
2
+
3
+import io.flutter.plugin.common.PluginRegistry;
4
+import top.kikt.imagescanner.ImageScannerPlugin;
5
+
6
+/**
7
+ * Generated file. Do not edit.
8
+ */
9
+public final class GeneratedPluginRegistrant {
10
+  public static void registerWith(PluginRegistry registry) {
11
+    if (alreadyRegisteredWith(registry)) {
12
+      return;
13
+    }
14
+    ImageScannerPlugin.registerWith(registry.registrarFor("top.kikt.imagescanner.ImageScannerPlugin"));
15
+  }
16
+
17
+  private static boolean alreadyRegisteredWith(PluginRegistry registry) {
18
+    final String key = GeneratedPluginRegistrant.class.getCanonicalName();
19
+    if (registry.hasPlugin(key)) {
20
+      return true;
21
+    }
22
+    registry.registrarFor(key);
23
+    return false;
24
+  }
25
+}

+ 3
- 0
android/local.properties Vedi File

@@ -0,0 +1,3 @@
1
+sdk.dir=/Users/caijinglong/Library/Android/sdk/
2
+flutter.sdk=/Users/caijinglong/Library/Flutter/flutter
3
+flutter.versionName=0.0.1

+ 45
- 0
lib/photo.dart Vedi File

@@ -0,0 +1,45 @@
1
+library photo;
2
+
3
+import 'package:flutter/material.dart';
4
+
5
+import 'package:photo_manager/photo_manager.dart';
6
+
7
+import 'package:photo/src/entity/options.dart';
8
+
9
+/// A Calculator.
10
+class PhotoPicker {
11
+  static PhotoPicker _instance;
12
+
13
+  PhotoPicker._();
14
+
15
+  factory PhotoPicker() {
16
+    _instance ??= PhotoPicker._();
17
+    return _instance;
18
+  }
19
+
20
+  void pickImage({
21
+    @required BuildContext context,
22
+    int rowCount = 3,
23
+    int maxSelected = 9,
24
+    double padding = 0.5,
25
+    Color themeColor,
26
+    Color dividerColor,
27
+    Color textColor,
28
+    Color paddingColor,
29
+  }) {
30
+    themeColor ??= Theme.of(context)?.primaryColor ?? Colors.black;
31
+    dividerColor ??= Theme.of(context)?.dividerColor ?? Colors.grey;
32
+    paddingColor ??= Theme.of(context)?.dividerColor ?? Colors.grey;
33
+    textColor ??= Colors.white;
34
+
35
+    Options(
36
+      rowCount: rowCount,
37
+      dividerColor: dividerColor,
38
+      maxSelected: maxSelected,
39
+      padding: padding,
40
+      paddingColor: paddingColor,
41
+      textColor: textColor,
42
+      themeColor: themeColor,
43
+    );
44
+  }
45
+}

+ 20
- 0
lib/src/entity/options.dart Vedi File

@@ -0,0 +1,20 @@
1
+import 'package:flutter/material.dart';
2
+
3
+class Options {
4
+  final int rowCount;
5
+  final int maxSelected;
6
+  final double padding;
7
+  final Color themeColor;
8
+  final Color dividerColor;
9
+  final Color textColor;
10
+  final Color paddingColor;
11
+
12
+  const Options(
13
+      {this.rowCount,
14
+      this.maxSelected,
15
+      this.padding,
16
+      this.themeColor,
17
+      this.dividerColor,
18
+      this.textColor,
19
+      this.paddingColor});
20
+}

+ 19
- 0
photo.iml Vedi File

@@ -0,0 +1,19 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<module type="JAVA_MODULE" version="4">
3
+  <component name="NewModuleRootManager" inherit-compiler-output="true">
4
+    <exclude-output />
5
+    <content url="file://$MODULE_DIR$">
6
+      <sourceFolder url="file://$MODULE_DIR$/lib" isTestSource="false" />
7
+      <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
8
+      <excludeFolder url="file://$MODULE_DIR$/.dart_tool" />
9
+      <excludeFolder url="file://$MODULE_DIR$/.idea" />
10
+      <excludeFolder url="file://$MODULE_DIR$/.pub" />
11
+      <excludeFolder url="file://$MODULE_DIR$/build" />
12
+    </content>
13
+    <orderEntry type="jdk" jdkName="Android API 25 Platform" jdkType="Android SDK" />
14
+    <orderEntry type="sourceFolder" forTests="false" />
15
+    <orderEntry type="library" name="Dart Packages" level="project" />
16
+    <orderEntry type="library" name="Dart SDK" level="project" />
17
+    <orderEntry type="library" name="Flutter Plugins" level="project" />
18
+  </component>
19
+</module>

+ 386
- 0
pubspec.lock Vedi File

@@ -0,0 +1,386 @@
1
+# Generated by pub
2
+# See https://www.dartlang.org/tools/pub/glossary#lockfile
3
+packages:
4
+  analyzer:
5
+    dependency: transitive
6
+    description:
7
+      name: analyzer
8
+      url: "https://pub.flutter-io.cn"
9
+    source: hosted
10
+    version: "0.32.4"
11
+  args:
12
+    dependency: transitive
13
+    description:
14
+      name: args
15
+      url: "https://pub.flutter-io.cn"
16
+    source: hosted
17
+    version: "1.5.0"
18
+  async:
19
+    dependency: transitive
20
+    description:
21
+      name: async
22
+      url: "https://pub.flutter-io.cn"
23
+    source: hosted
24
+    version: "2.0.8"
25
+  boolean_selector:
26
+    dependency: transitive
27
+    description:
28
+      name: boolean_selector
29
+      url: "https://pub.flutter-io.cn"
30
+    source: hosted
31
+    version: "1.0.4"
32
+  charcode:
33
+    dependency: transitive
34
+    description:
35
+      name: charcode
36
+      url: "https://pub.flutter-io.cn"
37
+    source: hosted
38
+    version: "1.1.2"
39
+  collection:
40
+    dependency: transitive
41
+    description:
42
+      name: collection
43
+      url: "https://pub.flutter-io.cn"
44
+    source: hosted
45
+    version: "1.14.11"
46
+  convert:
47
+    dependency: transitive
48
+    description:
49
+      name: convert
50
+      url: "https://pub.flutter-io.cn"
51
+    source: hosted
52
+    version: "2.0.2"
53
+  crypto:
54
+    dependency: transitive
55
+    description:
56
+      name: crypto
57
+      url: "https://pub.flutter-io.cn"
58
+    source: hosted
59
+    version: "2.0.6"
60
+  csslib:
61
+    dependency: transitive
62
+    description:
63
+      name: csslib
64
+      url: "https://pub.flutter-io.cn"
65
+    source: hosted
66
+    version: "0.14.5"
67
+  flutter:
68
+    dependency: "direct main"
69
+    description: flutter
70
+    source: sdk
71
+    version: "0.0.0"
72
+  flutter_test:
73
+    dependency: "direct dev"
74
+    description: flutter
75
+    source: sdk
76
+    version: "0.0.0"
77
+  front_end:
78
+    dependency: transitive
79
+    description:
80
+      name: front_end
81
+      url: "https://pub.flutter-io.cn"
82
+    source: hosted
83
+    version: "0.1.4"
84
+  glob:
85
+    dependency: transitive
86
+    description:
87
+      name: glob
88
+      url: "https://pub.flutter-io.cn"
89
+    source: hosted
90
+    version: "1.1.7"
91
+  html:
92
+    dependency: transitive
93
+    description:
94
+      name: html
95
+      url: "https://pub.flutter-io.cn"
96
+    source: hosted
97
+    version: "0.13.3+3"
98
+  http:
99
+    dependency: transitive
100
+    description:
101
+      name: http
102
+      url: "https://pub.flutter-io.cn"
103
+    source: hosted
104
+    version: "0.11.3+17"
105
+  http_multi_server:
106
+    dependency: transitive
107
+    description:
108
+      name: http_multi_server
109
+      url: "https://pub.flutter-io.cn"
110
+    source: hosted
111
+    version: "2.0.5"
112
+  http_parser:
113
+    dependency: transitive
114
+    description:
115
+      name: http_parser
116
+      url: "https://pub.flutter-io.cn"
117
+    source: hosted
118
+    version: "3.1.3"
119
+  io:
120
+    dependency: transitive
121
+    description:
122
+      name: io
123
+      url: "https://pub.flutter-io.cn"
124
+    source: hosted
125
+    version: "0.3.3"
126
+  js:
127
+    dependency: transitive
128
+    description:
129
+      name: js
130
+      url: "https://pub.flutter-io.cn"
131
+    source: hosted
132
+    version: "0.6.1+1"
133
+  json_rpc_2:
134
+    dependency: transitive
135
+    description:
136
+      name: json_rpc_2
137
+      url: "https://pub.flutter-io.cn"
138
+    source: hosted
139
+    version: "2.0.9"
140
+  kernel:
141
+    dependency: transitive
142
+    description:
143
+      name: kernel
144
+      url: "https://pub.flutter-io.cn"
145
+    source: hosted
146
+    version: "0.3.4"
147
+  logging:
148
+    dependency: transitive
149
+    description:
150
+      name: logging
151
+      url: "https://pub.flutter-io.cn"
152
+    source: hosted
153
+    version: "0.11.3+2"
154
+  matcher:
155
+    dependency: transitive
156
+    description:
157
+      name: matcher
158
+      url: "https://pub.flutter-io.cn"
159
+    source: hosted
160
+    version: "0.12.3+1"
161
+  meta:
162
+    dependency: transitive
163
+    description:
164
+      name: meta
165
+      url: "https://pub.flutter-io.cn"
166
+    source: hosted
167
+    version: "1.1.6"
168
+  mime:
169
+    dependency: transitive
170
+    description:
171
+      name: mime
172
+      url: "https://pub.flutter-io.cn"
173
+    source: hosted
174
+    version: "0.9.6+2"
175
+  multi_server_socket:
176
+    dependency: transitive
177
+    description:
178
+      name: multi_server_socket
179
+      url: "https://pub.flutter-io.cn"
180
+    source: hosted
181
+    version: "1.0.2"
182
+  node_preamble:
183
+    dependency: transitive
184
+    description:
185
+      name: node_preamble
186
+      url: "https://pub.flutter-io.cn"
187
+    source: hosted
188
+    version: "1.4.4"
189
+  package_config:
190
+    dependency: transitive
191
+    description:
192
+      name: package_config
193
+      url: "https://pub.flutter-io.cn"
194
+    source: hosted
195
+    version: "1.0.5"
196
+  package_resolver:
197
+    dependency: transitive
198
+    description:
199
+      name: package_resolver
200
+      url: "https://pub.flutter-io.cn"
201
+    source: hosted
202
+    version: "1.0.4"
203
+  path:
204
+    dependency: transitive
205
+    description:
206
+      name: path
207
+      url: "https://pub.flutter-io.cn"
208
+    source: hosted
209
+    version: "1.6.2"
210
+  photo_manager:
211
+    dependency: "direct main"
212
+    description:
213
+      path: "."
214
+      ref: HEAD
215
+      resolved-ref: "567b73d36baad10092d72bde41fc5e64e39594c5"
216
+      url: "https://github.com/CaiJingLong/flutter_photo_manager"
217
+    source: git
218
+    version: "0.0.1"
219
+  plugin:
220
+    dependency: transitive
221
+    description:
222
+      name: plugin
223
+      url: "https://pub.flutter-io.cn"
224
+    source: hosted
225
+    version: "0.2.0+3"
226
+  pool:
227
+    dependency: transitive
228
+    description:
229
+      name: pool
230
+      url: "https://pub.flutter-io.cn"
231
+    source: hosted
232
+    version: "1.3.6"
233
+  pub_semver:
234
+    dependency: transitive
235
+    description:
236
+      name: pub_semver
237
+      url: "https://pub.flutter-io.cn"
238
+    source: hosted
239
+    version: "1.4.2"
240
+  quiver:
241
+    dependency: transitive
242
+    description:
243
+      name: quiver
244
+      url: "https://pub.flutter-io.cn"
245
+    source: hosted
246
+    version: "2.0.0+1"
247
+  shelf:
248
+    dependency: transitive
249
+    description:
250
+      name: shelf
251
+      url: "https://pub.flutter-io.cn"
252
+    source: hosted
253
+    version: "0.7.3+3"
254
+  shelf_packages_handler:
255
+    dependency: transitive
256
+    description:
257
+      name: shelf_packages_handler
258
+      url: "https://pub.flutter-io.cn"
259
+    source: hosted
260
+    version: "1.0.4"
261
+  shelf_static:
262
+    dependency: transitive
263
+    description:
264
+      name: shelf_static
265
+      url: "https://pub.flutter-io.cn"
266
+    source: hosted
267
+    version: "0.2.8"
268
+  shelf_web_socket:
269
+    dependency: transitive
270
+    description:
271
+      name: shelf_web_socket
272
+      url: "https://pub.flutter-io.cn"
273
+    source: hosted
274
+    version: "0.2.2+4"
275
+  sky_engine:
276
+    dependency: transitive
277
+    description: flutter
278
+    source: sdk
279
+    version: "0.0.99"
280
+  source_map_stack_trace:
281
+    dependency: transitive
282
+    description:
283
+      name: source_map_stack_trace
284
+      url: "https://pub.flutter-io.cn"
285
+    source: hosted
286
+    version: "1.1.5"
287
+  source_maps:
288
+    dependency: transitive
289
+    description:
290
+      name: source_maps
291
+      url: "https://pub.flutter-io.cn"
292
+    source: hosted
293
+    version: "0.10.7"
294
+  source_span:
295
+    dependency: transitive
296
+    description:
297
+      name: source_span
298
+      url: "https://pub.flutter-io.cn"
299
+    source: hosted
300
+    version: "1.4.1"
301
+  stack_trace:
302
+    dependency: transitive
303
+    description:
304
+      name: stack_trace
305
+      url: "https://pub.flutter-io.cn"
306
+    source: hosted
307
+    version: "1.9.3"
308
+  stream_channel:
309
+    dependency: transitive
310
+    description:
311
+      name: stream_channel
312
+      url: "https://pub.flutter-io.cn"
313
+    source: hosted
314
+    version: "1.6.8"
315
+  string_scanner:
316
+    dependency: transitive
317
+    description:
318
+      name: string_scanner
319
+      url: "https://pub.flutter-io.cn"
320
+    source: hosted
321
+    version: "1.0.4"
322
+  term_glyph:
323
+    dependency: transitive
324
+    description:
325
+      name: term_glyph
326
+      url: "https://pub.flutter-io.cn"
327
+    source: hosted
328
+    version: "1.0.1"
329
+  test:
330
+    dependency: transitive
331
+    description:
332
+      name: test
333
+      url: "https://pub.flutter-io.cn"
334
+    source: hosted
335
+    version: "1.3.0"
336
+  typed_data:
337
+    dependency: transitive
338
+    description:
339
+      name: typed_data
340
+      url: "https://pub.flutter-io.cn"
341
+    source: hosted
342
+    version: "1.1.6"
343
+  utf:
344
+    dependency: transitive
345
+    description:
346
+      name: utf
347
+      url: "https://pub.flutter-io.cn"
348
+    source: hosted
349
+    version: "0.9.0+5"
350
+  vector_math:
351
+    dependency: transitive
352
+    description:
353
+      name: vector_math
354
+      url: "https://pub.flutter-io.cn"
355
+    source: hosted
356
+    version: "2.0.8"
357
+  vm_service_client:
358
+    dependency: transitive
359
+    description:
360
+      name: vm_service_client
361
+      url: "https://pub.flutter-io.cn"
362
+    source: hosted
363
+    version: "0.2.6"
364
+  watcher:
365
+    dependency: transitive
366
+    description:
367
+      name: watcher
368
+      url: "https://pub.flutter-io.cn"
369
+    source: hosted
370
+    version: "0.9.7+10"
371
+  web_socket_channel:
372
+    dependency: transitive
373
+    description:
374
+      name: web_socket_channel
375
+      url: "https://pub.flutter-io.cn"
376
+    source: hosted
377
+    version: "1.0.9"
378
+  yaml:
379
+    dependency: transitive
380
+    description:
381
+      name: yaml
382
+      url: "https://pub.flutter-io.cn"
383
+    source: hosted
384
+    version: "2.1.15"
385
+sdks:
386
+  dart: ">=2.0.0-dev.68.0 <3.0.0"

+ 56
- 0
pubspec.yaml Vedi File

@@ -0,0 +1,56 @@
1
+name: photo
2
+description: image picker, multi selector, if you want to build custom ui,you just use flutter_photo_manager.
3
+version: 0.0.1
4
+author: caijinglong
5
+homepage: https://github.com/CaiJingLong/flutter_photo
6
+
7
+environment:
8
+  sdk: ">=2.0.0-dev.68.0 <3.0.0"
9
+
10
+dependencies:
11
+  flutter:
12
+    sdk: flutter
13
+  photo_manager:
14
+    git:
15
+      url: https://github.com/CaiJingLong/flutter_photo_manager
16
+
17
+dev_dependencies:
18
+  flutter_test:
19
+    sdk: flutter
20
+
21
+# For information on the generic Dart part of this file, see the
22
+# following page: https://www.dartlang.org/tools/pub/pubspec
23
+
24
+# The following section is specific to Flutter.
25
+flutter:
26
+
27
+  # To add assets to your package, add an assets section, like this:
28
+  # assets:
29
+  #  - images/a_dot_burr.jpeg
30
+  #  - images/a_dot_ham.jpeg
31
+  #
32
+  # For details regarding assets in packages, see
33
+  # https://flutter.io/assets-and-images/#from-packages
34
+  #
35
+  # An image asset can refer to one or more resolution-specific "variants", see
36
+  # https://flutter.io/assets-and-images/#resolution-aware.
37
+
38
+  # To add custom fonts to your package, add a fonts section here,
39
+  # in this "flutter" section. Each entry in this list should have a
40
+  # "family" key with the font family name, and a "fonts" key with a
41
+  # list giving the asset and other descriptors for the font. For
42
+  # example:
43
+  # fonts:
44
+  #   - family: Schyler
45
+  #     fonts:
46
+  #       - asset: fonts/Schyler-Regular.ttf
47
+  #       - asset: fonts/Schyler-Italic.ttf
48
+  #         style: italic
49
+  #   - family: Trajan Pro
50
+  #     fonts:
51
+  #       - asset: fonts/TrajanPro.ttf
52
+  #       - asset: fonts/TrajanPro_Bold.ttf
53
+  #         weight: 700
54
+  #
55
+  # For details regarding fonts in packages, see
56
+  # https://flutter.io/custom-fonts/#from-packages

+ 5
- 0
test/photo_test.dart Vedi File

@@ -0,0 +1,5 @@
1
+import 'package:test/test.dart';
2
+
3
+void main() {
4
+  test('adds one to input values', () {});
5
+}