Compare commits

..

No commits in common. "master" and "master" have entirely different histories.

20 changed files with 332 additions and 488 deletions

1
.gitignore vendored
View file

@ -5,4 +5,3 @@
.pub/ .pub/
build/ build/
.idea/

View file

@ -0,0 +1,19 @@
<component name="libraryTable">
<library name="Dart SDK">
<CLASSES>
<root url="file:///home/inex/flutter/bin/cache/dart-sdk/lib/async" />
<root url="file:///home/inex/flutter/bin/cache/dart-sdk/lib/collection" />
<root url="file:///home/inex/flutter/bin/cache/dart-sdk/lib/convert" />
<root url="file:///home/inex/flutter/bin/cache/dart-sdk/lib/core" />
<root url="file:///home/inex/flutter/bin/cache/dart-sdk/lib/developer" />
<root url="file:///home/inex/flutter/bin/cache/dart-sdk/lib/html" />
<root url="file:///home/inex/flutter/bin/cache/dart-sdk/lib/io" />
<root url="file:///home/inex/flutter/bin/cache/dart-sdk/lib/isolate" />
<root url="file:///home/inex/flutter/bin/cache/dart-sdk/lib/math" />
<root url="file:///home/inex/flutter/bin/cache/dart-sdk/lib/mirrors" />
<root url="file:///home/inex/flutter/bin/cache/dart-sdk/lib/typed_data" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>

10
.idea/modules.xml Normal file
View file

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/swipe_to_action.iml" filepath="$PROJECT_DIR$/swipe_to_action.iml" />
<module fileurl="file://$PROJECT_DIR$/android/swipe_to_action_android.iml" filepath="$PROJECT_DIR$/android/swipe_to_action_android.iml" />
<module fileurl="file://$PROJECT_DIR$/example/android/swipe_to_action_example_android.iml" filepath="$PROJECT_DIR$/example/android/swipe_to_action_example_android.iml" />
</modules>
</component>
</project>

View file

@ -0,0 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="example/lib/main.dart" type="FlutterRunConfigurationType" factoryName="Flutter">
<option name="filePath" value="$PROJECT_DIR$/example/lib/main.dart" />
<method />
</configuration>
</component>

45
.idea/workspace.xml Normal file
View file

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="FileEditorManager">
<leaf>
<file leaf-file-name="swipe_to_action.dart" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/lib/swipe_to_action.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="main.dart" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/example/lib/main.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="ToolWindowManager">
<editor active="true" />
<layout>
<window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
</layout>
</component>
<component name="ProjectView">
<navigator currentView="ProjectPane" proportions="" version="1">
</navigator>
<panes>
<pane id="ProjectPane">
<option name="show-excluded-files" value="false" />
</pane>
</panes>
</component>
<component name="PropertiesComponent">
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="dart.analysis.tool.window.force.activate" value="true" />
<property name="show.migrate.to.gradle.popup" value="false" />
</component>
</project>

View file

@ -1,11 +1,3 @@
## 0.3.0
* Ignore swipe when it starts in system gesture insets by [EpicKiwi](https://github.com/EpicKiwi)
## 0.2.0
* Null-safety migration by [devcat37](https://github.com/devcat37)
## 0.1.0 ## 0.1.0
* Initial release. * Initial release.

View file

@ -1,70 +0,0 @@
# This file configures the analyzer, which statically analyzes Dart code to
# check for errors, warnings, and lints.
#
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
# invoked from the command line by running `flutter analyze`.
# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
include: package:flutter_lints/flutter.yaml
linter:
# The lint rules applied to this project can be customized in the
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
# included above or to enable additional rules. A list of all available lints
# and their documentation is published at
# https://dart-lang.github.io/linter/lints/index.html.
#
# Instead of disabling a lint rule for the entire project in the
# section below, it can also be suppressed for a single line of code
# or a specific dart file by using the `// ignore: name_of_lint` and
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
rules:
avoid_print: false # Uncomment to disable the `avoid_print` rule
always_declare_return_types: true
always_put_control_body_on_new_line: true
always_put_required_named_parameters_first: true
always_use_package_imports: true
avoid_escaping_inner_quotes: true
avoid_setters_without_getters: true
collection_methods_unrelated_type: true
combinators_ordering: true
directives_ordering: true
eol_at_end_of_file: true
no_adjacent_strings_in_list: true
prefer_constructors_over_static_methods: true
prefer_expression_function_bodies: true
prefer_final_in_for_each: true
prefer_final_locals: true
prefer_final_parameters: true
prefer_foreach: true
prefer_if_elements_to_conditional_expressions: true
prefer_mixin: true
prefer_null_aware_method_calls: true
prefer_single_quotes: true
require_trailing_commas: true
sized_box_shrink_expand: true
sort_constructors_first: true
unawaited_futures: true
unnecessary_await_in_return: true
unnecessary_null_aware_operator_on_extension_on_nullable: true
unnecessary_null_checks: true
unnecessary_parenthesis: true
unnecessary_statements: true
unnecessary_to_list_in_spreads: true
unreachable_from_main: true
use_enums: true
use_if_null_to_convert_nulls_to_bools: true
use_is_even_rather_than_modulo: true
use_late_for_private_fields_and_variables: true
use_named_constants: true
use_setters_to_change_properties: true
use_string_buffers: true
use_string_in_part_of_directives: true
use_super_parameters: true
use_to_and_as_if_applicable: true
# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options

View file

@ -1,9 +1,3 @@
plugins {
id "com.android.application"
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
}
def localProperties = new Properties() def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties') def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) { if (localPropertiesFile.exists()) {
@ -12,6 +6,11 @@ if (localPropertiesFile.exists()) {
} }
} }
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode') def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) { if (flutterVersionCode == null) {
flutterVersionCode = '1' flutterVersionCode = '1'
@ -22,9 +21,12 @@ if (flutterVersionName == null) {
flutterVersionName = '1.0' flutterVersionName = '1.0'
} }
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android { android {
namespace 'dev.inex.swipe_to_action_example' compileSdkVersion 29
compileSdkVersion 34
sourceSets { sourceSets {
main.java.srcDirs += 'src/main/kotlin' main.java.srcDirs += 'src/main/kotlin'
@ -34,19 +36,10 @@ android {
disable 'InvalidPackage' disable 'InvalidPackage'
} }
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
}
defaultConfig { defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "dev.inex.swipe_to_action_example" applicationId "dev.inex.swipe_to_action_example"
minSdkVersion flutter.minSdkVersion minSdkVersion 16
targetSdkVersion 29 targetSdkVersion 29
versionCode flutterVersionCode.toInteger() versionCode flutterVersionCode.toInteger()
versionName flutterVersionName versionName flutterVersionName
@ -64,3 +57,7 @@ android {
flutter { flutter {
source '../..' source '../..'
} }
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}

View file

@ -1,3 +1,16 @@
buildscript {
ext.kotlin_version = '1.3.50'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects { allprojects {
repositories { repositories {
google() google()
@ -5,7 +18,6 @@ allprojects {
} }
} }
rootProject.buildDir = '../build' rootProject.buildDir = '../build'
subprojects { subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}" project.buildDir = "${rootProject.buildDir}/${project.name}"
@ -14,6 +26,6 @@ subprojects {
project.evaluationDependsOn(':app') project.evaluationDependsOn(':app')
} }
tasks.register("clean", Delete) { task clean(type: Delete) {
delete rootProject.buildDir delete rootProject.buildDir
} }

View file

@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip

View file

@ -1,25 +1,11 @@
pluginManagement { include ':app'
def flutterSdkPath = {
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
def properties = new Properties() def properties = new Properties()
file("local.properties").withInputStream { properties.load(it) }
assert localPropertiesFile.exists()
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
def flutterSdkPath = properties.getProperty("flutter.sdk") def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties" assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
return flutterSdkPath apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
}()
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "8.3.1" apply false
id "org.jetbrains.kotlin.android" version "1.9.21" apply false
}
include ":app"

View file

@ -2,21 +2,20 @@ import 'package:flutter/material.dart';
import 'package:swipe_to_action/swipe_to_action.dart'; import 'package:swipe_to_action/swipe_to_action.dart';
void main() { void main() {
runApp(const MyApp()); runApp(MyApp());
} }
class MyApp extends StatefulWidget { class MyApp extends StatefulWidget {
const MyApp({final Key? key}) : super(key: key);
@override @override
State<MyApp> createState() => _MyAppState(); _MyAppState createState() => _MyAppState();
} }
class _MyAppState extends State<MyApp> { class _MyAppState extends State<MyApp> {
String _text = 'Swipe some tiles!'; String _text = "Swipe some tiles!";
@override @override
Widget build(final BuildContext context) => MaterialApp( Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold( home: Scaffold(
appBar: AppBar( appBar: AppBar(
title: const Text('Plugin example app'), title: const Text('Plugin example app'),
@ -24,47 +23,49 @@ class _MyAppState extends State<MyApp> {
body: ListView( body: ListView(
children: [ children: [
Swipeable( Swipeable(
key: const ValueKey(1), key: ValueKey(1),
onSwipe: (final direction) { onSwipe: (direction) {
if (direction == SwipeDirection.startToEnd) { if (direction == SwipeDirection.startToEnd) {
setState(() { setState(() {
_text = 'Swiped to right!'; _text = "Swiped to right!";
}); });
} else { } else {
setState(() { setState(() {
_text = 'Swiped to left!'; _text = "Swiped to left!";
}); });
} }
}, },
child: const ListTile( child: ListTile(
title: Text('Tile one'), title: Text("Tile one"),
), ),
), ),
Swipeable( Swipeable(
key: const ValueKey(2), key: ValueKey(2),
onSwipe: (final direction) { onSwipe: (direction) {
setState(() { setState(() {
_text = 'This one can only be swiped to right!'; _text = "This one can only be swiped to right!";
}); });
}, },
background: Container(color: Colors.orange), background: Container(color: Colors.orange),
direction: SwipeDirection.startToEnd, direction: SwipeDirection.startToEnd,
child: const ListTile( child: ListTile(
title: Text('Tile one'), title: Text("Tile one"),
), ),
), ),
Swipeable( Swipeable(
key: const ValueKey(3), key: ValueKey(3),
onSwipe: (final direction) { onSwipe: (direction) {
setState(() { setState(() {
_text = 'This one was confirmed with a function!'; _text = "This one was confirmed with a function!";
}); });
}, },
background: Container(color: Colors.green), background: Container(color: Colors.green),
secondaryBackground: Container(color: Colors.teal), secondaryBackground: Container(color: Colors.teal),
confirmSwipe: (final direction) async => true, confirmSwipe: (direction) async {
child: const ListTile( return true;
title: Text('Tile three'), },
child: ListTile(
title: Text("Tile three"),
), ),
), ),
Center(child: Text(_text)), Center(child: Text(_text)),
@ -73,3 +74,4 @@ class _MyAppState extends State<MyApp> {
), ),
); );
} }
}

View file

@ -2,8 +2,6 @@
// Generated file. Do not edit. // Generated file. Do not edit.
// //
// clang-format off
#include "generated_plugin_registrant.h" #include "generated_plugin_registrant.h"

View file

@ -2,8 +2,6 @@
// Generated file. Do not edit. // Generated file. Do not edit.
// //
// clang-format off
#ifndef GENERATED_PLUGIN_REGISTRANT_ #ifndef GENERATED_PLUGIN_REGISTRANT_
#define GENERATED_PLUGIN_REGISTRANT_ #define GENERATED_PLUGIN_REGISTRANT_

View file

@ -5,9 +5,6 @@
list(APPEND FLUTTER_PLUGIN_LIST list(APPEND FLUTTER_PLUGIN_LIST
) )
list(APPEND FLUTTER_FFI_PLUGIN_LIST
)
set(PLUGIN_BUNDLED_LIBRARIES) set(PLUGIN_BUNDLED_LIBRARIES)
foreach(plugin ${FLUTTER_PLUGIN_LIST}) foreach(plugin ${FLUTTER_PLUGIN_LIST})
@ -16,8 +13,3 @@ foreach(plugin ${FLUTTER_PLUGIN_LIST})
list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>) list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>)
list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
endforeach(plugin) endforeach(plugin)
foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})
add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin})
list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
endforeach(ffi_plugin)

View file

@ -5,58 +5,58 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: async name: async
sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted source: hosted
version: "2.11.0" version: "2.5.0"
boolean_selector: boolean_selector:
dependency: transitive dependency: transitive
description: description:
name: boolean_selector name: boolean_selector
sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.1" version: "2.1.0"
characters: characters:
dependency: transitive dependency: transitive
description: description:
name: characters name: characters
sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted source: hosted
version: "1.3.0" version: "1.1.0"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
clock: clock:
dependency: transitive dependency: transitive
description: description:
name: clock name: clock
sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted source: hosted
version: "1.1.1" version: "1.1.0"
collection: collection:
dependency: transitive dependency: transitive
description: description:
name: collection name: collection
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted source: hosted
version: "1.18.0" version: "1.15.0"
cupertino_icons: cupertino_icons:
dependency: "direct main" dependency: "direct main"
description: description:
name: cupertino_icons name: cupertino_icons
sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted source: hosted
version: "1.0.8" version: "1.0.0"
fake_async: fake_async:
dependency: transitive dependency: transitive
description: description:
name: fake_async name: fake_async
sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted source: hosted
version: "1.3.1" version: "1.2.0"
flutter: flutter:
dependency: "direct main" dependency: "direct main"
description: flutter description: flutter
@ -72,62 +72,34 @@ packages:
description: flutter description: flutter
source: sdk source: sdk
version: "0.0.0" version: "0.0.0"
leak_tracker: js:
dependency: transitive dependency: transitive
description: description:
name: leak_tracker name: js
sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted source: hosted
version: "10.0.5" version: "0.6.3"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806"
url: "https://pub.dev"
source: hosted
version: "3.0.5"
leak_tracker_testing:
dependency: transitive
description:
name: leak_tracker_testing
sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
url: "https://pub.dev"
source: hosted
version: "3.0.1"
matcher: matcher:
dependency: transitive dependency: transitive
description: description:
name: matcher name: matcher
sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted source: hosted
version: "0.12.16+1" version: "0.12.10"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
url: "https://pub.dev"
source: hosted
version: "0.11.1"
meta: meta:
dependency: transitive dependency: transitive
description: description:
name: meta name: meta
sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted source: hosted
version: "1.15.0" version: "1.3.0"
path: path:
dependency: transitive dependency: transitive
description: description:
name: path name: path
sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted source: hosted
version: "1.9.0" version: "1.8.0"
sky_engine: sky_engine:
dependency: transitive dependency: transitive
description: flutter description: flutter
@ -137,73 +109,65 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: source_span name: source_span
sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted source: hosted
version: "1.10.0" version: "1.8.0"
stack_trace: stack_trace:
dependency: transitive dependency: transitive
description: description:
name: stack_trace name: stack_trace
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted source: hosted
version: "1.11.1" version: "1.10.0"
stream_channel: stream_channel:
dependency: transitive dependency: transitive
description: description:
name: stream_channel name: stream_channel
sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.2" version: "2.1.0"
string_scanner: string_scanner:
dependency: transitive dependency: transitive
description: description:
name: string_scanner name: string_scanner
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted source: hosted
version: "1.2.0" version: "1.1.0"
swipe_to_action: swipe_to_action:
dependency: "direct main" dependency: "direct main"
description: description:
path: ".." path: ".."
relative: true relative: true
source: path source: path
version: "0.3.0" version: "0.1.0"
term_glyph: term_glyph:
dependency: transitive dependency: transitive
description: description:
name: term_glyph name: term_glyph
sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted source: hosted
version: "1.2.1" version: "1.2.0"
test_api: test_api:
dependency: transitive dependency: transitive
description: description:
name: test_api name: test_api
sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted source: hosted
version: "0.7.2" 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: vector_math:
dependency: transitive dependency: transitive
description: description:
name: vector_math name: vector_math
sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.4" version: "2.1.0"
vm_service:
dependency: transitive
description:
name: vm_service
sha256: f652077d0bdf60abe4c1f6377448e8655008eef28f128bc023f7b5e8dfeb48fc
url: "https://pub.dev"
source: hosted
version: "14.2.4"
sdks: sdks:
dart: ">=3.3.0 <4.0.0" dart: ">=2.12.0 <3.0.0"
flutter: ">=3.18.0-18.0.pre.54" flutter: ">=2.0.0"

View file

@ -46,7 +46,7 @@ class Swipeable extends StatefulWidget {
/// state of the dismissed item. Using keys causes the widgets to sync /// state of the dismissed item. Using keys causes the widgets to sync
/// according to their keys and avoids this pitfall. /// according to their keys and avoids this pitfall.
const Swipeable({ const Swipeable({
required final Key key, required Key key,
required this.child, required this.child,
required this.onSwipe, required this.onSwipe,
this.background, this.background,
@ -61,7 +61,7 @@ class Swipeable extends StatefulWidget {
this.allowedPointerKinds = const { this.allowedPointerKinds = const {
PointerDeviceKind.invertedStylus, PointerDeviceKind.invertedStylus,
PointerDeviceKind.stylus, PointerDeviceKind.stylus,
PointerDeviceKind.touch, PointerDeviceKind.touch
}, },
}) : assert(secondaryBackground == null || background != null), }) : assert(secondaryBackground == null || background != null),
super(key: key); super(key: key);
@ -155,7 +155,7 @@ class Swipeable extends StatefulWidget {
final DragStartBehavior dragStartBehavior; final DragStartBehavior dragStartBehavior;
@override @override
State<Swipeable> createState() => _SwipeableState(); _SwipeableState createState() => _SwipeableState();
} }
class _SwipeableClipper extends CustomClipper<Rect> { class _SwipeableClipper extends CustomClipper<Rect> {
@ -166,7 +166,7 @@ class _SwipeableClipper extends CustomClipper<Rect> {
final Animation<Offset> moveAnimation; final Animation<Offset> moveAnimation;
@override @override
Rect getClip(final Size size) { Rect getClip(Size size) {
final offset = moveAnimation.value.dx * size.width; final offset = moveAnimation.value.dx * size.width;
if (offset < 0) { if (offset < 0) {
return Rect.fromLTRB(size.width + offset, 0.0, size.width, size.height); return Rect.fromLTRB(size.width + offset, 0.0, size.width, size.height);
@ -175,21 +175,20 @@ class _SwipeableClipper extends CustomClipper<Rect> {
} }
@override @override
Rect getApproximateClipRect(final Size size) => getClip(size); Rect getApproximateClipRect(Size size) => getClip(size);
@override @override
bool shouldReclip(final _SwipeableClipper oldClipper) => bool shouldReclip(_SwipeableClipper oldClipper) {
oldClipper.moveAnimation.value != moveAnimation.value; return oldClipper.moveAnimation.value != moveAnimation.value;
}
} }
enum _FlingGestureKind { none, forward, reverse } enum _FlingGestureKind { none, forward, reverse }
class _SwipeableState extends State<Swipeable> class _SwipeableState extends State<Swipeable> with TickerProviderStateMixin, AutomaticKeepAliveClientMixin {
with TickerProviderStateMixin, AutomaticKeepAliveClientMixin {
@override @override
void initState() { void initState() {
_moveController = _moveController = AnimationController(duration: widget.movementDuration, vsync: this)
AnimationController(duration: widget.movementDuration, vsync: this)
..addStatusListener(_handleDismissStatusChanged); ..addStatusListener(_handleDismissStatusChanged);
_updateMoveAnimation(); _updateMoveAnimation();
@ -205,14 +204,6 @@ class _SwipeableState extends State<Swipeable>
bool _isTouch = true; bool _isTouch = true;
// Minimum global X where swipe is allowed to start
double? _minX;
// Maximum global X where swipe is allowed to start
double? _maxX;
// Screen width reference that helped to compute _minX and _maxX
// used to check if insets should be updated or not
double? _widthReference;
@override @override
bool get wantKeepAlive => _moveController.isAnimating == true; bool get wantKeepAlive => _moveController.isAnimating == true;
@ -222,56 +213,39 @@ class _SwipeableState extends State<Swipeable>
super.dispose(); super.dispose();
} }
SwipeDirection _extentToDirection(final double extent) { SwipeDirection _extentToDirection(double extent) {
if (extent == 0.0) { if (extent == 0.0) {
return SwipeDirection.none; return SwipeDirection.none;
} }
switch (Directionality.of(context)) { switch (Directionality.of(context)) {
case TextDirection.rtl: case TextDirection.rtl:
return extent < 0 return extent < 0 ? SwipeDirection.startToEnd : SwipeDirection.endToStart;
? SwipeDirection.startToEnd
: SwipeDirection.endToStart;
case TextDirection.ltr: case TextDirection.ltr:
return extent > 0 return extent > 0 ? SwipeDirection.startToEnd : SwipeDirection.endToStart;
? SwipeDirection.startToEnd
: SwipeDirection.endToStart;
} }
} }
SwipeDirection get _swipeDirection => _extentToDirection(_dragExtent); SwipeDirection get _swipeDirection => _extentToDirection(_dragExtent);
bool get _isActive => _dragUnderway || _moveController.isAnimating; bool get _isActive {
return _dragUnderway || _moveController.isAnimating;
}
double get _overallDragAxisExtent { double get _overallDragAxisExtent {
final size = context.size; final size = context.size;
return size?.width ?? 0.0; return size?.width ?? 0.0;
} }
void _handlePointerDown(final PointerDownEvent event) { void _handlePointerDown(PointerDownEvent event) {
final xPos = event.position.dx;
var validTouch = widget.allowedPointerKinds.contains(event.kind);
// Check if touch was performed after minX and before maxX to avoid system
// gesture insets
if (validTouch && _minX != null) {
validTouch = xPos > _minX!;
}
if (validTouch && _maxX != null) {
validTouch = xPos < _maxX!;
}
setState(() { setState(() {
_isTouch = validTouch; _isTouch = widget.allowedPointerKinds.contains(event.kind);
}); });
} }
void _handleDragStart(final DragStartDetails details) { void _handleDragStart(DragStartDetails details) {
_dragUnderway = true; _dragUnderway = true;
if (_moveController.isAnimating) { if (_moveController.isAnimating) {
_dragExtent = _dragExtent = _moveController.value * _overallDragAxisExtent * _dragExtent.sign;
_moveController.value * _overallDragAxisExtent * _dragExtent.sign;
_moveController.stop(); _moveController.stop();
} else { } else {
_dragExtent = 0.0; _dragExtent = 0.0;
@ -282,7 +256,7 @@ class _SwipeableState extends State<Swipeable>
}); });
} }
void _handleDragUpdate(final DragUpdateDetails details) { void _handleDragUpdate(DragUpdateDetails details) {
if (!_isActive || _moveController.isAnimating) { if (!_isActive || _moveController.isAnimating) {
return; return;
} }
@ -347,7 +321,7 @@ class _SwipeableState extends State<Swipeable>
); );
} }
_FlingGestureKind _describeFlingGesture(final Velocity velocity) { _FlingGestureKind _describeFlingGesture(Velocity velocity) {
if (_dragExtent == 0.0) { if (_dragExtent == 0.0) {
// If it was a fling, then it was a fling that was let loose at the exact // If it was a fling, then it was a fling that was let loose at the exact
// middle of the range (i.e. when there's no displacement). In that case, // middle of the range (i.e. when there's no displacement). In that case,
@ -360,8 +334,7 @@ class _SwipeableState extends State<Swipeable>
final vy = velocity.pixelsPerSecond.dy; final vy = velocity.pixelsPerSecond.dy;
SwipeDirection flingDirection; SwipeDirection flingDirection;
// Verify that the fling is in the generally right direction and fast enough. // Verify that the fling is in the generally right direction and fast enough.
if (vx.abs() - vy.abs() < _kMinFlingVelocityDelta || if (vx.abs() - vy.abs() < _kMinFlingVelocityDelta || vx.abs() < _kMinFlingVelocity) {
vx.abs() < _kMinFlingVelocity) {
return _FlingGestureKind.none; return _FlingGestureKind.none;
} }
assert(vx != 0.0); assert(vx != 0.0);
@ -373,13 +346,12 @@ class _SwipeableState extends State<Swipeable>
return _FlingGestureKind.reverse; return _FlingGestureKind.reverse;
} }
Future<void> _handleDragEnd(final DragEndDetails details) async { Future<void> _handleDragEnd(DragEndDetails details) async {
if (!_isActive || _moveController.isAnimating) { if (!_isActive || _moveController.isAnimating) {
return; return;
} }
_dragUnderway = false; _dragUnderway = false;
if (_moveController.isCompleted && if (_moveController.isCompleted && await _confirmStartSwipeAnimation() == true) {
await _confirmStartSwipeAnimation() == true) {
_startSwipeAnimation(); _startSwipeAnimation();
return; return;
} }
@ -388,30 +360,23 @@ class _SwipeableState extends State<Swipeable>
case _FlingGestureKind.forward: case _FlingGestureKind.forward:
assert(_dragExtent != 0.0); assert(_dragExtent != 0.0);
assert(!_moveController.isDismissed); assert(!_moveController.isDismissed);
if ((widget.dismissThresholds[_swipeDirection] ?? _kDismissThreshold) >= if ((widget.dismissThresholds[_swipeDirection] ?? _kDismissThreshold) >= 1.0) {
1.0) {
await _moveController.reverse(); await _moveController.reverse();
break; break;
} }
_dragExtent = flingVelocity.sign; _dragExtent = flingVelocity.sign;
await _moveController.fling( await _moveController.fling(velocity: flingVelocity.abs() * _kFlingVelocityScale);
velocity: flingVelocity.abs() * _kFlingVelocityScale,
);
break; break;
case _FlingGestureKind.reverse: case _FlingGestureKind.reverse:
assert(_dragExtent != 0.0); assert(_dragExtent != 0.0);
assert(!_moveController.isDismissed); assert(!_moveController.isDismissed);
_dragExtent = flingVelocity.sign; _dragExtent = flingVelocity.sign;
await _moveController.fling( await _moveController.fling(velocity: -flingVelocity.abs() * _kFlingVelocityScale);
velocity: -flingVelocity.abs() * _kFlingVelocityScale,
);
break; break;
case _FlingGestureKind.none: case _FlingGestureKind.none:
if (!_moveController.isDismissed) { if (!_moveController.isDismissed) {
// we already know it's not completed, we check that above // we already know it's not completed, we check that above
if (_moveController.value > if (_moveController.value > (widget.dismissThresholds[_swipeDirection] ?? _kDismissThreshold)) {
(widget.dismissThresholds[_swipeDirection] ??
_kDismissThreshold)) {
await _moveController.forward(); await _moveController.forward();
} else { } else {
await _moveController.reverse(); await _moveController.reverse();
@ -421,7 +386,7 @@ class _SwipeableState extends State<Swipeable>
} }
} }
Future<void> _handleDismissStatusChanged(final AnimationStatus status) async { Future<void> _handleDismissStatusChanged(AnimationStatus status) async {
if (status == AnimationStatus.completed && !_dragUnderway) { if (status == AnimationStatus.completed && !_dragUnderway) {
if (await _confirmStartSwipeAnimation() == true) { if (await _confirmStartSwipeAnimation() == true) {
_startSwipeAnimation(); _startSwipeAnimation();
@ -451,7 +416,7 @@ class _SwipeableState extends State<Swipeable>
} }
@override @override
Widget build(final BuildContext context) { Widget build(BuildContext context) {
super.build(context); // See AutomaticKeepAliveClientMixin. super.build(context); // See AutomaticKeepAliveClientMixin.
assert(debugCheckHasDirectionality(context)); assert(debugCheckHasDirectionality(context));
@ -464,30 +429,13 @@ class _SwipeableState extends State<Swipeable>
} }
} }
// Get system screen size and system gesture insets
// to avoid starting a swipe in this areas
final MediaQueryData? mediaQuery = MediaQuery.maybeOf(context);
if (mediaQuery != null) {
if (_widthReference == null || _widthReference != mediaQuery.size.width) {
WidgetsBinding.instance.addPostFrameCallback((final _) {
setState(() {
_widthReference = mediaQuery.size.width;
_minX = mediaQuery.systemGestureInsets.left;
_maxX =
mediaQuery.size.width - mediaQuery.systemGestureInsets.right;
});
});
}
}
Widget content = SlideTransition( Widget content = SlideTransition(
position: _moveAnimation, position: _moveAnimation,
child: widget.child, child: widget.child,
); );
if (background != null) { if (background != null) {
content = Stack( content = Stack(children: <Widget>[
children: <Widget>[
if (!_moveAnimation.isDismissed) if (!_moveAnimation.isDismissed)
Positioned.fill( Positioned.fill(
child: ClipRect( child: ClipRect(
@ -498,8 +446,7 @@ class _SwipeableState extends State<Swipeable>
), ),
), ),
content, content,
], ]);
);
} }
// We are not swiping but we may be being dragging in widget.direction. // We are not swiping but we may be being dragging in widget.direction.
return Listener( return Listener(
@ -509,8 +456,8 @@ class _SwipeableState extends State<Swipeable>
onHorizontalDragUpdate: _isTouch ? _handleDragUpdate : null, onHorizontalDragUpdate: _isTouch ? _handleDragUpdate : null,
onHorizontalDragEnd: _isTouch ? _handleDragEnd : null, onHorizontalDragEnd: _isTouch ? _handleDragEnd : null,
behavior: HitTestBehavior.opaque, behavior: HitTestBehavior.opaque,
dragStartBehavior: widget.dragStartBehavior,
child: content, child: content,
dragStartBehavior: widget.dragStartBehavior,
), ),
); );
} }

View file

@ -5,63 +5,56 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: async name: async
sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted source: hosted
version: "2.11.0" version: "2.5.0"
boolean_selector: boolean_selector:
dependency: transitive dependency: transitive
description: description:
name: boolean_selector name: boolean_selector
sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.1" version: "2.1.0"
characters: characters:
dependency: transitive dependency: transitive
description: description:
name: characters name: characters
sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted source: hosted
version: "1.3.0" version: "1.1.0"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
clock: clock:
dependency: transitive dependency: transitive
description: description:
name: clock name: clock
sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted source: hosted
version: "1.1.1" version: "1.1.0"
collection: collection:
dependency: transitive dependency: transitive
description: description:
name: collection name: collection
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted source: hosted
version: "1.18.0" version: "1.15.0"
fake_async: fake_async:
dependency: transitive dependency: transitive
description: description:
name: fake_async name: fake_async
sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted source: hosted
version: "1.3.1" version: "1.2.0"
flutter: flutter:
dependency: "direct main" dependency: "direct main"
description: flutter description: flutter
source: sdk source: sdk
version: "0.0.0" version: "0.0.0"
flutter_lints:
dependency: "direct dev"
description:
name: flutter_lints
sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1"
url: "https://pub.dev"
source: hosted
version: "5.0.0"
flutter_test: flutter_test:
dependency: "direct dev" dependency: "direct dev"
description: flutter description: flutter
@ -72,70 +65,34 @@ packages:
description: flutter description: flutter
source: sdk source: sdk
version: "0.0.0" version: "0.0.0"
leak_tracker: js:
dependency: transitive dependency: transitive
description: description:
name: leak_tracker name: js
sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted source: hosted
version: "10.0.5" version: "0.6.3"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806"
url: "https://pub.dev"
source: hosted
version: "3.0.5"
leak_tracker_testing:
dependency: transitive
description:
name: leak_tracker_testing
sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
url: "https://pub.dev"
source: hosted
version: "3.0.1"
lints:
dependency: transitive
description:
name: lints
sha256: "3315600f3fb3b135be672bf4a178c55f274bebe368325ae18462c89ac1e3b413"
url: "https://pub.dev"
source: hosted
version: "5.0.0"
matcher: matcher:
dependency: transitive dependency: transitive
description: description:
name: matcher name: matcher
sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted source: hosted
version: "0.12.16+1" version: "0.12.10"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
url: "https://pub.dev"
source: hosted
version: "0.11.1"
meta: meta:
dependency: transitive dependency: transitive
description: description:
name: meta name: meta
sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted source: hosted
version: "1.15.0" version: "1.3.0"
path: path:
dependency: transitive dependency: transitive
description: description:
name: path name: path
sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted source: hosted
version: "1.9.0" version: "1.8.0"
sky_engine: sky_engine:
dependency: transitive dependency: transitive
description: flutter description: flutter
@ -145,66 +102,58 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: source_span name: source_span
sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted source: hosted
version: "1.10.0" version: "1.8.0"
stack_trace: stack_trace:
dependency: transitive dependency: transitive
description: description:
name: stack_trace name: stack_trace
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted source: hosted
version: "1.11.1" version: "1.10.0"
stream_channel: stream_channel:
dependency: transitive dependency: transitive
description: description:
name: stream_channel name: stream_channel
sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.2" version: "2.1.0"
string_scanner: string_scanner:
dependency: transitive dependency: transitive
description: description:
name: string_scanner name: string_scanner
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted source: hosted
version: "1.2.0" version: "1.1.0"
term_glyph: term_glyph:
dependency: transitive dependency: transitive
description: description:
name: term_glyph name: term_glyph
sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted source: hosted
version: "1.2.1" version: "1.2.0"
test_api: test_api:
dependency: transitive dependency: transitive
description: description:
name: test_api name: test_api
sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted source: hosted
version: "0.7.2" 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: vector_math:
dependency: transitive dependency: transitive
description: description:
name: vector_math name: vector_math
sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" url: "https://pub.dartlang.org"
url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.4" version: "2.1.0"
vm_service:
dependency: transitive
description:
name: vm_service
sha256: f652077d0bdf60abe4c1f6377448e8655008eef28f128bc023f7b5e8dfeb48fc
url: "https://pub.dev"
source: hosted
version: "14.2.4"
sdks: sdks:
dart: ">=3.5.0 <4.0.0" dart: ">=2.12.0 <3.0.0"
flutter: ">=3.18.0-18.0.pre.54" flutter: ">=2.0.0"

View file

@ -1,10 +1,10 @@
name: swipe_to_action name: swipe_to_action
description: A widget which can be used to call functions when the wrapped child is dragged or flinged. description: A widget which can be used to call functions when the wrapped child is dragged or flinged.
version: 0.3.0 version: 0.1.0
homepage: https://inex.dev/inex/swipe_to_action homepage: https://inex.dev/inex/swipe_to_action
environment: environment:
sdk: ">=2.12.0 <4.0.0" sdk: ">=2.12.0 <3.0.0"
flutter: ">=2.0.0" flutter: ">=2.0.0"
dependencies: dependencies:
@ -16,7 +16,6 @@ dependencies:
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:
sdk: flutter sdk: flutter
flutter_lints: ^5.0.0
# For information on the generic Dart part of this file, see the # For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec # following page: https://dart.dev/tools/pub/pubspec

View file

@ -10,7 +10,6 @@
<excludeFolder url="file://$MODULE_DIR$/build" /> <excludeFolder url="file://$MODULE_DIR$/build" />
<excludeFolder url="file://$MODULE_DIR$/example/.pub" /> <excludeFolder url="file://$MODULE_DIR$/example/.pub" />
<excludeFolder url="file://$MODULE_DIR$/example/build" /> <excludeFolder url="file://$MODULE_DIR$/example/build" />
<excludeFolder url="file://$MODULE_DIR$/example/.dart_tool" />
</content> </content>
<orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Dart Packages" level="project" /> <orderEntry type="library" name="Dart Packages" level="project" />