From bd294908b5ffd9875dbdab62467472fc68a15c59 Mon Sep 17 00:00:00 2001 From: mockturtl Date: Wed, 20 Apr 2022 21:58:41 -0400 Subject: [PATCH] fix: Stack constructor for Flutter > 2.10 Closes #67. - Replaces `overflow: Overflow.visible` with `clipBehavior: Clip.none`, per [migration guide](https://docs.flutter.dev/release/breaking-changes/clip-behavior#migration-guide) - Bumps `mockito` version for compatibility with `flutter_test`. - Renames test file to follow `*_test.dart` convention. - Removes and gitignores `pubspec.lock`, since this is a library package. --- .gitignore | 1 + lib/fancy_bottom_navigation.dart | 2 +- pubspec.lock | 153 ------------------ pubspec.yaml | 2 +- ...dart => fancy_bottom_navigation_test.dart} | 0 5 files changed, 3 insertions(+), 155 deletions(-) delete mode 100644 pubspec.lock rename test/{fancy_widget_tests.dart => fancy_bottom_navigation_test.dart} (100%) diff --git a/.gitignore b/.gitignore index 6709bdb..b3a38a6 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ .packages .pub/ +pubspec.lock build/ ios/.generated/ diff --git a/lib/fancy_bottom_navigation.dart b/lib/fancy_bottom_navigation.dart index d05bde6..160c2c8 100644 --- a/lib/fancy_bottom_navigation.dart +++ b/lib/fancy_bottom_navigation.dart @@ -108,7 +108,7 @@ class FancyBottomNavigationState extends State @override Widget build(BuildContext context) { return Stack( - overflow: Overflow.visible, + clipBehavior: Clip.none, alignment: Alignment.bottomCenter, children: [ Container( diff --git a/pubspec.lock b/pubspec.lock deleted file mode 100644 index 4184453..0000000 --- a/pubspec.lock +++ /dev/null @@ -1,153 +0,0 @@ -# Generated by pub -# See https://dart.dev/tools/pub/glossary#lockfile -packages: - async: - dependency: transitive - description: - name: async - url: "https://pub.dartlang.org" - source: hosted - version: "2.5.0" - boolean_selector: - dependency: transitive - description: - name: boolean_selector - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - characters: - dependency: transitive - description: - name: characters - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - clock: - dependency: transitive - description: - name: clock - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - collection: - dependency: transitive - description: - name: collection - url: "https://pub.dartlang.org" - source: hosted - version: "1.15.0" - fake_async: - dependency: transitive - description: - name: fake_async - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - flutter: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_test: - dependency: "direct dev" - description: flutter - source: sdk - version: "0.0.0" - matcher: - dependency: transitive - description: - name: matcher - url: "https://pub.dartlang.org" - source: hosted - version: "0.12.10" - meta: - dependency: transitive - description: - name: meta - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.0" - mockito: - dependency: "direct dev" - description: - name: mockito - url: "https://pub.dartlang.org" - source: hosted - version: "4.0.0" - path: - dependency: transitive - description: - name: path - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.0" - sky_engine: - dependency: transitive - description: flutter - source: sdk - version: "0.0.99" - source_span: - dependency: transitive - description: - name: source_span - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.0" - stack_trace: - dependency: transitive - description: - name: stack_trace - url: "https://pub.dartlang.org" - source: hosted - version: "1.10.0" - stream_channel: - dependency: transitive - description: - name: stream_channel - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - string_scanner: - dependency: transitive - description: - name: string_scanner - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - term_glyph: - dependency: transitive - description: - name: term_glyph - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - test_api: - dependency: transitive - description: - name: test_api - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.19" - typed_data: - dependency: transitive - description: - name: typed_data - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.0" - vector_math: - dependency: "direct main" - description: - name: vector_math - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" -sdks: - dart: ">=2.12.0 <3.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 5e6d623..91db5a9 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -15,7 +15,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - mockito: ^4.0.0 + mockito: ^5.0.0 # For information on the generic Dart part of this file, see the # following page: https://www.dartlang.org/tools/pub/pubspec diff --git a/test/fancy_widget_tests.dart b/test/fancy_bottom_navigation_test.dart similarity index 100% rename from test/fancy_widget_tests.dart rename to test/fancy_bottom_navigation_test.dart