wheel_expand_list

Creator: coderz1093

Last updated:

0 purchases

TODO
Add to Cart

Description:

wheel expand list

wheel_expand_list #
https://pub.dev/packages/wheel_expand_list
Environment #
sdk: '>=2.18.1 <3.0.0'
flutter: ">=2.5.0"
copied to clipboard
Example #


















Construction #
Setting location of WheelExample #
wheelWidget.loopWidget(
context,
 wheelLogic.globalKeys,
wheelLogic.textList,
wheelLogic.margin,
wheelLogic.fontSize,
),
copied to clipboard
Setting location of WheelExample2 #

wheelWidget.loopWidget(
context,
wheelLogic.globalKeysLists[i],
wheelLogic.textLists[i],
wheelLogic.margin,
wheelLogic.fontSize,
),
copied to clipboard
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,
),
),
),
),
),
),
),
);
}
}

copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.