diff --git a/add_to_app/android_view/flutter_module_using_plugin/lib/cell.dart b/add_to_app/android_view/flutter_module_using_plugin/lib/cell.dart index ece14e22f..ff83747fe 100644 --- a/add_to_app/android_view/flutter_module_using_plugin/lib/cell.dart +++ b/add_to_app/android_view/flutter_module_using_plugin/lib/cell.dart @@ -23,7 +23,8 @@ class Cell extends StatefulWidget { class _CellState extends State with WidgetsBindingObserver { static const double gravity = 9.81; - static final AccelerometerEvent defaultPosition = AccelerometerEvent(0, 0, 0); + static final AccelerometerEvent defaultPosition = + AccelerometerEvent(0, 0, 0); int cellNumber = 0; Random? _random; @@ -82,7 +83,8 @@ class _CellState extends State with WidgetsBindingObserver { builder: (context) { return Card( // Mimic the platform Material look. - margin: const EdgeInsets.symmetric(horizontal: 36, vertical: 24), + margin: + const EdgeInsets.symmetric(horizontal: 36, vertical: 24), shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(16), ), @@ -112,22 +114,22 @@ class _CellState extends State with WidgetsBindingObserver { child: StreamBuilder( // Don't continuously rebuild for nothing when the // cell isn't visible. - stream: appLifecycleState == AppLifecycleState.resumed - ? accelerometerEventStream() - : Stream.value(defaultPosition), + stream: + appLifecycleState == AppLifecycleState.resumed + ? accelerometerEventStream() + : Stream.value(defaultPosition), initialData: defaultPosition, builder: (context, snapshot) { return Transform( // Figure out the phone's orientation relative // to gravity's direction. Ignore the z vector. - transform: - Matrix4.rotationX( - snapshot.data!.y / gravity * pi / 2, - )..multiply( - Matrix4.rotationY( - snapshot.data!.x / gravity * pi / 2, - ), + transform: Matrix4.rotationX( + snapshot.data!.y / gravity * pi / 2, + )..multiply( + Matrix4.rotationY( + snapshot.data!.x / gravity * pi / 2, ), + ), alignment: Alignment.center, child: const FlutterLogo(size: 72), ); diff --git a/add_to_app/android_view/flutter_module_using_plugin/pubspec.yaml b/add_to_app/android_view/flutter_module_using_plugin/pubspec.yaml index e90400510..f172d36f4 100644 --- a/add_to_app/android_view/flutter_module_using_plugin/pubspec.yaml +++ b/add_to_app/android_view/flutter_module_using_plugin/pubspec.yaml @@ -4,7 +4,7 @@ version: 1.0.0+1 resolution: workspace environment: - sdk: '^3.5.0' + sdk: ^3.9.0-0 dependencies: flutter: diff --git a/add_to_app/books/flutter_module_books/lib/api.dart b/add_to_app/books/flutter_module_books/lib/api.dart index 6076a41bc..7c2c2e5be 100644 --- a/add_to_app/books/flutter_module_books/lib/api.dart +++ b/add_to_app/books/flutter_module_books/lib/api.dart @@ -24,7 +24,8 @@ class Book { pigeonMap['summary'] = summary; pigeonMap['publishDate'] = publishDate; pigeonMap['pageCount'] = pageCount; - pigeonMap['thumbnail'] = thumbnail == null ? null : thumbnail!.encode(); + pigeonMap['thumbnail'] = + thumbnail == null ? null : thumbnail!.encode(); return pigeonMap; } @@ -167,9 +168,10 @@ class HostBookApi { } Future finishEditingBook(Book arg_book) async { - final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostBookApi.finishEditingBook', codec, - binaryMessenger: _binaryMessenger); + final BasicMessageChannel channel = + BasicMessageChannel( + 'dev.flutter.pigeon.HostBookApi.finishEditingBook', codec, + binaryMessenger: _binaryMessenger); final Map? replyMap = await channel.send([arg_book]) as Map?; if (replyMap == null) { diff --git a/add_to_app/books/flutter_module_books/pubspec.yaml b/add_to_app/books/flutter_module_books/pubspec.yaml index 2cd8f4d6f..01d44f08a 100644 --- a/add_to_app/books/flutter_module_books/pubspec.yaml +++ b/add_to_app/books/flutter_module_books/pubspec.yaml @@ -6,7 +6,7 @@ version: 1.0.0+1 resolution: workspace environment: - sdk: '^3.5.0' + sdk: ^3.9.0-0 dependencies: flutter: diff --git a/add_to_app/books/flutter_module_books/test/widget_test.dart b/add_to_app/books/flutter_module_books/test/widget_test.dart index 26c99317f..0dd63d0e1 100644 --- a/add_to_app/books/flutter_module_books/test/widget_test.dart +++ b/add_to_app/books/flutter_module_books/test/widget_test.dart @@ -20,7 +20,8 @@ void main() { expect(mockHostApi.cancelCalls, 1); }); - testWidgets('Pressing done calls the finish editing API', (tester) async { + testWidgets('Pressing done calls the finish editing API', + (tester) async { MockHostBookApi mockHostApi = MockHostBookApi(); await tester.pumpWidget( diff --git a/add_to_app/fullscreen/flutter_module/pubspec.yaml b/add_to_app/fullscreen/flutter_module/pubspec.yaml index 2bab790a7..9fca79121 100644 --- a/add_to_app/fullscreen/flutter_module/pubspec.yaml +++ b/add_to_app/fullscreen/flutter_module/pubspec.yaml @@ -4,7 +4,7 @@ version: 1.0.0+1 resolution: workspace environment: - sdk: '^3.5.0' + sdk: ^3.9.0-0 dependencies: flutter: diff --git a/add_to_app/multiple_flutters/multiple_flutters_module/lib/main.dart b/add_to_app/multiple_flutters/multiple_flutters_module/lib/main.dart index 07fd235f1..76b494d2f 100644 --- a/add_to_app/multiple_flutters/multiple_flutters_module/lib/main.dart +++ b/add_to_app/multiple_flutters/multiple_flutters_module/lib/main.dart @@ -82,7 +82,8 @@ class _MyHomePageState extends State { '$_counter', style: Theme.of(context).textTheme.headlineMedium, ), - TextButton(onPressed: _incrementCounter, child: const Text('Add')), + TextButton( + onPressed: _incrementCounter, child: const Text('Add')), TextButton( onPressed: () { _channel.invokeMethod("next", _counter); diff --git a/add_to_app/multiple_flutters/multiple_flutters_module/pubspec.yaml b/add_to_app/multiple_flutters/multiple_flutters_module/pubspec.yaml index 46d731dbb..0b7755f93 100644 --- a/add_to_app/multiple_flutters/multiple_flutters_module/pubspec.yaml +++ b/add_to_app/multiple_flutters/multiple_flutters_module/pubspec.yaml @@ -4,7 +4,7 @@ version: 1.0.0+1 resolution: workspace environment: - sdk: '^3.5.0' + sdk: ^3.9.0-0 dependencies: flutter: diff --git a/add_to_app/plugin/flutter_module_using_plugin/lib/cell.dart b/add_to_app/plugin/flutter_module_using_plugin/lib/cell.dart index c41f14166..e06425b23 100644 --- a/add_to_app/plugin/flutter_module_using_plugin/lib/cell.dart +++ b/add_to_app/plugin/flutter_module_using_plugin/lib/cell.dart @@ -23,7 +23,8 @@ class Cell extends StatefulWidget { class _CellState extends State with WidgetsBindingObserver { static const double gravity = 9.81; - static final AccelerometerEvent defaultPosition = AccelerometerEvent(0, 0, 0); + static final AccelerometerEvent defaultPosition = + AccelerometerEvent(0, 0, 0); int cellNumber = 0; Random? _random; @@ -82,7 +83,8 @@ class _CellState extends State with WidgetsBindingObserver { builder: (context) { return Card( // Mimic the platform Material look. - margin: const EdgeInsets.symmetric(horizontal: 36, vertical: 24), + margin: + const EdgeInsets.symmetric(horizontal: 36, vertical: 24), shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(16), ), @@ -112,24 +114,26 @@ class _CellState extends State with WidgetsBindingObserver { child: StreamBuilder( // Don't continuously rebuild for nothing when the // cell isn't visible. - stream: appLifecycleState == AppLifecycleState.resumed - ? accelerometerEventStream() - : Stream.value(defaultPosition), + stream: + appLifecycleState == AppLifecycleState.resumed + ? accelerometerEventStream() + : Stream.value(defaultPosition), initialData: defaultPosition, builder: (context, snapshot) { final data = snapshot.data; if (data == null) { - return const CircularProgressIndicator.adaptive(); + return const CircularProgressIndicator + .adaptive(); } return Transform( // Figure out the phone's orientation relative // to gravity's direction. Ignore the z vector. - transform: - Matrix4.rotationX( - data.y / gravity * pi / 2, - )..multiply( - Matrix4.rotationY(data.x / gravity * pi / 2), - ), + transform: Matrix4.rotationX( + data.y / gravity * pi / 2, + )..multiply( + Matrix4.rotationY( + data.x / gravity * pi / 2), + ), alignment: Alignment.center, child: const FlutterLogo(size: 72), ); diff --git a/add_to_app/plugin/flutter_module_using_plugin/pubspec.yaml b/add_to_app/plugin/flutter_module_using_plugin/pubspec.yaml index d40781b8a..d19f0e2e8 100644 --- a/add_to_app/plugin/flutter_module_using_plugin/pubspec.yaml +++ b/add_to_app/plugin/flutter_module_using_plugin/pubspec.yaml @@ -4,7 +4,7 @@ version: 1.0.0+1 resolution: workspace environment: - sdk: '^3.5.0' + sdk: '>=3.9.0 <4.0.0' dependencies: flutter: diff --git a/add_to_app/prebuilt_module/flutter_module/pubspec.yaml b/add_to_app/prebuilt_module/flutter_module/pubspec.yaml index 78dec1a18..829f49d47 100644 --- a/add_to_app/prebuilt_module/flutter_module/pubspec.yaml +++ b/add_to_app/prebuilt_module/flutter_module/pubspec.yaml @@ -4,7 +4,7 @@ version: 1.0.0+1 resolution: workspace environment: - sdk: '^3.5.0' + sdk: '>=3.9.0 <4.0.0' dependencies: flutter: diff --git a/analysis_defaults/pubspec.yaml b/analysis_defaults/pubspec.yaml index cace7cfc8..83aaf3c27 100644 --- a/analysis_defaults/pubspec.yaml +++ b/analysis_defaults/pubspec.yaml @@ -4,7 +4,7 @@ publish_to: none resolution: workspace environment: - sdk: '^3.5.0' + sdk: '>=3.9.0 <4.0.0' # NOTE: Code is not allowed in this package. Do not add more dependencies. # The `flutter_lints` dependency is required for `lib/flutter.yaml`. diff --git a/android_splash_screen/pubspec.yaml b/android_splash_screen/pubspec.yaml index 95f0d309a..86076bed5 100644 --- a/android_splash_screen/pubspec.yaml +++ b/android_splash_screen/pubspec.yaml @@ -5,7 +5,7 @@ version: 1.0.0+1 resolution: workspace environment: - sdk: '^3.5.0' + sdk: '>=3.9.0 <4.0.0' dependencies: flutter: diff --git a/animations/lib/main.dart b/animations/lib/main.dart index 25530594c..768d1dea2 100644 --- a/animations/lib/main.dart +++ b/animations/lib/main.dart @@ -21,7 +21,8 @@ const double windowWidth = 480; const double windowHeight = 854; void setupWindow() { - if (!kIsWeb && (Platform.isWindows || Platform.isLinux || Platform.isMacOS)) { + if (!kIsWeb && + (Platform.isWindows || Platform.isLinux || Platform.isMacOS)) { WidgetsFlutterBinding.ensureInitialized(); setWindowTitle('Animation Samples'); setWindowMinSize(const Size(windowWidth, windowHeight)); @@ -43,7 +44,8 @@ class Demo { final String route; final WidgetBuilder builder; - const Demo({required this.name, required this.route, required this.builder}); + const Demo( + {required this.name, required this.route, required this.builder}); } final basicDemos = [ diff --git a/animations/lib/src/basics/animated_builder.dart b/animations/lib/src/basics/animated_builder.dart index a64c03bff..fe9306479 100644 --- a/animations/lib/src/basics/animated_builder.dart +++ b/animations/lib/src/basics/animated_builder.dart @@ -49,7 +49,8 @@ class _AnimatedBuilderDemoState extends State animation: animation, builder: (context, child) { return ElevatedButton( - style: ElevatedButton.styleFrom(backgroundColor: animation.value), + style: ElevatedButton.styleFrom( + backgroundColor: animation.value), child: child, onPressed: () { switch (controller.status) { diff --git a/animations/lib/src/basics/animated_container.dart b/animations/lib/src/basics/animated_container.dart index 7a772a9fa..396addc3f 100644 --- a/animations/lib/src/basics/animated_container.dart +++ b/animations/lib/src/basics/animated_container.dart @@ -15,7 +15,8 @@ class AnimatedContainerDemo extends StatefulWidget { static String routeName = 'basics/animated_container'; @override - State createState() => _AnimatedContainerDemoState(); + State createState() => + _AnimatedContainerDemoState(); } class _AnimatedContainerDemoState extends State { diff --git a/animations/lib/src/basics/custom_tween.dart b/animations/lib/src/basics/custom_tween.dart index a8e1930a1..77de1792d 100644 --- a/animations/lib/src/basics/custom_tween.dart +++ b/animations/lib/src/basics/custom_tween.dart @@ -6,7 +6,7 @@ import 'package:flutter/material.dart'; class TypewriterTween extends Tween { TypewriterTween({String begin = '', String end = ''}) - : super(begin: begin, end: end); + : super(begin: begin, end: end); @override String lerp(double t) { diff --git a/animations/lib/src/basics/fade_transition.dart b/animations/lib/src/basics/fade_transition.dart index 5c4229bf0..c70646a54 100644 --- a/animations/lib/src/basics/fade_transition.dart +++ b/animations/lib/src/basics/fade_transition.dart @@ -49,14 +49,13 @@ class _FadeTransitionDemoState extends State children: [ FadeTransition( opacity: _animation, - child: const Icon(Icons.star, color: Colors.amber, size: 300), + child: + const Icon(Icons.star, color: Colors.amber, size: 300), ), ElevatedButton( child: const Text('animate'), onPressed: () => setState(() { - _controller - .animateTo(1.0) - .then( + _controller.animateTo(1.0).then( (value) => _controller.animateBack(0.0), ); }), diff --git a/animations/lib/src/basics/tween_sequence.dart b/animations/lib/src/basics/tween_sequence.dart index aaf79187e..611d2b6af 100644 --- a/animations/lib/src/basics/tween_sequence.dart +++ b/animations/lib/src/basics/tween_sequence.dart @@ -74,7 +74,8 @@ class _TweenSequenceDemoState extends State child: child, ); }, - child: const Text('Animate', style: TextStyle(color: Colors.white)), + child: + const Text('Animate', style: TextStyle(color: Colors.white)), ), ), ); diff --git a/animations/lib/src/misc/animated_list.dart b/animations/lib/src/misc/animated_list.dart index 0971959c6..df4ebab93 100644 --- a/animations/lib/src/misc/animated_list.dart +++ b/animations/lib/src/misc/animated_list.dart @@ -75,7 +75,9 @@ class _AnimatedListDemoState extends State { return Scaffold( appBar: AppBar( title: const Text('AnimatedList'), - actions: [IconButton(icon: const Icon(Icons.add), onPressed: addUser)], + actions: [ + IconButton(icon: const Icon(Icons.add), onPressed: addUser) + ], ), body: SafeArea( child: AnimatedList( diff --git a/animations/lib/src/misc/animated_positioned.dart b/animations/lib/src/misc/animated_positioned.dart index 8571ac534..cc703be05 100644 --- a/animations/lib/src/misc/animated_positioned.dart +++ b/animations/lib/src/misc/animated_positioned.dart @@ -11,7 +11,8 @@ class AnimatedPositionedDemo extends StatefulWidget { static String routeName = 'misc/animated_positioned'; @override - State createState() => _AnimatedPositionedDemoState(); + State createState() => + _AnimatedPositionedDemoState(); } class _AnimatedPositionedDemoState extends State { @@ -55,7 +56,8 @@ class _AnimatedPositionedDemoState extends State { duration: const Duration(seconds: 1), child: InkWell( onTap: () => changePosition( - size.height - (appBar.preferredSize.height + topPadding + 50), + size.height - + (appBar.preferredSize.height + topPadding + 50), size.width - 150, ), child: Container( diff --git a/animations/lib/src/misc/animated_switcher.dart b/animations/lib/src/misc/animated_switcher.dart index 96427f8d1..a7a0e8be4 100644 --- a/animations/lib/src/misc/animated_switcher.dart +++ b/animations/lib/src/misc/animated_switcher.dart @@ -9,25 +9,26 @@ import 'package:flutter/material.dart'; Color generateColor() => Color(0xFFFFFFFF & Random().nextInt(0xFFFFFFFF)); Widget generateContainer(int keyCount) => Container( - key: ValueKey(keyCount), - height: Random().nextDouble() * 200, - width: Random().nextDouble() * 200, - decoration: BoxDecoration( - color: generateColor(), - borderRadius: BorderRadius.circular(Random().nextDouble() * 100), - border: Border.all( - color: generateColor(), - width: Random().nextDouble() * 5, - ), - ), -); + key: ValueKey(keyCount), + height: Random().nextDouble() * 200, + width: Random().nextDouble() * 200, + decoration: BoxDecoration( + color: generateColor(), + borderRadius: BorderRadius.circular(Random().nextDouble() * 100), + border: Border.all( + color: generateColor(), + width: Random().nextDouble() * 5, + ), + ), + ); class AnimatedSwitcherDemo extends StatefulWidget { const AnimatedSwitcherDemo({super.key}); static String routeName = 'misc/animated_switcher'; @override - State createState() => _AnimatedSwitcherDemoState(); + State createState() => + _AnimatedSwitcherDemoState(); } class _AnimatedSwitcherDemoState extends State { diff --git a/animations/lib/src/misc/card_swipe.dart b/animations/lib/src/misc/card_swipe.dart index 7458c983c..6fa4138b5 100644 --- a/animations/lib/src/misc/card_swipe.dart +++ b/animations/lib/src/misc/card_swipe.dart @@ -174,7 +174,8 @@ class _SwipeableCardState extends State return; } - var velocity = (details.velocity.pixelsPerSecond.dx / size.width).abs(); + var velocity = + (details.velocity.pixelsPerSecond.dx / size.width).abs(); _animate(velocity: velocity); } diff --git a/animations/lib/src/misc/carousel.dart b/animations/lib/src/misc/carousel.dart index ff3e2631e..6c3d6c5e8 100644 --- a/animations/lib/src/misc/carousel.dart +++ b/animations/lib/src/misc/carousel.dart @@ -78,12 +78,16 @@ class _CarouselState extends State { }, controller: _controller, scrollBehavior: ScrollConfiguration.of(context).copyWith( - dragDevices: {ui.PointerDeviceKind.touch, ui.PointerDeviceKind.mouse}, + dragDevices: { + ui.PointerDeviceKind.touch, + ui.PointerDeviceKind.mouse + }, ), itemBuilder: (context, index) => AnimatedBuilder( animation: _controller, builder: (context, child) { - var result = _pageHasChanged ? _controller.page! : _currentPage * 1.0; + var result = + _pageHasChanged ? _controller.page! : _currentPage * 1.0; // The horizontal position of the page between a 1 and 0 var value = result - index; diff --git a/animations/lib/src/misc/curved_animation.dart b/animations/lib/src/misc/curved_animation.dart index e460653fd..dfdc6af28 100644 --- a/animations/lib/src/misc/curved_animation.dart +++ b/animations/lib/src/misc/curved_animation.dart @@ -64,19 +64,18 @@ class _CurvedAnimationDemoState extends State controller.reverse(); } }); - animationTranslation = - Tween( - begin: const Offset(-1, 0), - end: const Offset(1, 0), - ).animate(curvedAnimation) - ..addListener(() { - setState(() {}); - }) - ..addStatusListener((status) { - if (status == AnimationStatus.completed) { - controller.reverse(); - } - }); + animationTranslation = Tween( + begin: const Offset(-1, 0), + end: const Offset(1, 0), + ).animate(curvedAnimation) + ..addListener(() { + setState(() {}); + }) + ..addStatusListener((status) { + if (status == AnimationStatus.completed) { + controller.reverse(); + } + }); } @override @@ -123,7 +122,8 @@ class _CurvedAnimationDemoState extends State if (newCurve != null) { setState(() { selectedReverseCurve = newCurve; - curvedAnimation.reverseCurve = selectedReverseCurve.curve; + curvedAnimation.reverseCurve = + selectedReverseCurve.curve; }); } }, diff --git a/animations/lib/src/misc/expand_card.dart b/animations/lib/src/misc/expand_card.dart index d537d15b2..6b2aef9a6 100644 --- a/animations/lib/src/misc/expand_card.dart +++ b/animations/lib/src/misc/expand_card.dart @@ -60,16 +60,16 @@ class _ExpandCardState extends State // size layoutBuilder: (topChild, topChildKey, bottomChild, bottomChildKey) { - return Stack( - children: [ - Positioned.fill( - key: bottomChildKey, - child: bottomChild, - ), - Positioned.fill(key: topChildKey, child: topChild), - ], - ); - }, + return Stack( + children: [ + Positioned.fill( + key: bottomChildKey, + child: bottomChild, + ), + Positioned.fill(key: topChildKey, child: topChild), + ], + ); + }, firstChild: Image.asset( 'assets/eat_cape_town_sm.jpg', fit: BoxFit.cover, diff --git a/animations/lib/src/misc/flutter_animate.dart b/animations/lib/src/misc/flutter_animate.dart index c31dde47c..6cbb85bce 100644 --- a/animations/lib/src/misc/flutter_animate.dart +++ b/animations/lib/src/misc/flutter_animate.dart @@ -18,21 +18,20 @@ class FlutterAnimateDemo extends StatelessWidget { body: Center( child: Padding( padding: const EdgeInsets.all(16), - child: - Text( - "Hello Flutter Animate", - style: Theme.of(context).textTheme.headlineLarge, - ) - .animate(onPlay: (controller) => controller.repeat()) - .then(delay: 250.ms) - .fadeIn(duration: 500.ms) - .then(delay: 250.ms) - .shimmer(duration: 400.ms) - .then(delay: 250.ms) - .slide() - .then(delay: 250.ms) - .blur(duration: 500.ms) - .then(delay: 100.ms), + child: Text( + "Hello Flutter Animate", + style: Theme.of(context).textTheme.headlineLarge, + ) + .animate(onPlay: (controller) => controller.repeat()) + .then(delay: 250.ms) + .fadeIn(duration: 500.ms) + .then(delay: 250.ms) + .shimmer(duration: 400.ms) + .then(delay: 250.ms) + .slide() + .then(delay: 250.ms) + .blur(duration: 500.ms) + .then(delay: 100.ms), ), ), ); diff --git a/animations/lib/src/misc/focus_image.dart b/animations/lib/src/misc/focus_image.dart index 722de5404..0b776fc33 100644 --- a/animations/lib/src/misc/focus_image.dart +++ b/animations/lib/src/misc/focus_image.dart @@ -29,7 +29,8 @@ class Grid extends StatelessWidget { ), itemBuilder: (context, index) { return (index >= 20) - ? const SmallCard(imageAssetName: 'assets/eat_cape_town_sm.jpg') + ? const SmallCard( + imageAssetName: 'assets/eat_cape_town_sm.jpg') : const SmallCard( imageAssetName: 'assets/eat_new_orleans_sm.jpg', ); @@ -50,7 +51,9 @@ Route _createRoute(BuildContext parentContext, String image) { ).chain(CurveTween(curve: Curves.ease)).animate(animation); return Stack( - children: [PositionedTransition(rect: rectAnimation, child: child)], + children: [ + PositionedTransition(rect: rectAnimation, child: child) + ], ); }, ); diff --git a/animations/lib/src/misc/hero_animation.dart b/animations/lib/src/misc/hero_animation.dart index ff96e5b33..cf64c17cc 100644 --- a/animations/lib/src/misc/hero_animation.dart +++ b/animations/lib/src/misc/hero_animation.dart @@ -15,11 +15,13 @@ class HeroAnimationDemo extends StatelessWidget { body: GestureDetector( child: Hero( tag: 'hero-page-child', - child: _createHeroContainer(size: 50.0, color: Colors.grey.shade300), + child: _createHeroContainer( + size: 50.0, color: Colors.grey.shade300), ), onTap: () => Navigator.of( context, - ).push(MaterialPageRoute(builder: (context) => const HeroPage())), + ).push( + MaterialPageRoute(builder: (context) => const HeroPage())), ), ); } @@ -51,7 +53,9 @@ StatelessWidget _createHeroContainer({ height: size, width: size, padding: const EdgeInsets.all(10.0), - margin: size < 100.0 ? const EdgeInsets.all(10.0) : const EdgeInsets.all(0), + margin: size < 100.0 + ? const EdgeInsets.all(10.0) + : const EdgeInsets.all(0), decoration: BoxDecoration(shape: BoxShape.circle, color: color), child: const FlutterLogo(), ); diff --git a/animations/lib/src/misc/physics_card_drag.dart b/animations/lib/src/misc/physics_card_drag.dart index 7e30bc5d4..d59cfe464 100644 --- a/animations/lib/src/misc/physics_card_drag.dart +++ b/animations/lib/src/misc/physics_card_drag.dart @@ -78,7 +78,8 @@ class _DraggableCardState extends State void initState() { super.initState(); _controller = AnimationController.unbounded(vsync: this) - ..addListener(() => setState(() => _dragAlignment = _animation.value)); + ..addListener( + () => setState(() => _dragAlignment = _animation.value)); } @override diff --git a/animations/lib/src/misc/repeating_animation.dart b/animations/lib/src/misc/repeating_animation.dart index bc0b97808..2f1a21527 100644 --- a/animations/lib/src/misc/repeating_animation.dart +++ b/animations/lib/src/misc/repeating_animation.dart @@ -9,7 +9,8 @@ class RepeatingAnimationDemo extends StatefulWidget { static String routeName = 'misc/repeating_animation'; @override - State createState() => _RepeatingAnimationDemoState(); + State createState() => + _RepeatingAnimationDemoState(); } class _RepeatingAnimationDemoState extends State diff --git a/animations/pubspec.yaml b/animations/pubspec.yaml index e714bf417..3e4c2a270 100644 --- a/animations/pubspec.yaml +++ b/animations/pubspec.yaml @@ -5,7 +5,7 @@ publish_to: none resolution: workspace environment: - sdk: '^3.5.0' + sdk: '>=3.9.0 <4.0.0' dependencies: flutter: diff --git a/animations/test/basics/animated_builder_test.dart b/animations/test/basics/animated_builder_test.dart index bdab93511..1ca3809b8 100644 --- a/animations/test/basics/animated_builder_test.dart +++ b/animations/test/basics/animated_builder_test.dart @@ -16,7 +16,8 @@ void main() { // Get the initial color of the button. ElevatedButton button = tester.widget(find.byType(ElevatedButton)); - WidgetStateProperty? initialColor = button.style!.backgroundColor; + WidgetStateProperty? initialColor = + button.style!.backgroundColor; // Tap the button. await tester.tap(find.byType(ElevatedButton)); @@ -24,7 +25,8 @@ void main() { // Get the updated color of the button. button = tester.widget(find.byType(ElevatedButton)); - WidgetStateProperty? updatedColor = button.style!.backgroundColor; + WidgetStateProperty? updatedColor = + button.style!.backgroundColor; // Check if the color has changed. expect(initialColor, isNot(updatedColor)); @@ -35,7 +37,8 @@ void main() { // Get the initial color of the button. ElevatedButton button = tester.widget(find.byType(ElevatedButton)); - WidgetStateProperty? initialColor = button.style!.backgroundColor; + WidgetStateProperty? initialColor = + button.style!.backgroundColor; // Tap the button to trigger the animation but don't wait for it to finish. await tester.tap(find.byType(ElevatedButton)); @@ -44,7 +47,8 @@ void main() { // Check that the color has changed but not to the final color. button = tester.widget(find.byType(ElevatedButton)); - WidgetStateProperty? changedColor = button.style!.backgroundColor; + WidgetStateProperty? changedColor = + button.style!.backgroundColor; expect(initialColor, isNot(changedColor)); // Wait for the animation to finish. @@ -52,7 +56,8 @@ void main() { // Check that the color has changed to the final color. button = tester.widget(find.byType(ElevatedButton)); - WidgetStateProperty? finalColor = button.style!.backgroundColor; + WidgetStateProperty? finalColor = + button.style!.backgroundColor; expect(changedColor, isNot(finalColor)); }); }); diff --git a/animations/test/misc/animated_list_test.dart b/animations/test/misc/animated_list_test.dart index bc03fca99..200a74207 100644 --- a/animations/test/misc/animated_list_test.dart +++ b/animations/test/misc/animated_list_test.dart @@ -46,7 +46,8 @@ void main() { await tester.pumpWidget(createAnimatedListDemoScreen()); // Get the initial length of list. - var initialLength = tester.widgetList(find.byType(ListTile)).length; + var initialLength = + tester.widgetList(find.byType(ListTile)).length; // Tap on the Delete Icon Button at middle index. await tester.tap(find.byIcon(Icons.delete).at(initialLength ~/ 2)); @@ -66,7 +67,8 @@ void main() { await tester.pumpWidget(createAnimatedListDemoScreen()); // Get the initial length of list. - var initialLength = tester.widgetList(find.byType(ListTile)).length; + var initialLength = + tester.widgetList(find.byType(ListTile)).length; // Tap on the Delete Icon Button at start index. await tester.tap(find.byIcon(Icons.delete).at(0)); @@ -86,7 +88,8 @@ void main() { await tester.pumpWidget(createAnimatedListDemoScreen()); // Get the initial length of list. - var initialLength = tester.widgetList(find.byType(ListTile)).length; + var initialLength = + tester.widgetList(find.byType(ListTile)).length; // Tap on the Delete Icon Button at end index. await tester.tap(find.byIcon(Icons.delete).at(initialLength - 1)); diff --git a/animations/test/misc/card_swipe_test.dart b/animations/test/misc/card_swipe_test.dart index 85536c021..f701fdbb2 100644 --- a/animations/test/misc/card_swipe_test.dart +++ b/animations/test/misc/card_swipe_test.dart @@ -24,7 +24,8 @@ void main() { await tester.pumpAndSettle(); // Check if removed properly. - expect(tester.widgetList(find.byType(Card)).length, lessThan(totalCards)); + expect(tester.widgetList(find.byType(Card)).length, + lessThan(totalCards)); }); testWidgets('All cards swiped out', (tester) async { @@ -36,7 +37,8 @@ void main() { // Swipe out all cards. for (var i = 0; i < totalCards; i++) { // Swipe out one by one. - await tester.drag(find.byType(Card).last, const Offset(100.0, 0.0)); + await tester.drag( + find.byType(Card).last, const Offset(100.0, 0.0)); await tester.pumpAndSettle(); } diff --git a/animations/test/misc/carousel_test.dart b/animations/test/misc/carousel_test.dart index b1fb6bb59..eb1c9429a 100644 --- a/animations/test/misc/carousel_test.dart +++ b/animations/test/misc/carousel_test.dart @@ -18,7 +18,8 @@ void main() { expect(imageList.length, 2); // Swipe the Carousel. - await tester.fling(find.byType(CarouselDemo), const Offset(-400, 0), 800); + await tester.fling( + find.byType(CarouselDemo), const Offset(-400, 0), 800); await tester.pumpAndSettle(); // Get the images available on the screen after swipe. diff --git a/animations/test/misc/expand_card_test.dart b/animations/test/misc/expand_card_test.dart index d37ab0ae9..708150452 100644 --- a/animations/test/misc/expand_card_test.dart +++ b/animations/test/misc/expand_card_test.dart @@ -6,7 +6,8 @@ import 'package:animations/src/misc/expand_card.dart'; import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -Widget createExpandCardScreen() => const MaterialApp(home: ExpandCardDemo()); +Widget createExpandCardScreen() => + const MaterialApp(home: ExpandCardDemo()); void main() { group('ExpandCard Tests', () { @@ -22,7 +23,8 @@ void main() { // The size of ExpandCard must change once tapped. // The initialSize should be less than current ExpandCard size. - expect(initialSize, lessThan(tester.getSize(find.byType(ExpandCard)))); + expect( + initialSize, lessThan(tester.getSize(find.byType(ExpandCard)))); }); testWidgets('ExpandCard changes image on tap', (tester) async { diff --git a/animations/test/misc/focus_image_test.dart b/animations/test/misc/focus_image_test.dart index a65fc9e02..a942636f4 100644 --- a/animations/test/misc/focus_image_test.dart +++ b/animations/test/misc/focus_image_test.dart @@ -6,7 +6,8 @@ import 'package:animations/src/misc/focus_image.dart'; import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -Widget createFocusImageScreen() => const MaterialApp(home: FocusImageDemo()); +Widget createFocusImageScreen() => + const MaterialApp(home: FocusImageDemo()); void main() { group('FocusImage Tests', () { @@ -33,7 +34,8 @@ void main() { expect(finalSize, greaterThan(initialSize)); }); - testWidgets('Final inkwell on tap goes back to the grid', (tester) async { + testWidgets('Final inkwell on tap goes back to the grid', + (tester) async { await tester.pumpWidget(createFocusImageScreen()); // Tap on the ink well at index 0. diff --git a/animations/test/misc/hero_animation_test.dart b/animations/test/misc/hero_animation_test.dart index c006cdddd..14e11e3ad 100644 --- a/animations/test/misc/hero_animation_test.dart +++ b/animations/test/misc/hero_animation_test.dart @@ -58,7 +58,8 @@ void main() { // Final color should not be same as initial color. expect( (finalContainer.decoration as BoxDecoration).color, - isNot(equals((initialContainer.decoration as BoxDecoration).color)), + isNot( + equals((initialContainer.decoration as BoxDecoration).color)), ); }); @@ -66,7 +67,8 @@ void main() { await tester.pumpWidget(createHeroAnimationDemoScreen()); // Get the initial Screen. - final initialScreen = tester.firstWidget(find.byType(HeroAnimationDemo)); + final initialScreen = + tester.firstWidget(find.byType(HeroAnimationDemo)); // Tap on the GestureDetector. await tester.tap(find.byType(GestureDetector)); diff --git a/asset_transformation/grayscale_transformer/pubspec.yaml b/asset_transformation/grayscale_transformer/pubspec.yaml index acdba28cf..27153b02e 100644 --- a/asset_transformation/grayscale_transformer/pubspec.yaml +++ b/asset_transformation/grayscale_transformer/pubspec.yaml @@ -3,7 +3,7 @@ description: A sample command-line application. version: 1.0.0 environment: - sdk: '>=3.9.0-0 <4.0.0' + sdk: ^3.9.0-0 dependencies: args: ^2.4.2 diff --git a/asset_transformation/pubspec.yaml b/asset_transformation/pubspec.yaml index d50e17968..ac0d336a0 100644 --- a/asset_transformation/pubspec.yaml +++ b/asset_transformation/pubspec.yaml @@ -5,7 +5,7 @@ version: 0.1.0 resolution: workspace environment: - sdk: '^3.5.0' + sdk: '>=3.9.0 <4.0.0' dependencies: flutter: diff --git a/background_isolate_channels/lib/main.dart b/background_isolate_channels/lib/main.dart index a0c874e34..820441839 100644 --- a/background_isolate_channels/lib/main.dart +++ b/background_isolate_channels/lib/main.dart @@ -65,12 +65,12 @@ class _MyHomePageState extends State { // Write the value to [SharedPreferences] which will get read on the // [SimpleDatabase]'s isolate. For this example the value is always true // just for demonstration purposes. - final Future sharedPreferencesSet = SharedPreferences.getInstance() - .then( - (sharedPreferences) => sharedPreferences.setBool('isDebug', true), - ); - final Future tempDirFuture = path_provider - .getTemporaryDirectory(); + final Future sharedPreferencesSet = + SharedPreferences.getInstance().then( + (sharedPreferences) => sharedPreferences.setBool('isDebug', true), + ); + final Future tempDirFuture = + path_provider.getTemporaryDirectory(); // Wait until the [SharedPreferences] value is set and the temporary // directory is received before opening the database. If diff --git a/background_isolate_channels/lib/simple_database.dart b/background_isolate_channels/lib/simple_database.dart index f53e14954..b432131b8 100644 --- a/background_isolate_channels/lib/simple_database.dart +++ b/background_isolate_channels/lib/simple_database.dart @@ -181,14 +181,16 @@ class _SimpleDatabaseServer { // obtained on the root isolate and passed into the background isolate via // a [SendPort]. // ---------------------------------------------------------------------- - RootIsolateToken rootIsolateToken = command.arg1 as RootIsolateToken; + RootIsolateToken rootIsolateToken = + command.arg1 as RootIsolateToken; // ---------------------------------------------------------------------- // [BackgroundIsolateBinaryMessenger.ensureInitialized] for each // background isolate that will use plugins. This sets up the // [BinaryMessenger] that the Platform Channels will communicate with on // the background isolate. // ---------------------------------------------------------------------- - BackgroundIsolateBinaryMessenger.ensureInitialized(rootIsolateToken); + BackgroundIsolateBinaryMessenger.ensureInitialized( + rootIsolateToken); _sendPort.send(const _Command(_Codes.ack, arg0: null)); case _Codes.add: _doAddEntry(command.arg0 as String); diff --git a/background_isolate_channels/pubspec.yaml b/background_isolate_channels/pubspec.yaml index ca8d07acc..213669637 100644 --- a/background_isolate_channels/pubspec.yaml +++ b/background_isolate_channels/pubspec.yaml @@ -7,7 +7,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 1.0.0+1 environment: - sdk: '^3.5.0' + sdk: '>=3.9.0 <4.0.0' dependencies: cupertino_icons: ^1.0.2 diff --git a/code_sharing/client/pubspec.yaml b/code_sharing/client/pubspec.yaml index 3bdf2d564..7281f9033 100644 --- a/code_sharing/client/pubspec.yaml +++ b/code_sharing/client/pubspec.yaml @@ -5,7 +5,7 @@ version: 1.0.0+1 resolution: workspace environment: - sdk: '^3.5.0' + sdk: '>=3.9.0 <4.0.0' dependencies: cupertino_icons: ^1.0.2 diff --git a/code_sharing/server/pubspec.yaml b/code_sharing/server/pubspec.yaml index 763ff315e..db505129c 100644 --- a/code_sharing/server/pubspec.yaml +++ b/code_sharing/server/pubspec.yaml @@ -5,7 +5,7 @@ publish_to: "none" resolution: workspace environment: - sdk: '^3.5.0' + sdk: '>=3.9.0 <4.0.0' dependencies: args: ^2.0.0 diff --git a/code_sharing/shared/pubspec.yaml b/code_sharing/shared/pubspec.yaml index 1bace6530..78c9ea6bf 100644 --- a/code_sharing/shared/pubspec.yaml +++ b/code_sharing/shared/pubspec.yaml @@ -4,7 +4,7 @@ version: 1.0.0 resolution: workspace environment: - sdk: '^3.5.0' + sdk: '>=3.9.0 <4.0.0' dependencies: freezed_annotation: ">=2.1.0 <4.0.0" diff --git a/compass_app/app/pubspec.yaml b/compass_app/app/pubspec.yaml index d93c56be2..f444483e5 100644 --- a/compass_app/app/pubspec.yaml +++ b/compass_app/app/pubspec.yaml @@ -5,7 +5,7 @@ publish_to: none version: 0.1.0 environment: - sdk: '>=3.9.0-0 <4.0.0' + sdk: ^3.9.0-0 dependencies: cached_network_image: ^3.4.1 diff --git a/compass_app/server/pubspec.yaml b/compass_app/server/pubspec.yaml index cadb9be52..b0047f665 100644 --- a/compass_app/server/pubspec.yaml +++ b/compass_app/server/pubspec.yaml @@ -4,7 +4,7 @@ publish_to: 'none' version: 1.0.0 environment: - sdk: '>=3.9.0-0 <4.0.0' + sdk: ^3.9.0-0 dependencies: args: ^2.4.0 diff --git a/context_menus/pubspec.yaml b/context_menus/pubspec.yaml index bdb370fbb..404ceed77 100644 --- a/context_menus/pubspec.yaml +++ b/context_menus/pubspec.yaml @@ -22,7 +22,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev environment: - sdk: '^3.5.0' + sdk: '>=3.9.0 <4.0.0' # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions diff --git a/date_planner/pubspec.yaml b/date_planner/pubspec.yaml index 8346ed09b..3761b3207 100644 --- a/date_planner/pubspec.yaml +++ b/date_planner/pubspec.yaml @@ -5,7 +5,7 @@ version: 0.1.0 resolution: workspace environment: - sdk: '^3.5.0' + sdk: '>=3.9.0 <4.0.0' dependencies: flutter: diff --git a/deeplink_store_example/pubspec.yaml b/deeplink_store_example/pubspec.yaml index 7e9d529e2..85c4f2674 100644 --- a/deeplink_store_example/pubspec.yaml +++ b/deeplink_store_example/pubspec.yaml @@ -22,7 +22,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev environment: - sdk: '^3.5.0' + sdk: '>=3.9.0 <4.0.0' # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions diff --git a/desktop_photo_search/fluent_ui/pubspec.yaml b/desktop_photo_search/fluent_ui/pubspec.yaml index 56b4a7e1b..68380112e 100644 --- a/desktop_photo_search/fluent_ui/pubspec.yaml +++ b/desktop_photo_search/fluent_ui/pubspec.yaml @@ -5,7 +5,7 @@ version: 1.0.0+1 resolution: workspace environment: - sdk: '^3.5.0' + sdk: '>=3.9.0 <4.0.0' dependencies: built_collection: ^5.1.1 diff --git a/desktop_photo_search/material/pubspec.yaml b/desktop_photo_search/material/pubspec.yaml index f8e410a41..764c487a8 100644 --- a/desktop_photo_search/material/pubspec.yaml +++ b/desktop_photo_search/material/pubspec.yaml @@ -5,7 +5,7 @@ version: 1.0.0+1 resolution: workspace environment: - sdk: '^3.5.0' + sdk: '>=3.9.0 <4.0.0' dependencies: built_collection: ^5.1.1 diff --git a/dynamic_theme/pubspec.yaml b/dynamic_theme/pubspec.yaml index ad18b9961..57ded5c2d 100644 --- a/dynamic_theme/pubspec.yaml +++ b/dynamic_theme/pubspec.yaml @@ -4,7 +4,7 @@ publish_to: 'none' version: 1.0.0+1 resolution: workspace environment: - sdk: '^3.5.0' + sdk: '>=3.9.0 <4.0.0' dependencies: flutter: diff --git a/form_app/pubspec.yaml b/form_app/pubspec.yaml index 8c9ed12ec..90339a99c 100644 --- a/form_app/pubspec.yaml +++ b/form_app/pubspec.yaml @@ -5,7 +5,7 @@ version: 1.0.0+1 resolution: workspace environment: - sdk: '^3.5.0' + sdk: '>=3.9.0 <4.0.0' dependencies: flutter: diff --git a/game_template/pubspec.yaml b/game_template/pubspec.yaml index e0bbf5535..9ab34a25b 100644 --- a/game_template/pubspec.yaml +++ b/game_template/pubspec.yaml @@ -8,7 +8,7 @@ publish_to: 'none' environment: - sdk: '^3.5.0' + sdk: '>=3.9.0 <4.0.0' dependencies: flutter: diff --git a/gemini_tasks/pubspec.yaml b/gemini_tasks/pubspec.yaml index 88509d39a..f320d20d3 100644 --- a/gemini_tasks/pubspec.yaml +++ b/gemini_tasks/pubspec.yaml @@ -4,7 +4,7 @@ publish_to: 'none' version: 1.0.0+1 resolution: workspace environment: - sdk: '^3.5.0' + sdk: '>=3.9.0 <4.0.0' dependencies: flutter: diff --git a/google_maps/pubspec.yaml b/google_maps/pubspec.yaml index 9a6c395c5..05fac4bc8 100644 --- a/google_maps/pubspec.yaml +++ b/google_maps/pubspec.yaml @@ -5,7 +5,7 @@ publish_to: 'none' version: 1.0.0+1 environment: - sdk: '^3.5.0' + sdk: '>=3.9.0 <4.0.0' dependencies: flutter: diff --git a/infinite_list/pubspec.yaml b/infinite_list/pubspec.yaml index 33d1a1e22..1f01bd24f 100644 --- a/infinite_list/pubspec.yaml +++ b/infinite_list/pubspec.yaml @@ -6,7 +6,7 @@ resolution: workspace version: 1.0.0+1 environment: - sdk: '^3.5.0' + sdk: '>=3.9.0 <4.0.0' dependencies: flutter: diff --git a/ios_app_clip/pubspec.yaml b/ios_app_clip/pubspec.yaml index 59b18bd55..a4cece424 100644 --- a/ios_app_clip/pubspec.yaml +++ b/ios_app_clip/pubspec.yaml @@ -5,7 +5,7 @@ version: 1.0.0+1 resolution: workspace environment: - sdk: '^3.5.0' + sdk: '>=3.9.0 <4.0.0' dependencies: flutter: diff --git a/isolate_example/pubspec.yaml b/isolate_example/pubspec.yaml index 20a414d53..22b534a06 100644 --- a/isolate_example/pubspec.yaml +++ b/isolate_example/pubspec.yaml @@ -5,7 +5,7 @@ publish_to: none resolution: workspace environment: - sdk: '^3.5.0' + sdk: '>=3.9.0 <4.0.0' dependencies: flutter: diff --git a/material_3_demo/pubspec.yaml b/material_3_demo/pubspec.yaml index 59c024332..44034159e 100644 --- a/material_3_demo/pubspec.yaml +++ b/material_3_demo/pubspec.yaml @@ -7,7 +7,7 @@ version: 1.0.0+1 resolution: workspace environment: - sdk: '^3.5.0' + sdk: '>=3.9.0 <4.0.0' dependencies: flutter: diff --git a/navigation_and_routing/pubspec.yaml b/navigation_and_routing/pubspec.yaml index 0d4cf59cc..d4ac5ad0b 100644 --- a/navigation_and_routing/pubspec.yaml +++ b/navigation_and_routing/pubspec.yaml @@ -5,7 +5,7 @@ version: 1.0.0+1 resolution: workspace environment: - sdk: '^3.5.0' + sdk: '>=3.9.0 <4.0.0' dependencies: adaptive_navigation: ^0.0.3 diff --git a/pedometer/example/pubspec.yaml b/pedometer/example/pubspec.yaml index 5d95e3ce4..c3e76600e 100644 --- a/pedometer/example/pubspec.yaml +++ b/pedometer/example/pubspec.yaml @@ -22,7 +22,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev environment: - sdk: '^3.5.0' + sdk: '>=3.9.0 <4.0.0' # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions diff --git a/pedometer/pubspec.yaml b/pedometer/pubspec.yaml index 2d72db684..b69af4d9b 100644 --- a/pedometer/pubspec.yaml +++ b/pedometer/pubspec.yaml @@ -5,7 +5,7 @@ publish_to: none resolution: workspace environment: - sdk: '^3.5.0' + sdk: '>=3.9.0 <4.0.0' dependencies: flutter: diff --git a/place_tracker/pubspec.yaml b/place_tracker/pubspec.yaml index 32577d4fb..60c3f0181 100644 --- a/place_tracker/pubspec.yaml +++ b/place_tracker/pubspec.yaml @@ -4,7 +4,7 @@ version: 1.0.0+1 resolution: workspace environment: - sdk: '^3.5.0' + sdk: '>=3.9.0 <4.0.0' dependencies: flutter: diff --git a/platform_channels/pubspec.yaml b/platform_channels/pubspec.yaml index 4582b0d9b..a0224fe4f 100644 --- a/platform_channels/pubspec.yaml +++ b/platform_channels/pubspec.yaml @@ -4,7 +4,7 @@ version: 1.0.0+1 resolution: workspace environment: - sdk: '^3.5.0' + sdk: '>=3.9.0 <4.0.0' dependencies: flutter: diff --git a/platform_design/pubspec.yaml b/platform_design/pubspec.yaml index f5527ed3d..15a645350 100644 --- a/platform_design/pubspec.yaml +++ b/platform_design/pubspec.yaml @@ -4,7 +4,7 @@ version: 1.0.0+1 resolution: workspace environment: - sdk: '^3.5.0' + sdk: '>=3.9.0 <4.0.0' dependencies: english_words: ^4.0.0 diff --git a/platform_view_swift/pubspec.yaml b/platform_view_swift/pubspec.yaml index d2136a0f8..da7fecab2 100644 --- a/platform_view_swift/pubspec.yaml +++ b/platform_view_swift/pubspec.yaml @@ -4,7 +4,7 @@ version: 1.0.0+1 resolution: workspace environment: - sdk: '^3.5.0' + sdk: '>=3.9.0 <4.0.0' dependencies: flutter: diff --git a/provider_counter/pubspec.yaml b/provider_counter/pubspec.yaml index 7c3b5887a..ad0bfccf5 100644 --- a/provider_counter/pubspec.yaml +++ b/provider_counter/pubspec.yaml @@ -6,7 +6,7 @@ version: 1.0.0 resolution: workspace environment: - sdk: '^3.5.0' + sdk: '>=3.9.0 <4.0.0' dependencies: flutter: diff --git a/provider_shopper/pubspec.yaml b/provider_shopper/pubspec.yaml index c5b3d0f9a..f9d5dff81 100644 --- a/provider_shopper/pubspec.yaml +++ b/provider_shopper/pubspec.yaml @@ -5,7 +5,7 @@ version: 1.0.0+1 resolution: workspace environment: - sdk: '^3.5.0' + sdk: '>=3.9.0 <4.0.0' dependencies: flutter: diff --git a/pubspec.yaml b/pubspec.yaml index 98f54c35b..e67c130f8 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -2,7 +2,7 @@ name: samples description: A collection of samples for Dart and Flutter. environment: - sdk: '^3.5.0' + sdk: ^3.9.0-0 workspace: - add_to_app/android_view/flutter_module_using_plugin diff --git a/simple_shader/pubspec.yaml b/simple_shader/pubspec.yaml index ac2f7ab21..dcf1b6a57 100644 --- a/simple_shader/pubspec.yaml +++ b/simple_shader/pubspec.yaml @@ -5,7 +5,7 @@ version: 1.0.0+1 resolution: workspace environment: - sdk: '^3.5.0' + sdk: '>=3.9.0 <4.0.0' dependencies: flutter: diff --git a/simplistic_calculator/pubspec.yaml b/simplistic_calculator/pubspec.yaml index 24e1ae134..a387b4170 100644 --- a/simplistic_calculator/pubspec.yaml +++ b/simplistic_calculator/pubspec.yaml @@ -5,7 +5,7 @@ version: 1.0.0+1 resolution: workspace environment: - sdk: '^3.5.0' + sdk: '>=3.9.0 <4.0.0' dependencies: auto_size_text: ^3.0.0 diff --git a/simplistic_editor/pubspec.yaml b/simplistic_editor/pubspec.yaml index 19b21d9eb..6450d124d 100644 --- a/simplistic_editor/pubspec.yaml +++ b/simplistic_editor/pubspec.yaml @@ -20,7 +20,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev environment: - sdk: '^3.5.0' + sdk: '>=3.9.0 <4.0.0' # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions diff --git a/testing_app/pubspec.yaml b/testing_app/pubspec.yaml index 674ed5454..6eaa06fbd 100644 --- a/testing_app/pubspec.yaml +++ b/testing_app/pubspec.yaml @@ -4,7 +4,7 @@ version: 1.0.0+1 resolution: workspace environment: - sdk: '^3.5.0' + sdk: '>=3.9.0 <4.0.0' dependencies: flutter: diff --git a/tool/pubspec.yaml b/tool/pubspec.yaml index 86c792cce..1dee2fe25 100644 --- a/tool/pubspec.yaml +++ b/tool/pubspec.yaml @@ -1,7 +1,7 @@ name: release_cleaner description: A tool to automate release cleanup for the samples monorepo. environment: - sdk: '>=3.0.0 <4.0.0' + sdk: '>=3.9.0 <4.0.0' dependencies: args: ^2.4.2 diff --git a/tool/release.dart b/tool/release.dart index 0f1776b0c..3ecbd8ed0 100644 --- a/tool/release.dart +++ b/tool/release.dart @@ -91,14 +91,14 @@ void setupLogging() { logsDir.createSync(recursive: true); } final timestamp = DateTime.now().toIso8601String().replaceAll(':', '-'); - _logFile = File(p.join(logDir, 'flutter_update_$timestamp.log')); + _logFile = File(p.join(logDir, 'release_logs_$timestamp.log')); } void log(String? message, IOSink sink) { if (message == null) return; sink.writeln(message); _logFile.writeAsStringSync( - '${overrideAnsiOutput(false, () => message)}\n', + resetAll.wrap('$message\n')!, mode: FileMode.append, ); } @@ -207,9 +207,7 @@ Future updateSdkConstraints( } try { - final version = Version.parse(versionString); - final nextMajor = version.major + 1; - final newConstraint = "'>=${version} <$nextMajor.0.0'"; + final newConstraint = '^${versionString}-0'; final content = await pubspecFile.readAsString(); final editor = YamlEditor(content); diff --git a/veggieseasons/pubspec.yaml b/veggieseasons/pubspec.yaml index 107c8ec07..d0ea2cc9c 100644 --- a/veggieseasons/pubspec.yaml +++ b/veggieseasons/pubspec.yaml @@ -5,7 +5,7 @@ version: 1.2.0 resolution: workspace environment: - sdk: '^3.5.0' + sdk: '>=3.9.0 <4.0.0' dependencies: flutter: diff --git a/web_embedding/element_embedding_demo/pubspec.yaml b/web_embedding/element_embedding_demo/pubspec.yaml index a3aba7474..e3f425217 100644 --- a/web_embedding/element_embedding_demo/pubspec.yaml +++ b/web_embedding/element_embedding_demo/pubspec.yaml @@ -5,7 +5,7 @@ version: 1.0.0+1 resolution: workspace environment: - sdk: '^3.5.0' + sdk: '>=3.9.0 <4.0.0' dependencies: flutter: diff --git a/web_embedding/ng-flutter/flutter/pubspec.yaml b/web_embedding/ng-flutter/flutter/pubspec.yaml index 8fc39bac7..de561ff4e 100644 --- a/web_embedding/ng-flutter/flutter/pubspec.yaml +++ b/web_embedding/ng-flutter/flutter/pubspec.yaml @@ -5,7 +5,7 @@ version: 1.0.0 resolution: workspace environment: - sdk: '^3.5.0' + sdk: '>=3.9.0 <4.0.0' dependencies: flutter: diff --git a/workspace.md b/workspace.md index c99ba0228..7c5e1dbf7 100644 --- a/workspace.md +++ b/workspace.md @@ -1,6 +1,8 @@ -You are a Dart developer that maintains packages. Your current task is to incrementally update monorepos to use pub workspaces. +You are a Dart developer that maintains this monorepo of Flutter sample projects. - Read https://dart.dev/tools/pub/workspaces - Create a gloabl pubspec.yaml and populate it - Determine 5 packages in this repository that could easily be migrated to workspaces. -- Migrate those 5 packages. \ No newline at end of file +- Migrate those 5 packages. + +