Skip to content

Commit 66ef091

Browse files
committed
fix packages
lots of updates including name updates for stacked many builders in provider now use create instead of builder:
1 parent 104f0ef commit 66ef091

File tree

135 files changed

+400
-322
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

135 files changed

+400
-322
lines changed

012-provider-architecture-pt2/1-start/lib/main.dart

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,16 @@ void main() {
1414
class MyApp extends StatelessWidget {
1515
@override
1616
Widget build(BuildContext context) {
17-
return StreamProvider<User>(
18-
initialData: User.initial(),
19-
builder: (context) => locator<AuthenticationService>().userController,
20-
child: MaterialApp(
21-
title: 'Flutter Demo',
22-
theme: ThemeData(),
23-
initialRoute: 'login',
24-
onGenerateRoute: Router.generateRoute,
25-
),
17+
return StreamProvider<User>(
18+
initialData: User.initial(),
19+
create: (context) =>
20+
locator<AuthenticationService>().userController.stream,
21+
child: MaterialApp(
22+
title: 'Flutter Demo',
23+
theme: ThemeData(),
24+
initialRoute: 'login',
25+
onGenerateRoute: Router.generateRoute,
26+
),
2627
);
2728
}
2829
}

012-provider-architecture-pt2/1-start/lib/ui/views/base_view.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class _BaseViewState<T extends BaseModel> extends State<BaseView<T>> {
2828
@override
2929
Widget build(BuildContext context) {
3030
return ChangeNotifierProvider<T>(
31-
builder: (context) => model,
31+
create: (context) => model,
3232
child: Consumer<T>(builder: widget.builder));
3333
}
3434
}

012-provider-architecture-pt2/1-start/pubspec.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ packages:
7373
name: get_it
7474
url: "https://pub.dartlang.org"
7575
source: hosted
76-
version: "1.0.3"
76+
version: "4.0.2"
7777
http:
7878
dependency: "direct main"
7979
description:

012-provider-architecture-pt2/1-start/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ dependencies:
2525
# Use with the CupertinoIcons class for iOS style icons.
2626
cupertino_icons: ^0.1.3
2727
provider: ^4.1.3
28-
get_it:
28+
get_it: ^4.0.2
2929
http: ^0.12.1
3030

3131
dev_dependencies:

012-provider-architecture-pt2/2-final/lib/main.dart

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,16 @@ void main() {
1414
class MyApp extends StatelessWidget {
1515
@override
1616
Widget build(BuildContext context) {
17-
return StreamProvider<User>(
18-
initialData: User.initial(),
19-
builder: (context) => locator<AuthenticationService>().userController,
20-
child: MaterialApp(
21-
title: 'Flutter Demo',
22-
theme: ThemeData(),
23-
initialRoute: 'login',
24-
onGenerateRoute: Router.generateRoute,
25-
),
17+
return StreamProvider<User>(
18+
initialData: User.initial(),
19+
create: (context) =>
20+
locator<AuthenticationService>().userController.stream,
21+
child: MaterialApp(
22+
title: 'Flutter Demo',
23+
theme: ThemeData(),
24+
initialRoute: 'login',
25+
onGenerateRoute: Router.generateRoute,
26+
),
2627
);
2728
}
2829
}

012-provider-architecture-pt2/2-final/lib/ui/views/base_view.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class _BaseViewState<T extends BaseModel> extends State<BaseView<T>> {
2828
@override
2929
Widget build(BuildContext context) {
3030
return ChangeNotifierProvider<T>(
31-
builder: (context) => model,
31+
create: (context) => model,
3232
child: Consumer<T>(builder: widget.builder));
33-
}
33+
}
3434
}

012-provider-architecture-pt2/2-final/pubspec.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ packages:
7373
name: get_it
7474
url: "https://pub.dartlang.org"
7575
source: hosted
76-
version: "1.0.3"
76+
version: "4.0.2"
7777
http:
7878
dependency: "direct main"
7979
description:

012-provider-architecture-pt2/2-final/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ dependencies:
2525
# Use with the CupertinoIcons class for iOS style icons.
2626
cupertino_icons: ^0.1.3
2727
provider: ^4.1.3
28-
get_it:
28+
get_it: ^4.0.2
2929
http: ^0.12.1
3030

3131
dev_dependencies:

013-dependency-injection/2-final/lib/main.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class MyApp extends StatelessWidget {
1313
@override
1414
Widget build(BuildContext context) {
1515
return Provider(
16-
builder: (context) => AppInfo(),
16+
create: (context) => AppInfo(),
1717
child: MaterialApp(
1818
title: 'Dependency Injection',
1919
theme: ThemeData(
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
import 'package:provider/provider.dart';
2+
import 'package:provider/single_child_widget.dart';
23
import 'package:provider_arc/core/services/authentication_service.dart';
34

45
import 'core/models/user.dart';
56
import 'core/services/api.dart';
67

7-
List<SingleChildCloneableWidget> providers = [
8+
List<SingleChildWidget> providers = [
89
...independentServices,
910
...dependentServices,
1011
...uiConsumableProviders
1112
];
1213

13-
List<SingleChildCloneableWidget> independentServices = [
14-
Provider.value(value: Api())
15-
];
14+
List<SingleChildWidget> independentServices = [Provider.value(value: Api())];
1615

17-
List<SingleChildCloneableWidget> dependentServices = [
16+
List<SingleChildWidget> dependentServices = [
1817
ProxyProvider<Api, AuthenticationService>(
19-
builder: (context, api, authenticationService) =>
18+
update: (context, api, authenticationService) =>
2019
AuthenticationService(api: api),
2120
)
2221
];
2322

24-
List<SingleChildCloneableWidget> uiConsumableProviders = [
23+
List<SingleChildWidget> uiConsumableProviders = [
2524
StreamProvider<User>(
26-
builder: (context) => Provider.of<AuthenticationService>(context, listen: false).user,
25+
create: (context) =>
26+
Provider.of<AuthenticationService>(context, listen: false).user,
2727
)
2828
];

014-provider-v3-updates/2-final/lib/ui/views/base_widget.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class _BaseWidgetState<T extends ChangeNotifier> extends State<BaseWidget<T>> {
3535
@override
3636
Widget build(BuildContext context) {
3737
return ChangeNotifierProvider<T>(
38-
builder: (context) => model,
38+
create: (context) => model,
3939
child: Consumer<T>(
4040
builder: widget.builder,
4141
child: widget.child,

021-completer_dialogs/01-start/pubspec.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ packages:
8080
name: get_it
8181
url: "https://pub.dartlang.org"
8282
source: hosted
83-
version: "1.0.3+2"
83+
version: "4.0.2"
8484
http:
8585
dependency: transitive
8686
description:

021-completer_dialogs/01-start/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ dependencies:
2727
provider: ^4.1.3
2828
rflutter_alert: ^1.0.3
2929
event_bus: ^1.1.1
30-
get_it:
30+
get_it: ^4.0.2
3131

3232
dev_dependencies:
3333
flutter_test:

021-completer_dialogs/02-manager-setup/pubspec.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ packages:
7373
name: get_it
7474
url: "https://pub.dartlang.org"
7575
source: hosted
76-
version: "1.0.3+2"
76+
version: "4.0.2"
7777
http:
7878
dependency: transitive
7979
description:

021-completer_dialogs/02-manager-setup/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ dependencies:
2626
cupertino_icons: ^0.1.3
2727
provider: ^4.1.3
2828
rflutter_alert: ^1.0.3
29-
get_it:
29+
get_it: ^4.0.2
3030

3131
dev_dependencies:
3232
flutter_test:

021-completer_dialogs/03-final/pubspec.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ packages:
7373
name: get_it
7474
url: "https://pub.dartlang.org"
7575
source: hosted
76-
version: "1.0.3+2"
76+
version: "4.0.2"
7777
http:
7878
dependency: transitive
7979
description:

021-completer_dialogs/03-final/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ dependencies:
2626
cupertino_icons: ^0.1.3
2727
provider: ^4.1.3
2828
rflutter_alert: ^1.0.3
29-
get_it:
29+
get_it: ^4.0.2
3030

3131
dev_dependencies:
3232
flutter_test:

022-lifecycle-manager/pubspec.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ packages:
7373
name: get_it
7474
url: "https://pub.dartlang.org"
7575
source: hosted
76-
version: "1.0.3+2"
76+
version: "4.0.2"
7777
http:
7878
dependency: transitive
7979
description:

022-lifecycle-manager/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ dependencies:
2424
# The following adds the Cupertino Icons font to your application.
2525
# Use with the CupertinoIcons class for iOS style icons.
2626
cupertino_icons: ^0.1.3
27-
get_it:
27+
get_it: ^4.0.2
2828

2929
dev_dependencies:
3030
flutter_test:

023-abstraction-setup-fakedata/lib/providers_setup.dart

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,17 @@ import 'package:abstraction_example/services/api/api.dart';
22
import 'package:abstraction_example/services/api/fake_api.dart';
33
import 'package:abstraction_example/services/api/http_api.dart';
44
import 'package:provider/provider.dart';
5+
import 'package:provider/single_child_widget.dart';
56

67
const bool USE_FAKE_IMPLEMENTATION = true;
78

8-
List<SingleChildCloneableWidget> provders = [
9+
List<SingleChildWidget> provders = [
910
...independentServices,
1011
...dependentServices,
1112
...uiConsumableProviders
1213
];
13-
List<SingleChildCloneableWidget> independentServices = [
14+
List<SingleChildWidget> independentServices = [
1415
Provider<Api>.value(value: USE_FAKE_IMPLEMENTATION ? FakeApi() : HttpApi())
1516
];
16-
List<SingleChildCloneableWidget> dependentServices = [];
17-
List<SingleChildCloneableWidget> uiConsumableProviders = [];
17+
List<SingleChildWidget> dependentServices = [];
18+
List<SingleChildWidget> uiConsumableProviders = [];

023-abstraction-setup-fakedata/pubspec.lock

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ packages:
7373
name: get_it
7474
url: "https://pub.dartlang.org"
7575
source: hosted
76-
version: "1.0.3+2"
76+
version: "4.0.2"
7777
http:
7878
dependency: transitive
7979
description:
@@ -102,6 +102,13 @@ packages:
102102
url: "https://pub.dartlang.org"
103103
source: hosted
104104
version: "1.1.8"
105+
nested:
106+
dependency: transitive
107+
description:
108+
name: nested
109+
url: "https://pub.dartlang.org"
110+
source: hosted
111+
version: "0.0.4"
105112
path:
106113
dependency: transitive
107114
description:
@@ -122,7 +129,7 @@ packages:
122129
name: provider
123130
url: "https://pub.dartlang.org"
124131
source: hosted
125-
version: "3.0.0+1"
132+
version: "4.1.3"
126133
sky_engine:
127134
dependency: transitive
128135
description: flutter
@@ -193,3 +200,4 @@ packages:
193200
version: "2.2.1"
194201
sdks:
195202
dart: ">=2.7.0 <3.0.0"
203+
flutter: ">=1.16.0"

023-abstraction-setup-fakedata/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ dependencies:
2424
# The following adds the Cupertino Icons font to your application.
2525
# Use with the CupertinoIcons class for iOS style icons.
2626
cupertino_icons: ^0.1.3
27-
get_it:
28-
provider:
27+
get_it: ^4.0.2
28+
provider: ^4.1.3
2929

3030
dev_dependencies:
3131
flutter_test:
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"path_provider","path":"/Users/brandonsneider/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.11/","dependencies":[]}],"android":[{"name":"path_provider","path":"/Users/brandonsneider/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.11/","dependencies":[]}],"macos":[{"name":"path_provider_macos","path":"/Users/brandonsneider/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-0.0.4+3/","dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/Users/brandonsneider/.pub-cache/hosted/pub.dartlang.org/path_provider_linux-0.0.1+1/","dependencies":[]}],"windows":[],"web":[]},"dependencyGraph":[{"name":"path_provider","dependencies":["path_provider_macos","path_provider_linux"]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_macos","dependencies":[]}],"date_created":"2020-06-18 18:03:37.413774","version":"1.20.0-0.0.pre"}
1+
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"path_provider","path":"/Users/brandonsneider/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.11/","dependencies":[]}],"android":[{"name":"path_provider","path":"/Users/brandonsneider/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.11/","dependencies":[]}],"macos":[{"name":"path_provider_macos","path":"/Users/brandonsneider/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-0.0.4+3/","dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/Users/brandonsneider/.pub-cache/hosted/pub.dartlang.org/path_provider_linux-0.0.1+1/","dependencies":[]}],"windows":[],"web":[]},"dependencyGraph":[{"name":"path_provider","dependencies":["path_provider_macos","path_provider_linux"]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_macos","dependencies":[]}],"date_created":"2020-06-18 20:21:47.515073","version":"1.20.0-0.0.pre"}

024-abstraction-unit-test/01-start-provider/lib/providers_setup.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import 'package:abstraction_unit/services/api.dart';
22
import 'package:abstraction_unit/services/localstorage_service.dart';
33
import 'package:provider/provider.dart';
4+
import 'package:provider/single_child_widget.dart';
45

5-
List<SingleChildCloneableWidget> providers = [
6+
List<SingleChildWidget> providers = [
67
Provider.value(value: LocalStorageService()),
78
Provider.value(
89
value: Api(),

024-abstraction-unit-test/01-start-provider/pubspec.lock

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,13 @@ packages:
116116
url: "https://pub.dartlang.org"
117117
source: hosted
118118
version: "1.1.8"
119+
nested:
120+
dependency: transitive
121+
description:
122+
name: nested
123+
url: "https://pub.dartlang.org"
124+
source: hosted
125+
version: "0.0.4"
119126
path:
120127
dependency: transitive
121128
description:
@@ -185,7 +192,7 @@ packages:
185192
name: provider
186193
url: "https://pub.dartlang.org"
187194
source: hosted
188-
version: "3.0.0+1"
195+
version: "4.1.3"
189196
sky_engine:
190197
dependency: transitive
191198
description: flutter
@@ -263,4 +270,4 @@ packages:
263270
version: "2.2.1"
264271
sdks:
265272
dart: ">=2.7.0 <3.0.0"
266-
flutter: ">=1.12.13+hotfix.5 <2.0.0"
273+
flutter: ">=1.16.0 <2.0.0"

024-abstraction-unit-test/01-start-provider/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ dependencies:
2525
# Use with the CupertinoIcons class for iOS style icons.
2626
cupertino_icons: ^0.1.3
2727
http:
28-
provider:
28+
provider: ^4.1.3
2929
localstorage: ^3.0.2+5
3030

3131
dev_dependencies:
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"path_provider","path":"/Users/brandonsneider/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.11/","dependencies":[]}],"android":[{"name":"path_provider","path":"/Users/brandonsneider/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.11/","dependencies":[]}],"macos":[{"name":"path_provider_macos","path":"/Users/brandonsneider/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-0.0.4+3/","dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/Users/brandonsneider/.pub-cache/hosted/pub.dartlang.org/path_provider_linux-0.0.1+1/","dependencies":[]}],"windows":[],"web":[]},"dependencyGraph":[{"name":"path_provider","dependencies":["path_provider_macos","path_provider_linux"]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_macos","dependencies":[]}],"date_created":"2020-06-18 18:03:18.587249","version":"1.20.0-0.0.pre"}
1+
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"path_provider","path":"/Users/brandonsneider/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.11/","dependencies":[]}],"android":[{"name":"path_provider","path":"/Users/brandonsneider/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.11/","dependencies":[]}],"macos":[{"name":"path_provider_macos","path":"/Users/brandonsneider/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-0.0.4+3/","dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/Users/brandonsneider/.pub-cache/hosted/pub.dartlang.org/path_provider_linux-0.0.1+1/","dependencies":[]}],"windows":[],"web":[]},"dependencyGraph":[{"name":"path_provider","dependencies":["path_provider_macos","path_provider_linux"]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_macos","dependencies":[]}],"date_created":"2020-06-18 20:22:16.095151","version":"1.20.0-0.0.pre"}

024-abstraction-unit-test/02-final-provider/lib/providers_setup.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ import 'package:abstraction_unit/services/api/http_api.dart';
33
import 'package:abstraction_unit/services/storage/localstorage_service.dart';
44
import 'package:abstraction_unit/services/storage/storage_service.dart';
55
import 'package:provider/provider.dart';
6+
import 'package:provider/single_child_widget.dart';
67

7-
List<SingleChildCloneableWidget> providers = [
8+
List<SingleChildWidget> providers = [
89
Provider<StorageService>.value(value: LocalStorageService()),
910
Provider<Api>.value(value: HttpApi())
1011
];

0 commit comments

Comments
 (0)