From 3166bacd23c119040ac36ea4dc5241c453c1db30 Mon Sep 17 00:00:00 2001 From: Producer86 Date: Thu, 4 Feb 2021 21:11:02 +0100 Subject: [PATCH 1/3] ancestorWidgetOfExactType is deprecated --- example/ios/Flutter/flutter_export_environment.sh | 13 +++++++++++++ lib/bindings/bindingwidget.dart | 3 +-- 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 example/ios/Flutter/flutter_export_environment.sh diff --git a/example/ios/Flutter/flutter_export_environment.sh b/example/ios/Flutter/flutter_export_environment.sh new file mode 100644 index 0000000..beb8a92 --- /dev/null +++ b/example/ios/Flutter/flutter_export_environment.sh @@ -0,0 +1,13 @@ +#!/bin/sh +# This is a generated file; do not edit or check into version control. +export "FLUTTER_ROOT=D:\flutter" +export "FLUTTER_APPLICATION_PATH=C:\Users\User\Documents\MyProjects\fmvvm\example" +export "FLUTTER_TARGET=lib\main.dart" +export "FLUTTER_BUILD_DIR=build" +export "SYMROOT=${SOURCE_ROOT}/../build\ios" +export "FLUTTER_BUILD_NAME=1.0.0" +export "FLUTTER_BUILD_NUMBER=1" +export "DART_OBFUSCATION=false" +export "TRACK_WIDGET_CREATION=false" +export "TREE_SHAKE_ICONS=false" +export "PACKAGE_CONFIG=.packages" diff --git a/lib/bindings/bindingwidget.dart b/lib/bindings/bindingwidget.dart index 8bc1f0b..89b5be0 100644 --- a/lib/bindings/bindingwidget.dart +++ b/lib/bindings/bindingwidget.dart @@ -17,9 +17,8 @@ class BindingWidget extends StatefulWidget { /// This looks up the context for an ancestor that is a BindingWidget of the /// supplied type. If none are found, an [ArgumentError] is raised. static BindingWidget of(BuildContext context) { - final type = Utilities.typeOf>(); final bindingWidget = - context.ancestorWidgetOfExactType(type) as BindingWidget; + context.findAncestorWidgetOfExactType>(); if (bindingWidget == null) { throw ArgumentError('No BindingWidgets found for the specified type.'); From 51cf6161c26b0ee412cf61bee9444c5585598c50 Mon Sep 17 00:00:00 2001 From: Producer86 Date: Thu, 4 Feb 2021 21:23:08 +0100 Subject: [PATCH 2/3] gitignore fix --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index 7bf00e8..1aa6480 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,7 @@ pubspec.lock # Directory created by dartdoc # If you don't generate documentation locally you can remove this line. doc/api/ + +example/ios/ +example/android/ +example/.dart_tool/ From 1f4d42ae9ae015600b65a0ef13193f84c8ef261f Mon Sep 17 00:00:00 2001 From: Producer86 Date: Thu, 4 Feb 2021 21:26:07 +0100 Subject: [PATCH 3/3] gitignore fix2 --- example/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/example/.gitignore b/example/.gitignore index 07488ba..b4a5a76 100644 --- a/example/.gitignore +++ b/example/.gitignore @@ -61,6 +61,7 @@ **/ios/Flutter/flutter_assets/ **/ios/ServiceDefinitions.json **/ios/Runner/GeneratedPluginRegistrant.* +**/ios/Flutter/flutter_export_environment.sh # Exceptions to above rules. !**/ios/**/default.mode1v3