Skip to content

Commit 7e1ea00

Browse files
authored
Merge pull request #72 from firebase/feat/update-storage
feat: update storage to latest versions
2 parents 7c8fe7b + 23df120 commit 7e1ea00

File tree

8 files changed

+48
-88
lines changed

8 files changed

+48
-88
lines changed

storage/lib/app.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ import 'package:storage/src/page/home.dart';
33
import 'package:storage/src/page/library.dart';
44

55
class App extends StatelessWidget {
6-
const App({Key? key}) : super(key: key);
6+
const App({super.key});
77
// const App({Key? key, required this.camera}) : super(key: key);
88

99
@override
1010
Widget build(BuildContext context) {
1111
return MaterialApp(
1212
initialRoute: '/',
1313
routes: {
14-
'/': (context) => HomeScreen(),
14+
'/': (context) => const HomeScreen(),
1515
'/library': (context) => const LibraryPage()
1616
},
1717
);

storage/lib/main.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ void main() async {
1414
// final camera = cameras.first;
1515

1616
// runApp(App(camera: camera));
17-
runApp(App());
17+
runApp(const App());
1818
}

storage/lib/src/page/home.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ class _HomeScreenState extends State<HomeScreen> {
4545
children: [
4646
ElevatedButton(
4747
onPressed: () async {
48-
final _imageName = _image!.path.split('/').last;
48+
final imageName = _image!.path.split('/').last;
4949

5050
// create a new reference in your Firebase Cloud Storage
5151
final newImageRef =
52-
_storage.child('images/$_imageName');
52+
_storage.child('images/$imageName');
5353

5454
try {
5555
// put a file at this references location

storage/lib/src/page/library.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import 'package:flutter/material.dart';
55

66
/// Retrieving files from Firebase Storage is done in this widget
77
class LibraryPage extends StatefulWidget {
8-
const LibraryPage({Key? key}) : super(key: key);
8+
const LibraryPage({super.key});
99

1010
@override
1111
State<LibraryPage> createState() => _LibraryPageState();

storage/pubspec.lock

Lines changed: 29 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ packages:
55
dependency: transitive
66
description:
77
name: _flutterfire_internals
8-
sha256: "2f428053492f92303e42c9afa8e3a78ad1886760e7b594e2b5a6b6ee47376360"
8+
sha256: f5628cd9c92ed11083f425fd1f8f1bc60ecdda458c81d73b143aeda036c35fe7
99
url: "https://pub.dev"
1010
source: hosted
11-
version: "1.0.2"
11+
version: "1.3.16"
1212
async:
1313
dependency: transitive
1414
description:
@@ -41,22 +41,6 @@ packages:
4141
url: "https://pub.dev"
4242
source: hosted
4343
version: "1.1.1"
44-
cloud_firestore_platform_interface:
45-
dependency: transitive
46-
description:
47-
name: cloud_firestore_platform_interface
48-
sha256: d023142c18c28b2610c23c196e829c96976569cc2aa2f8e45328ae8a64c428d1
49-
url: "https://pub.dev"
50-
source: hosted
51-
version: "5.7.7"
52-
cloud_firestore_web:
53-
dependency: transitive
54-
description:
55-
name: cloud_firestore_web
56-
sha256: "3d7d4fa8c1dc5a1f7cb33985ae0ab9924d33d76d4959fe26aed84b7d282887e3"
57-
url: "https://pub.dev"
58-
source: hosted
59-
version: "2.8.10"
6044
collection:
6145
dependency: transitive
6246
description:
@@ -133,50 +117,50 @@ packages:
133117
dependency: "direct main"
134118
description:
135119
name: firebase_core
136-
sha256: "4f1d7c13a909e82ff026679c9b8493cdeb35a9c76bc46c42bf9e2240c9e57e80"
120+
sha256: "96607c0e829a581c2a483c658f04e8b159964c3bae2730f73297070bc85d40bb"
137121
url: "https://pub.dev"
138122
source: hosted
139-
version: "1.24.0"
123+
version: "2.24.2"
140124
firebase_core_platform_interface:
141125
dependency: transitive
142126
description:
143127
name: firebase_core_platform_interface
144-
sha256: b63e3be6c96ef5c33bdec1aab23c91eb00696f6452f0519401d640938c94cba2
128+
sha256: c437ae5d17e6b5cc7981cf6fd458a5db4d12979905f9aafd1fea930428a9fe63
145129
url: "https://pub.dev"
146130
source: hosted
147-
version: "4.8.0"
131+
version: "5.0.0"
148132
firebase_core_web:
149133
dependency: transitive
150134
description:
151135
name: firebase_core_web
152-
sha256: "839f1b48032a61962792cea1225fae030d4f27163867f181d6d2072dd40acbee"
136+
sha256: d585bdf3c656c3f7821ba1bd44da5f13365d22fcecaf5eb75c4295246aaa83c0
153137
url: "https://pub.dev"
154138
source: hosted
155-
version: "1.7.3"
139+
version: "2.10.0"
156140
firebase_storage:
157141
dependency: "direct main"
158142
description:
159143
name: firebase_storage
160-
sha256: "1fe46462c9632db0f62db5b9f1abcb8d4232a6d3e7098d745f5790b71dedc822"
144+
sha256: "8126e80210c0841a5b8204590b40d6b9e87cded3d342a92833f484a564dcddb3"
161145
url: "https://pub.dev"
162146
source: hosted
163-
version: "10.3.11"
147+
version: "11.5.6"
164148
firebase_storage_platform_interface:
165149
dependency: transitive
166150
description:
167151
name: firebase_storage_platform_interface
168-
sha256: a4a1bed8764baf9b6d377d9870ebb2c65e13a38bc813cfaaf0ac2a37d422bcdd
152+
sha256: "545a3a8edf337850403bb0fa03c8074a53deb87c0107d19755c77a82ce07919e"
169153
url: "https://pub.dev"
170154
source: hosted
171-
version: "4.1.19"
155+
version: "5.1.3"
172156
firebase_storage_web:
173157
dependency: transitive
174158
description:
175159
name: firebase_storage_web
176-
sha256: "791516c9170ab6643282807913cf89ebb950d66206eb92ed154a847438047587"
160+
sha256: ee6870ff79aa304b8996ba18a4aefe1e8b3fc31fd385eab6574180267aa8d393
177161
url: "https://pub.dev"
178162
source: hosted
179-
version: "3.3.9"
163+
version: "3.6.17"
180164
flutter:
181165
dependency: "direct main"
182166
description: flutter
@@ -186,10 +170,10 @@ packages:
186170
dependency: "direct dev"
187171
description:
188172
name: flutter_lints
189-
sha256: b543301ad291598523947dc534aaddc5aaad597b709d2426d3a0e0d44c5cb493
173+
sha256: e2a421b7e59244faef694ba7b30562e489c2b489866e505074eb005cd7060db7
190174
url: "https://pub.dev"
191175
source: hosted
192-
version: "1.0.4"
176+
version: "3.0.1"
193177
flutter_plugin_android_lifecycle:
194178
dependency: transitive
195179
description:
@@ -212,10 +196,10 @@ packages:
212196
dependency: transitive
213197
description:
214198
name: http
215-
sha256: "5895291c13fa8a3bd82e76d5627f69e0d85ca6a30dcac95c4ea19a5d555879c2"
199+
sha256: d4872660c46d929f6b8a9ef4e7a7eff7e49bbf0c4ec3f385ee32df5119175139
216200
url: "https://pub.dev"
217201
source: hosted
218-
version: "0.13.6"
202+
version: "1.1.2"
219203
http_parser:
220204
dependency: transitive
221205
description:
@@ -228,34 +212,34 @@ packages:
228212
dependency: "direct main"
229213
description:
230214
name: image_picker
231-
sha256: b6951e25b795d053a6ba03af5f710069c99349de9341af95155d52665cb4607c
215+
sha256: fc712337719239b0b6e41316aa133350b078fa39b6cbd706b61f3fd421b03c77
232216
url: "https://pub.dev"
233217
source: hosted
234-
version: "0.8.9"
218+
version: "1.0.5"
235219
image_picker_android:
236220
dependency: transitive
237221
description:
238222
name: image_picker_android
239-
sha256: d6a6e78821086b0b737009b09363018309bbc6de3fd88cc5c26bc2bb44a4957f
223+
sha256: ecdc963d2aa67af5195e723a40580f802d4392e31457a12a562b3e2bd6a396fe
240224
url: "https://pub.dev"
241225
source: hosted
242-
version: "0.8.8+2"
226+
version: "0.8.9+1"
243227
image_picker_for_web:
244228
dependency: transitive
245229
description:
246230
name: image_picker_for_web
247-
sha256: "869fe8a64771b7afbc99fc433a5f7be2fea4d1cb3d7c11a48b6b579eb9c797f0"
231+
sha256: "50bc9ae6a77eea3a8b11af5eb6c661eeb858fdd2f734c2a4fd17086922347ef7"
248232
url: "https://pub.dev"
249233
source: hosted
250-
version: "2.2.0"
234+
version: "3.0.1"
251235
image_picker_ios:
252236
dependency: transitive
253237
description:
254238
name: image_picker_ios
255-
sha256: "76ec722aeea419d03aa915c2c96bf5b47214b053899088c9abb4086ceecf97a7"
239+
sha256: eac0a62104fa12feed213596df0321f57ce5a572562f72a68c4ff81e9e4caacf
256240
url: "https://pub.dev"
257241
source: hosted
258-
version: "0.8.8+4"
242+
version: "0.8.9"
259243
image_picker_linux:
260244
dependency: transitive
261245
description:
@@ -300,10 +284,10 @@ packages:
300284
dependency: transitive
301285
description:
302286
name: lints
303-
sha256: a2c3d198cb5ea2e179926622d433331d8b58374ab8f29cdda6e863bd62fd369c
287+
sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290
304288
url: "https://pub.dev"
305289
source: hosted
306-
version: "1.0.1"
290+
version: "3.0.0"
307291
matcher:
308292
dependency: transitive
309293
description:
@@ -503,4 +487,4 @@ packages:
503487
version: "1.0.3"
504488
sdks:
505489
dart: ">=3.2.0 <4.0.0"
506-
flutter: ">=3.7.0"
490+
flutter: ">=3.10.0"

storage/pubspec.yaml

Lines changed: 5 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,28 @@
11
name: storage
22
description: A new Flutter project.
3+
publish_to: 'none'
34

4-
# The following line prevents the package from being accidentally published to
5-
# pub.dev using `flutter pub publish`. This is preferred for private packages.
6-
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
7-
8-
# The following defines the version and build number for your application.
9-
# A version number is three numbers separated by dots, like 1.2.43
10-
# followed by an optional build number separated by a +.
11-
# Both the version and the builder number may be overridden in flutter
12-
# build by specifying --build-name and --build-number, respectively.
13-
# In Android, build-name is used as versionName while build-number used as versionCode.
14-
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
15-
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
16-
# Read more about iOS versioning at
17-
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
185
version: 1.0.0+1
196

207
environment:
218
sdk: ">=2.17.0 <3.0.0"
229

23-
# Dependencies specify other packages that your package needs in order to work.
24-
# To automatically upgrade your package dependencies to the latest versions
25-
# consider running `flutter pub upgrade --major-versions`. Alternatively,
26-
# dependencies can be manually updated by changing the version numbers below to
27-
# the latest version available on pub.dev. To see which dependencies have newer
28-
# versions available, run `flutter pub outdated`.
2910
dependencies:
3011
flutter:
3112
sdk: flutter
3213
cupertino_icons: ^1.0.2
33-
firebase_core: ^1.17.0
34-
firebase_storage: ^10.2.16
14+
firebase_core: ^2.24.2
15+
firebase_storage: ^11.5.6
3516
path_provider: ^2.0.10
3617
path: ^1.8.1
37-
image_picker: ^0.8.5+3
18+
image_picker: ^1.0.5
3819

3920
dev_dependencies:
4021
flutter_test:
4122
sdk: flutter
4223

43-
# The "flutter_lints" package below contains a set of recommended lints to
44-
# encourage good coding practices. The lint set provided by the package is
45-
# activated in the `analysis_options.yaml` file located at the root of your
46-
# package. See that file for information about deactivating specific lint
47-
# rules and activating additional ones.
48-
flutter_lints: ^1.0.0
49-
50-
# For information on the generic Dart part of this file, see the
51-
# following page: https://dart.dev/tools/pub/pubspec
24+
flutter_lints: ^3.0.1
5225

53-
# The following section is specific to Flutter.
5426
flutter:
55-
56-
# The following line ensures that the Material Icons font is
57-
# included with your application, so that you can use the icons in
58-
# the material Icons class.
5927
uses-material-design: true
6028

storage/windows/flutter/generated_plugin_registrant.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,14 @@
77
#include "generated_plugin_registrant.h"
88

99
#include <file_selector_windows/file_selector_windows.h>
10+
#include <firebase_core/firebase_core_plugin_c_api.h>
11+
#include <firebase_storage/firebase_storage_plugin_c_api.h>
1012

1113
void RegisterPlugins(flutter::PluginRegistry* registry) {
1214
FileSelectorWindowsRegisterWithRegistrar(
1315
registry->GetRegistrarForPlugin("FileSelectorWindows"));
16+
FirebaseCorePluginCApiRegisterWithRegistrar(
17+
registry->GetRegistrarForPlugin("FirebaseCorePluginCApi"));
18+
FirebaseStoragePluginCApiRegisterWithRegistrar(
19+
registry->GetRegistrarForPlugin("FirebaseStoragePluginCApi"));
1420
}

storage/windows/flutter/generated_plugins.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
list(APPEND FLUTTER_PLUGIN_LIST
66
file_selector_windows
7+
firebase_core
8+
firebase_storage
79
)
810

911
list(APPEND FLUTTER_FFI_PLUGIN_LIST

0 commit comments

Comments
 (0)