diff --git a/example/pubspec.lock b/example/pubspec.lock index 88d7ef8..17d5386 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -7,7 +7,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.8.2" + version: "2.9.0" boolean_selector: dependency: transitive description: @@ -21,28 +21,21 @@ packages: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.1" + version: "1.2.1" clock: dependency: transitive description: name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.1" collection: dependency: transitive description: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.15.0" + version: "1.16.0" cupertino_icons: dependency: "direct main" description: @@ -56,7 +49,7 @@ packages: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.3.1" flutter: dependency: "direct main" description: flutter @@ -80,28 +73,28 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.11" + version: "0.12.12" material_color_utilities: dependency: transitive description: name: material_color_utilities url: "https://pub.dartlang.org" source: hosted - version: "0.1.3" + version: "0.1.5" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.7.0" + version: "1.8.0" path: dependency: transitive description: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.0" + version: "1.8.2" sky_engine: dependency: transitive description: flutter @@ -113,7 +106,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.1" + version: "1.9.0" stack_trace: dependency: transitive description: @@ -134,34 +127,27 @@ packages: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.1" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.2.1" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.8" - typed_data: - dependency: transitive - description: - name: typed_data - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.0" + version: "0.4.12" vector_math: dependency: transitive description: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.1" + version: "2.1.2" sdks: - dart: ">=2.14.0 <3.0.0" + dart: ">=2.17.0-0 <3.0.0" diff --git a/example/windows/flutter/generated_plugins.cmake b/example/windows/flutter/generated_plugins.cmake index 4d10c25..b93c4c3 100644 --- a/example/windows/flutter/generated_plugins.cmake +++ b/example/windows/flutter/generated_plugins.cmake @@ -5,6 +5,9 @@ list(APPEND FLUTTER_PLUGIN_LIST ) +list(APPEND FLUTTER_FFI_PLUGIN_LIST +) + set(PLUGIN_BUNDLED_LIBRARIES) foreach(plugin ${FLUTTER_PLUGIN_LIST}) @@ -13,3 +16,8 @@ foreach(plugin ${FLUTTER_PLUGIN_LIST}) list(APPEND PLUGIN_BUNDLED_LIBRARIES $) list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) endforeach(plugin) + +foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) +endforeach(ffi_plugin) diff --git a/lib/image_stack.dart b/lib/image_stack.dart index 18eafc1..34231bb 100644 --- a/lib/image_stack.dart +++ b/lib/image_stack.dart @@ -67,26 +67,30 @@ class ImageStack extends StatelessWidget { /// To show the remaining count if the provided list size is less than [totalCount] final bool showTotalCount; + /// The order of arrangment of the provided list, defaults to `true` + final bool reversed; + /// Creates a image stack widget. /// /// The [imageList] and [totalCount] parameters are required. - ImageStack({ - Key? key, - required this.imageList, - this.imageRadius = 25, - this.imageCount = 3, - required this.totalCount, - this.imageBorderWidth = 2, - this.imageBorderColor = Colors.grey, - this.imageSource = ImageSource.Network, - this.showTotalCount = true, - this.extraCountTextStyle = const TextStyle( - color: Colors.black, - fontWeight: FontWeight.w600, - ), - this.extraCountBorderColor, - this.backgroundColor = Colors.white, - }) : children = [], + ImageStack( + {Key? key, + required this.imageList, + this.imageRadius = 25, + this.imageCount = 3, + required this.totalCount, + this.imageBorderWidth = 2, + this.imageBorderColor = Colors.grey, + this.imageSource = ImageSource.Network, + this.showTotalCount = true, + this.extraCountTextStyle = const TextStyle( + color: Colors.black, + fontWeight: FontWeight.w600, + ), + this.extraCountBorderColor, + this.backgroundColor = Colors.white, + this.reversed = true}) + : children = [], providers = [], widgetBorderColor = null, widgetBorderWidth = null, @@ -97,22 +101,23 @@ class ImageStack extends StatelessWidget { /// Creates a image stack widget by passing list of custom widgets. /// /// The [children] and [totalCount] parameters are required. - ImageStack.widgets({ - Key? key, - required this.children, - this.widgetRadius = 25, - this.widgetCount = 3, - required this.totalCount, - this.widgetBorderWidth = 2, - Color this.widgetBorderColor = Colors.grey, - this.showTotalCount = true, - this.extraCountTextStyle = const TextStyle( - color: Colors.black, - fontWeight: FontWeight.w600, - ), - this.extraCountBorderColor, - this.backgroundColor = Colors.white, - }) : imageList = [], + ImageStack.widgets( + {Key? key, + required this.children, + this.widgetRadius = 25, + this.widgetCount = 3, + required this.totalCount, + this.widgetBorderWidth = 2, + Color this.widgetBorderColor = Colors.grey, + this.showTotalCount = true, + this.extraCountTextStyle = const TextStyle( + color: Colors.black, + fontWeight: FontWeight.w600, + ), + this.extraCountBorderColor, + this.backgroundColor = Colors.white, + this.reversed = true}) + : imageList = [], providers = [], imageBorderColor = widgetBorderColor, imageBorderWidth = widgetBorderWidth, @@ -124,22 +129,23 @@ class ImageStack extends StatelessWidget { /// Creates an image stack by passing list of `ImageProvider`. /// /// The [providers] and [totalCount] parameters are required. - ImageStack.providers({ - Key? key, - required this.providers, - this.imageRadius = 25, - this.imageCount = 3, - required this.totalCount, - this.imageBorderWidth = 2, - this.imageBorderColor = Colors.grey, - this.showTotalCount = true, - this.extraCountTextStyle = const TextStyle( - color: Colors.black, - fontWeight: FontWeight.w600, - ), - this.extraCountBorderColor, - this.backgroundColor = Colors.white, - }) : imageList = [], + ImageStack.providers( + {Key? key, + required this.providers, + this.imageRadius = 25, + this.imageCount = 3, + required this.totalCount, + this.imageBorderWidth = 2, + this.imageBorderColor = Colors.grey, + this.showTotalCount = true, + this.extraCountTextStyle = const TextStyle( + color: Colors.black, + fontWeight: FontWeight.w600, + ), + this.extraCountBorderColor, + this.backgroundColor = Colors.white, + this.reversed = true}) + : imageList = [], children = [], widgetBorderColor = null, widgetBorderWidth = null, @@ -165,10 +171,12 @@ class ImageStack extends StatelessWidget { child: circularItem(value), ))) .values - .toList() - .reversed .toList(); + if (reversed) { + widgetList.reversed.toList(); + } + return Container( child: Row( children: [ diff --git a/pubspec.lock b/pubspec.lock index 3317f5f..e15edce 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -7,7 +7,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.8.2" + version: "2.9.0" boolean_selector: dependency: transitive description: @@ -21,35 +21,28 @@ packages: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.1" + version: "1.2.1" clock: dependency: transitive description: name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.1" collection: dependency: transitive description: 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.1" flutter: dependency: "direct main" description: flutter @@ -66,28 +59,28 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.11" + version: "0.12.12" material_color_utilities: dependency: transitive description: name: material_color_utilities url: "https://pub.dartlang.org" source: hosted - version: "0.1.3" + version: "0.1.5" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.7.0" + version: "1.8.0" path: dependency: transitive description: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.0" + version: "1.8.2" sky_engine: dependency: transitive description: flutter @@ -99,7 +92,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.1" + version: "1.9.0" stack_trace: dependency: transitive description: @@ -120,34 +113,27 @@ packages: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.1" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.2.1" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.8" - typed_data: - dependency: transitive - description: - name: typed_data - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.0" + version: "0.4.12" vector_math: dependency: transitive description: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.1" + version: "2.1.2" sdks: - dart: ">=2.14.0 <3.0.0" + dart: ">=2.17.0-0 <3.0.0"