Skip to content
Open
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
44 changes: 15 additions & 29 deletions example/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.2"
version: "2.9.0"
boolean_selector:
dependency: transitive
description:
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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:
Expand All @@ -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"
8 changes: 8 additions & 0 deletions example/windows/flutter/generated_plugins.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
list(APPEND FLUTTER_PLUGIN_LIST
)

list(APPEND FLUTTER_FFI_PLUGIN_LIST
)

set(PLUGIN_BUNDLED_LIBRARIES)

foreach(plugin ${FLUTTER_PLUGIN_LIST})
Expand All @@ -13,3 +16,8 @@ foreach(plugin ${FLUTTER_PLUGIN_LIST})
list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>)
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)
110 changes: 59 additions & 51 deletions lib/image_stack.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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: <Widget>[
Expand Down
Loading