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/ 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 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.');