wheel_expand_list 0.2.13 copy "wheel_expand_list: ^0.2.13" to clipboard
wheel_expand_list: ^0.2.13 copied to clipboard

It works in 3D with horizontal scrolling. If the area is exceeded, vertical scrolling occurs.

wheel_expand_list #

https://pub.dev/packages/wheel_expand_list

Environment #

  sdk: '>=2.18.1 <3.0.0'
  flutter: ">=2.5.0"

Example #

Construction #

Setting location of WheelExample #

wheelWidget.loopWidget(
 context,
 wheelLogic.globalKeys,
  wheelLogic.textList,
  wheelLogic.margin,
  wheelLogic.fontSize,
),

Setting location of WheelExample2 #


wheelWidget.loopWidget(
  context,
  wheelLogic.globalKeysLists[i],
  wheelLogic.textLists[i],
  wheelLogic.margin,
  wheelLogic.fontSize,
),

Your favorite design will be reflected in the Widget. #

class WheelWidget implements WheelPrimitiveWidget {
  const WheelWidget({
    required this.logic,
  });
  final WheelLogic logic;
  /*
 *You can set your favorite design.
 * */
  @override
  Widget primitiveWidget(
    BuildContext context,
    String text,
    double margin,
    double fontSize,
  ) {
    return Container(
      width: MediaQuery.of(context).size.width - logic.margin,
      color: Colors.green,

      /// same widget
      child: Card(
        child: ListTile(
          leading: const Icon(Icons.people),
          title: Text(
            text,
            style: TextStyle(
              fontSize: logic.fontSize,
            ),
          ),
        ),
      ),
    );
  }

  /*
  * Used to pre-size the Widget.
  * */
  @override
  Widget loopWidget(
    BuildContext context,
    List<GlobalKey> keys,
    List<String> textList,
    double margin,
    double fontSize,
  ) {
    return SingleChildScrollView(
      child: Column(
        children: [
          for (var i = 0; i < keys.length; i++) ...[
            setSizeWidget(
              context,
              keys[i],
              textList[i],
              margin,
              fontSize,
            ),
          ],
        ],
      ),
    );
  }

  /*
  * Used to pre-size the Widget.
  * */
  @override
  Widget setSizeWidget(
    BuildContext context,
    GlobalKey<State<StatefulWidget>> key,
    String text,
    double margin,
    double fontSize,
  ) {
    return IgnorePointer(
      ignoring: true,
      child: SafeArea(
        child: Container(
          key: key,
          alignment: Alignment.topLeft,
          width: MediaQuery.of(context).size.width - margin,
          child: AnimatedOpacity(
            duration: const Duration(milliseconds: 1),
            opacity: 0,

            /// same widget
            child: Card(
              child: ListTile(
                leading: const Icon(Icons.people),
                title: Text(
                  text,
                  style: TextStyle(
                    fontSize: logic.fontSize,
                  ),
                ),
              ),
            ),
          ),
        ),
      ),
    );
  }
}

7
likes
150
points
70
downloads

Publisher

verified publishereverydaysoft.co.jp

Weekly Downloads

It works in 3D with horizontal scrolling. If the area is exceeded, vertical scrolling occurs.

Repository (GitHub)

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on wheel_expand_list