Skip to content

Commit baa1f97

Browse files
Samples maintenance (#435)
1 parent 941ebeb commit baa1f97

File tree

94 files changed

+492
-349
lines changed

Some content is hidden

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

94 files changed

+492
-349
lines changed

add_to_app/flutter_module/pubspec.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ packages:
6363
name: espresso
6464
url: "https://pub.dartlang.org"
6565
source: hosted
66-
version: "0.0.1+4"
66+
version: "0.0.1+5"
6767
file:
6868
dependency: transitive
6969
description:
@@ -167,7 +167,7 @@ packages:
167167
name: provider
168168
url: "https://pub.dartlang.org"
169169
source: hosted
170-
version: "4.0.5"
170+
version: "4.1.0"
171171
pub_semver:
172172
dependency: transitive
173173
description:
@@ -279,5 +279,5 @@ packages:
279279
source: hosted
280280
version: "3.6.1"
281281
sdks:
282-
dart: ">=2.6.0 <3.0.0"
283-
flutter: ">=1.12.1 <2.0.0"
282+
dart: ">=2.7.0 <3.0.0"
283+
flutter: ">=1.17.0 <2.0.0"

add_to_app/flutter_module_using_plugin/pubspec.lock

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,13 @@ packages:
7979
url: "https://pub.dartlang.org"
8080
source: hosted
8181
version: "2.1.12"
82+
js:
83+
dependency: transitive
84+
description:
85+
name: js
86+
url: "https://pub.dartlang.org"
87+
source: hosted
88+
version: "0.6.1+1"
8289
matcher:
8390
dependency: transitive
8491
description:
@@ -93,6 +100,13 @@ packages:
93100
url: "https://pub.dartlang.org"
94101
source: hosted
95102
version: "1.1.8"
103+
nested:
104+
dependency: transitive
105+
description:
106+
name: nested
107+
url: "https://pub.dartlang.org"
108+
source: hosted
109+
version: "0.0.4"
96110
path:
97111
dependency: transitive
98112
description:
@@ -120,7 +134,7 @@ packages:
120134
name: provider
121135
url: "https://pub.dartlang.org"
122136
source: hosted
123-
version: "3.2.0"
137+
version: "4.1.0"
124138
quiver:
125139
dependency: transitive
126140
description:
@@ -188,14 +202,14 @@ packages:
188202
name: url_launcher
189203
url: "https://pub.dartlang.org"
190204
source: hosted
191-
version: "5.4.2"
205+
version: "5.4.5"
192206
url_launcher_macos:
193207
dependency: transitive
194208
description:
195209
name: url_launcher_macos
196210
url: "https://pub.dartlang.org"
197211
source: hosted
198-
version: "0.0.1+4"
212+
version: "0.0.1+5"
199213
url_launcher_platform_interface:
200214
dependency: transitive
201215
description:
@@ -209,7 +223,7 @@ packages:
209223
name: url_launcher_web
210224
url: "https://pub.dartlang.org"
211225
source: hosted
212-
version: "0.1.1+1"
226+
version: "0.1.1+4"
213227
vector_math:
214228
dependency: transitive
215229
description:
@@ -225,5 +239,5 @@ packages:
225239
source: hosted
226240
version: "3.6.1"
227241
sdks:
228-
dart: ">=2.6.0 <3.0.0"
229-
flutter: ">=1.12.8 <2.0.0"
242+
dart: ">=2.7.0 <3.0.0"
243+
flutter: ">=1.17.0 <2.0.0"

add_to_app/flutter_module_using_plugin/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ environment:
99
dependencies:
1010
flutter:
1111
sdk: flutter
12-
provider: ^3.1.0
12+
provider: ^4.1.0
1313
url_launcher: ^5.2.5
1414

1515
dev_dependencies:

animations/analysis_options.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
include: package:pedantic/analysis_options.1.8.0.yaml
1+
include: package:pedantic/analysis_options.1.9.0.yaml
22

33
analyzer:
44
strong-mode:

animations/lib/main.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ final allRoutes = <String, WidgetBuilder>{
128128
};
129129

130130
class AnimationSamples extends StatelessWidget {
131+
@override
131132
Widget build(BuildContext context) {
132133
return MaterialApp(
133134
title: 'Animation Samples',
@@ -141,6 +142,7 @@ class AnimationSamples extends StatelessWidget {
141142
}
142143

143144
class HomePage extends StatelessWidget {
145+
@override
144146
Widget build(BuildContext context) {
145147
final headerStyle = Theme.of(context).textTheme.headline6;
146148
return Scaffold(
@@ -164,6 +166,7 @@ class DemoTile extends StatelessWidget {
164166

165167
DemoTile(this.demo);
166168

169+
@override
167170
Widget build(BuildContext context) {
168171
return ListTile(
169172
title: Text(demo.name),

animations/lib/src/basics/01_animated_container.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Color generateColor() => Color(0xFFFFFFFF & Random().nextInt(0xFFFFFFFF));
1313
class AnimatedContainerDemo extends StatefulWidget {
1414
static String routeName = '/basics/01_animated_container';
1515

16+
@override
1617
_AnimatedContainerDemoState createState() => _AnimatedContainerDemoState();
1718
}
1819

@@ -21,6 +22,7 @@ class _AnimatedContainerDemoState extends State<AnimatedContainerDemo> {
2122
double borderRadius;
2223
double margin;
2324

25+
@override
2426
void initState() {
2527
super.initState();
2628
color = Colors.deepPurple;
@@ -36,6 +38,7 @@ class _AnimatedContainerDemoState extends State<AnimatedContainerDemo> {
3638
});
3739
}
3840

41+
@override
3942
Widget build(BuildContext context) {
4043
// This widget is built using an AnimatedContainer, one of the easiest to use
4144
// animated Widgets. Whenever the AnimatedContainer's properties, such as decoration,

animations/lib/src/basics/02_page_route_builder.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import 'package:flutter/material.dart';
77
class PageRouteBuilderDemo extends StatelessWidget {
88
static const String routeName = '/basics/page_route_builder';
99

10+
@override
1011
Widget build(BuildContext context) {
1112
return Scaffold(
1213
appBar: AppBar(),
@@ -38,6 +39,7 @@ Route _createRoute() {
3839
}
3940

4041
class _Page2 extends StatelessWidget {
42+
@override
4143
Widget build(BuildContext context) {
4244
return Scaffold(
4345
appBar: AppBar(),

animations/lib/src/basics/04_tweens.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import 'package:flutter/material.dart';
77
class TweenDemo extends StatefulWidget {
88
static const String routeName = '/basics/tweens';
99

10+
@override
1011
_TweenDemoState createState() => _TweenDemoState();
1112
}
1213

@@ -17,6 +18,7 @@ class _TweenDemoState extends State<TweenDemo>
1718
AnimationController controller;
1819
Animation<double> animation;
1920

21+
@override
2022
void initState() {
2123
super.initState();
2224

@@ -28,11 +30,13 @@ class _TweenDemoState extends State<TweenDemo>
2830
animation = Tween(begin: 0.0, end: accountBalance).animate(controller);
2931
}
3032

33+
@override
3134
void dispose() {
3235
controller.dispose();
3336
super.dispose();
3437
}
3538

39+
@override
3640
Widget build(BuildContext context) {
3741
return Scaffold(
3842
appBar: AppBar(),

animations/lib/src/basics/05_animated_builder.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import 'package:flutter/material.dart';
77
class AnimatedBuilderDemo extends StatefulWidget {
88
static const String routeName = '/basics/animated_builder';
99

10+
@override
1011
_AnimatedBuilderDemoState createState() => _AnimatedBuilderDemoState();
1112
}
1213

@@ -18,6 +19,7 @@ class _AnimatedBuilderDemoState extends State<AnimatedBuilderDemo>
1819
AnimationController controller;
1920
Animation<Color> animation;
2021

22+
@override
2123
void initState() {
2224
super.initState();
2325

@@ -26,11 +28,13 @@ class _AnimatedBuilderDemoState extends State<AnimatedBuilderDemo>
2628
ColorTween(begin: beginColor, end: endColor).animate(controller);
2729
}
2830

31+
@override
2932
void dispose() {
3033
controller.dispose();
3134
super.dispose();
3235
}
3336

37+
@override
3438
Widget build(BuildContext context) {
3539
return Scaffold(
3640
appBar: AppBar(),

animations/lib/src/basics/06_custom_tween.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ class TypewriterTween extends Tween<String> {
88
TypewriterTween({String begin = '', String end})
99
: super(begin: begin, end: end);
1010

11+
@override
1112
String lerp(double t) {
1213
var cutoff = (end.length * t).round();
1314
return end.substring(0, cutoff);
@@ -17,6 +18,7 @@ class TypewriterTween extends Tween<String> {
1718
class CustomTweenDemo extends StatefulWidget {
1819
static const String routeName = '/basics/custom_tweens';
1920

21+
@override
2022
_CustomTweenDemoState createState() => _CustomTweenDemoState();
2123
}
2224

@@ -27,18 +29,21 @@ class _CustomTweenDemoState extends State<CustomTweenDemo>
2729
AnimationController controller;
2830
Animation<String> animation;
2931

32+
@override
3033
void initState() {
3134
super.initState();
3235

3336
controller = AnimationController(vsync: this, duration: _duration);
3437
animation = TypewriterTween(end: message).animate(controller);
3538
}
3639

40+
@override
3741
void dispose() {
3842
controller.dispose();
3943
super.dispose();
4044
}
4145

46+
@override
4247
Widget build(BuildContext context) {
4348
return Scaffold(
4449
appBar: AppBar(

0 commit comments

Comments
 (0)