From 5b93ba081fd38e8a6f429077c0e08283146116ee Mon Sep 17 00:00:00 2001 From: Vick Top Date: Tue, 27 Feb 2024 09:44:39 +0100 Subject: [PATCH 1/2] doc: create documentation for file --- lib/src/animated_grid_to_list.dart | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/lib/src/animated_grid_to_list.dart b/lib/src/animated_grid_to_list.dart index 376eb0a..e14eb40 100644 --- a/lib/src/animated_grid_to_list.dart +++ b/lib/src/animated_grid_to_list.dart @@ -8,7 +8,22 @@ import 'package:flutter_grid_to_list/src/animated_grid_to_list_type.dart'; export 'animated_grid_to_list_item_builder.dart'; +/// A widget that animates between a grid and list view. +/// +/// This widget takes an [itemBuilder] to build the items and a [controller] +/// to manage the state of the animation. +/// By default, it starts with a grid view, +/// but this behavior can be changed by setting [startWithGrid] to false. +/// +/// The [onTap] function can be provided to handle tap events on items. class AnimatedGridToList extends StatefulWidget { + /// Constructs an [AnimatedGridToList] widget. + /// + /// The [itemBuilder] is required to build items for the grid and list views. + /// The [controller] is required to manage the state of the animation. + /// The [startWithGrid] parameter determines whether the widget + /// starts with a grid view. + /// The [onTap] function can be used to handle tap events on items. const AnimatedGridToList({ required this.itemBuilder, required this.controller, @@ -75,6 +90,11 @@ class _AnimatedGridToListState extends State } } +/// A controller class for managing the state of +/// the [AnimatedGridToList] widget. +/// +/// This controller provides methods to resize, shrink, or expand the widget, +/// as well as retrieving the current status of the widget. class AnimatedGridToListController extends ChangeNotifier { final ScrollController _scrollController = ScrollController(); From aaccc968d2318ba0b886d06ac2c77150da2c516c Mon Sep 17 00:00:00 2001 From: Vick Top Date: Wed, 28 Feb 2024 16:10:55 +0100 Subject: [PATCH 2/2] doc: add license --- LICENSE | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..4c21bd7 --- /dev/null +++ b/LICENSE @@ -0,0 +1,9 @@ +Copyright (c) 2024 Iconica, All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file