Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flutter 3 warning fixed #2

Merged
merged 3 commits into from
May 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions lib/helpers/misc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class Misc {
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, " +
"sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.";

static const int maxInt = 9223372036854775807;
static BigInt maxInt = BigInt.parse("9223372036854775807");

DateTime? _init;
String? _prefix;
Expand Down Expand Up @@ -359,18 +359,18 @@ class Misc {

///DO THAT:
///```dart
/// WidgetsBinding.instance?.addPostFrameCallback((_) => callback());
/// WidgetsBinding.instance.addPostFrameCallback((_) => callback());
/// ```
static void onLayoutRendered(void Function() callback) {
WidgetsBinding.instance?.addPostFrameCallback((_) => callback());
WidgetsBinding.instance.addPostFrameCallback((_) => callback());
}

///DO THAT:
///```dart
/// WidgetsBinding.instance?.endOfFrame.then((_) => callback());
/// WidgetsBinding.instance.endOfFrame.then((_) => callback());
/// ```
static void afterFirstLayout(void Function() callback) {
WidgetsBinding.instance?.endOfFrame.then((_) => callback());
WidgetsBinding.instance.endOfFrame.then((_) => callback());
}

///DO THAT:
Expand Down
2 changes: 1 addition & 1 deletion lib/helpers/widgets/keyboard.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class KeyboardVisibilityBuilder extends StatefulWidget {

class _KeyboardVisibilityBuilderState extends State<KeyboardVisibilityBuilder>
with WidgetsBindingObserver {
final WidgetsBinding _instance = WidgetsBinding.instance!;
final WidgetsBinding _instance = WidgetsBinding.instance;
bool _isKeyboardVisible = false;

@override
Expand Down
36 changes: 18 additions & 18 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.8.1"
version: "2.8.2"
boolean_selector:
dependency: transitive
description:
Expand All @@ -21,7 +21,7 @@ packages:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
version: "1.2.0"
charcode:
dependency: transitive
description:
Expand All @@ -42,14 +42,14 @@ packages:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.15.0"
version: "1.16.0"
fake_async:
dependency: transitive
description:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
version: "1.3.0"
flutter:
dependency: "direct main"
description: flutter
Expand All @@ -66,14 +66,21 @@ packages:
name: lint
url: "https://pub.dartlang.org"
source: hosted
version: "1.7.2"
version: "1.8.2"
matcher:
dependency: transitive
description:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.10"
version: "0.12.11"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.4"
meta:
dependency: transitive
description:
Expand All @@ -87,7 +94,7 @@ packages:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0"
version: "1.8.1"
sky_engine:
dependency: transitive
description: flutter
Expand All @@ -99,7 +106,7 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.1"
version: "1.8.2"
stack_trace:
dependency: transitive
description:
Expand Down Expand Up @@ -134,21 +141,14 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.2"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
version: "0.4.9"
vector_math:
dependency: "direct main"
description:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
version: "2.1.2"
sdks:
dart: ">=2.14.0-360.0.dev <3.0.0"
dart: ">=2.17.0-0 <3.0.0"
flutter: ">=1.17.0"
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: helpers
description: Helpers is a tool that allows you to convert repetitive and tedious statements into easy-to-read and intuitive statements.
version: 1.1.4
version: 1.1.6
homepage: https://github.com/seel-channel/helpers

environment:
Expand Down